Asked by:
error after overwrite files

Question
-
User110780343 posted
After overwrite project I got this error in first login page
System.security.SecurityException: Request for the permission of type System.Data.SqlClient.SqlClientPermission et.c....
Here detail of errorhttps://www.dropbox.com/s/n4687xy3kkr2sh1/demo.jpg?dl=0
Excuse me for screen but I'm using Remote Desktop and copy/paste doesn't works!
Now I tried also to replace old original version (that I had as backup in another folder) but I got same error ... previous was OK!
Sunday, October 6, 2019 9:04 PM
All replies
-
User753101303 posted
Hi,
It usually happens on hosting services that can restrict what can be done for saferty reasons. You should likely see with those in charge of providing you with this service (either inside or outside of your company) to see what is in place. For a quick overview of this "partial trust" feature see for example :
http://www.csharp411.com/executing-code-in-partial-trust-environments/
Monday, October 7, 2019 8:38 AM -
User110780343 posted
Thanks for your reply!
But was OK previously ....and now I replaced old files :(Monday, October 7, 2019 4:11 PM -
User753101303 posted
You kept old files on the server or you moved them on your own machine? If I remember a security policy could check from which "zone" comes a file. Try perhaps https://thirtysix.zendesk.com/hc/en-us/articles/202921675-How-to-Unblock-a-File-Downloaded-from-an-Email-or-the-Internet (not 10% sure it is related but it may worth to give it a try).
If it still doesn't work, it will be likely easier to get in touch with those managing this security policy to see what needs to be done rather than trying to guess.
Monday, October 7, 2019 4:27 PM -
User110780343 posted
I simply overwrite existing files and folders .... after this change here is the result :(
I can see login page.... but when I try to insert username and password I get error showedplease can you help me?
ThanksMonday, October 7, 2019 10:27 PM -
User475983607 posted
My best guess is the connection string is configured to use integrated security while developing on your local machine but the original connection string uses SQL login. Take a look at the connection string in the original web.config.
Monday, October 7, 2019 10:45 PM -
User110780343 posted
But I overwrite with old version that previously was OK ...and now same issue :(
Tuesday, October 8, 2019 11:15 PM -
User110780343 posted
Nobody can help me?? I still have this issue and I don't know what to do!
Wednesday, October 9, 2019 9:52 PM -
User665608656 posted
Hi dandi.box,
According to your error message, I recommend that you can choose 'This is a full trust application' option.
You can refer to these links:
Request for the permission of type 'System.Security.Permissions.SecurityPermission'
Best Regards,
YongQing.
Thursday, October 10, 2019 3:25 AM -
User110780343 posted
Were can I find this option?? "this is a full trust application" I mean
Thursday, October 10, 2019 11:54 PM -
User110780343 posted
And here
--
Go to Control Panel / Administrative Tools / Microsoft .NET Framework
Configuration / configure security settings.
--
I don't see "Microsoft .NET Framework" optionI'm using Windows 2016 Server
Friday, October 11, 2019 12:06 AM -
User665608656 posted
Hi dandi.box,
Were can I find this option?? "this is a full trust application" I meanThis pop-up box only appeared before version 4.0. If you can't find it, you can try using code to apply the function.
In the web.config of your project, add the following statement to set a higher trust level for asp.net:
<configuration> <system.web> <trust level ="Full" /> </system.web> </ configuration>
For more details, you could refer to this link : Changing the ASP.NET Trust Level
Best Regards,
YongQing.
Friday, October 11, 2019 2:44 AM