This project is read-only.

Trust Level Issues

Topics: ASP.NET 2.0
May 30, 2008 at 6:47 PM
I got BlogEngine installed on my shared host's server but it wouldn't run without errors until I commented out the trust level parameter in web.config.  I tried setting the trust level to "Medium" and it didn't matter.  Finally I removed (commented out) the trust level parameter altogether and it started to run.  (By the way, the install zip that I downloaded did not include either the /App_Code/VB or /App_Code/CS/ directories.)  Once I added those subdirectories, everything worked fine. 

My issue is, BlogEngine is now running without any trust level settings and I'm not sure what problems that may cause.  Can someone enlighten me.  If I have to, I can probably have my web host move me to a Full Trust server.


Jun 2, 2008 at 2:14 AM

Commenting out the <trust> tag in web.config means you let your ASP.NET application runs in Full trust mode. However, the privileges of running web application in Full trust mode is still restricted by the operating system' security policy.

Setting the <trust> other than Full trust will configure your web application to run under partial trust condition. Running in partial trust should be more secure, but it also restricts some access you may require. BlogEngine.NET should run fine under High trust condition.

Agus Suhanto
Jun 2, 2008 at 4:52 AM

Thank you for your explanation.  Everything appears to be running fine right now.  Can you be more specific about the types of restrictions I may experience in the future by remaining in a partial trust mode.

Thanks again,

Jun 2, 2008 at 7:36 PM
You can look at the Rick Strahl's post about running in medium trust -
BlogEngine in the latest builds has this line removed by default - it is usually set on machine level by hosting provider anyway. You should be just fine with BE code running in medium trust.