When I run my ASP.NET on my computer it works fine, even in medium trust which is what mt webhost uses. However on the webhost it generates this exception SecurityException: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.] System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken) +666 System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride) +0 System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +88 System.Security.CodeAccessPermission.Demand() +62 System.Web.HttpContext.set_User(IPrincipal value) +71 newtelligence.DasBlog.Web.Global.Application_AuthenticateRequest(Object sender, EventArgs e) in Global.asax.cs:190 System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87 Steve Not all who wander are lost...
Steve Severance
Posts
-
ASP.NET Security Exception on Webhost -
modifying urls in XML docsI have an XML document that in some elements can contain HTML. The document is being sent to a client app via a web service. The HTML contained in the document can contain images. The images have document delative Urls. I want to add the complete url to the image tag. Is there an easy way to do this? I have tried using a regex but have been unable to get it to work. Thanks. Steve Not all who wander are lost...
-
Convincing web service migrationI am currently involved in a project that is a distrubeted network for sharing medical teaching cases between hospitals. It operates kind of like a specialized kazaa. The current system is in beta. It uses java servlets to send custom HTML messages between the querying program and the stroage server. I thought that it could be better implemented using a web service. Firstly the implementation would be more elegant from a programming stand point. Second, web services are a good technology base for future work. They are full featured and the functionality is constantly being expanded. The engineer in charge of the project has no knowledge of SOAP at all and he has been resistant to my ideas. He does report to a committee that overseas the project. What would be the best way to convice people that the project should use web services? I need more than the fact that it is cooler and technologically superior. Thanks. Steve Not all who wander are lost...
-
Serving Transform XMLIs there a way in ISS/ASP.NET that when a user accesses a XML file it can be transformed using XSLT? Thanks. Steve Not all who wander are lost...
-
XML Text accessThanks. Will this also work on .NET? Steve Not all who wander are lost...
-
XML Text accessI need to access the value of a node that also contains childnodes such as <node> text <child>value</child> </node> Inner text doesn't work because I get the child text also. I think that the way Innertext is done is pretty bad. Any Ideas? Thanks. Steve Steve Not all who wander are lost...
-
Delegate ProblemI am creating a console sort of like quakes in which the user can modify variables and execute commands by typing them into a command line. So I have a Shell class which keeps track of variables and commands that are registered to it. Each command that can be executed has a delegate to the function that it calls when the user types its name in. I want to know if its possible to pass a function name as an arguement to another function, the purpose being that the Shell class would take care of creating the actual delegate. I noticed that in the delegate constructor it uses the parameter void() target, but when i try that it generates a bunch of errors. Any help would be appreciated. Thank you. Steve Not all who wander are lost...
-
COM+ Alternatives in .NETThanks for the reply. If you were me, what would you do? I am using .NET and have been told not to use COM+ but don't know what else todo. Thanks. Steve Not all who wander are lost...
-
COM+ Alternatives in .NETI have been reading articles on using COM+ in .NET, however most of them discourage its use for new applications. What is the recommended alternative(s)? I am building a client/server app and was going to make the Server a COM+ object and access it through .NET Remoting. Should I be using a Windows Service or something else. I would prefer to stay away from webservices due to the sensitive nature of the application. Thnaks. Steve Not all who wander are lost...
-
Post Build StepsIn VC++ 6 you could add post build steps like run scripts to deploy files. Is there anything like this in C#? Thanks. Steve Not all who wander are lost...
-
ConfigurationSettingsI am trying to read a custom config section but its not working. ConfigurationSetting.GetConfig() returns null; CONFIG FILE:
CODE: IDictionary valueTable = (IDictionary)ConfigurationSettings.GetConfig("data"); string Server = (string)valueTable["Server"]; string Username = (string)valueTable["Username"]; string Password = (string)valueTable["Password"]; string Encrypt = (string)valueTable["Encrypt"]; string Security = (string)valueTable["Security"]; Any ideas? Thanks. Steve Not all who wander are lost...
-
DataGrid Editing doesn't updateI read your article several times. Do I have explicitly have all the items be textboxs? Do I have to process the Textboxs OnTextChanged message even if I just want the end result? If the arguements passed are the original values what use is the update command? Thanks. Steve Not all who wander are lost...
-
DataGrid Editing doesn't updateI am trying to get a datagrid to update. Everything else in it works. However when I try to retrieve the new value it passes me the original value. Any Ideas? Thanks. public void UpdateGrid(object sender, DataGridCommandEventArgs e) { UpdateVendor.Connection = Global.sqlConnection; UpdateVendor.Parameters[0].Value = dgVendors.DataKeys[(int)e.Item.ItemIndex]; UpdateVendor.Parameters[1].Value = ((TextBox)e.Item.Cells[3].Controls[0]).Text; UpdateVendor.Parameters[2].Value = ((TextBox)e.Item.Cells[4].Controls[0]).Text; UpdateVendor.Parameters[3].Value = ((TextBox)e.Item.Cells[5].Controls[0]).Text; UpdateVendor.Parameters[4].Value = ((TextBox)e.Item.Cells[6].Controls[0]).Text; UpdateVendor.ExecuteNonQuery(); dgVendors.EditItemIndex = -1; dgVendors.DataBind(); Response.Redirect("ManageVendors.aspx"); } Steve Not all who wander are lost...
-
Update Datagrid problemhere is the exact code. public void UpdateGrid(object sender, DataGridCommandEventArgs e) { UpdateVendor.Connection = Global.sqlConnection; UpdateVendor.Parameters[0].Value = dgVendors.DataKeys[(int).Item.ItemIndex]; TextBox Contact = (TextBox)e.Item.Cells[3].Controls[0]; TextBox Address = (TextBox)e.Item.Cells[4].Controls[0]; TextBox Phone = (TextBox)e.Item.Cells[5].Controls[0]; TextBox Fax = (TextBox)e.Item.Cells[6].Controls[0]; UpdateVendor.Parameters[1].Value = Contact.Text; UpdateVendor.Parameters[2].Value = Address.Text; UpdateVendor.Parameters[3].Value = Phone.Text; UpdateVendor.Parameters[4].Value = Fax.Text; UpdateVendor.ExecuteNonQuery(); dgVendors.EditItemIndex = -1; dgVendors.DataBind(); } Steve Not all who wander are lost...
-
Update Datagrid problemWhen I try to update my databae using the update on the datagrid the original values, not the modified ones are passed. Any ideas? Thanks.(No, the function in its current state does not function) public void UpdateGrid(object sender, DataGridCommandEventArgs e) { UpdateVendor.Connection = Global.sqlConnection; UpdateVendor.Parameters[0].Value = dgVendors.DataKeys[(int)e.Item.ItemIndex]; TextBox Contact = (TextBox)e.Item.Cells[3].Controls[0]; TextBox Address = (TextBox)e.Item.Cells[4].Controls[0]; TextBox Phone = (TextBox)e.Item.Cells[5].Controls[0]; TextBox Fax = (TextBox)e.Item.Cells[6].Controls[0]; UpdateVendor.ExecuteNonQuery(); dgVendors.EditItemIndex = -1; dgVendors.DataBind(); } Steve Not all who wander are lost...
-
ADO Null Referanceok...Thanks. Is there a way that I can tell? Steve Not all who wander are lost...
-
ADO Null ReferanceI have an SqlCommand AuthUser which call a sproc in a database. When I call execute scalar it produces a NullReferanceException. Code below. Thanks. private bool CustomAuthenticate(string username,string password) { AuthUser.Connection = Global.sqlConnection; AuthUser.Parameters[0].Value = username; AuthUser.Parameters[1].Value = password; long ret = (long)AuthUser.ExecuteScalar();//Crashes here return (ret > 0); } Steve Not all who wander are lost...
-
COM ActivationIf I have a COM+ Component(EnterpriseServices). If I have the activation set as server and I instantiate it in 2 places do they both get the same instance? And if not is there a way around this? Thanks. Steve Not all who wander are lost...
-
Database ProblemThis is happening because Access limits the database size to 2 gigs. You might try archiving, I don't know if thats easy in access or even possible in your application. The long term solution is to migrate to SQL server. It's relativly I easy I think(I have not done this in a production setting so I am not sure how well this works). Steve Not all who wander are lost...
-
WebService ArchitectureI am beginning a research project in which I will begin to develop an application to manage a small to mid-size hospital. I am wondering what the best way to architect this is. I was thinking of building a webservice for consumption by and ASP.NET site as well as a piece of software on handheld devieces. There is so much functionality that will be exposed that roling it into a single webservice will produce an enourmous service. I was thinking after I posted that COM+ may be the way to go. I have no experiance developing enterprise applications so any advice or good resources would be appreciated. Thanks. Steve Not all who wander are lost...