Hi:
I am having an issue on my website (asp.net 2.0, C#) when I try to login: http://datawebcoder.com/login.aspx
The error is:
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Here is the answer from godaddy support:
<div style="background-color: Gainsboro;" mce_style="background-color:Gainsboro">Upon review, it appears that this issue is due to the trust level required by your application. Our hosting plans using ASP.NET 3.5 is a medium trust environment. Trust level refers to permissions set in the Web.config file that dictate what operations
can and cannot be performed by Web applications. Our ASP.NET 3.5 shared hosting servers use the default Medium trust level with the addition of OleDbPermission, OdbcPermission, and a less-restrictive WebPermission.
Applications operating under a Medium trust level have no registry access, no access to the Windows event log, and cannot use ReflectionPermission (but can use Reflection). Such applications can communicate only with a defined range of network addresses and
file system access is limited to the application's virtual directory hierarchy.
Using a Medium trust level prevents applications from accessing shared system resources and eliminates the potential for application interference. Adding OleDbPermission and OdbcPermission allows applications to use those data providers to access databases.
WebPermission is modified to allow outbound http and https traffic.
And I asked them how to fix it, godaddy just gives me below answer:
<div style="background-color: Gainsboro;" mce_style="background-color:Gainsboro">Our shared hosting server that are running asp.net 2.0 and higher are set to run scripts in medium trust levels. Unforently this how we have are server currently setup.
</div>Do you guys have any suggestion on how to fix the problem? Have searched online, but I haven't got any clue yet?
Thank you very much.
JT