ASP .NET Medium Trust

Issue

Unable to run ASP.Net Medium Trust in your shared hosting environment.

Symptoms

Server Error in ‘/folder’ Application.
——————————————————————————–
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application’s trust level in the configuration file. 

Cause

If you get above error message appears on ASP .Net Webpage, it is because our shared hosting environment has been restricted to runs at medium trust level. Users will not be able to override the ASPNET 2.0 Trust Level. As security concerned, FULL TRUST setting is not possible to be enabled for shared hosting and it is not possible to be override from client side as well.

Workaround

Please refer to the following MSDN link for further information and fine tune your script in order to make it runnable under Medium Trust Level:

http://msdn.microsoft.com/en-us/library/ms998341.aspx

You may also utilise OLEDB Connection as OCBC will not work in Medium Trust Environment, you may refer to the sample code at:

http://supportchain.com/index.php?/Knowledgebase/Article/View/137/0/asp-net-oledb

As for MySQL OLEDB Connection, you may refer to the sample code at:

http://supportchain.com/index.php?/Knowledgebase/Article/View/134/0/asp-net-oledb-for-mysql

Additional Information

If the problem still persist, kindly issue a ticket to Support Team for further information.

Updated on March 14, 2019

Was this article helpful?

Related Articles

Leave a Comment

Need Help?
Submit a ticket to us and let our professional team assists you

Support Billing Sales
Support
Billing
Sales