Testing a Web site on ASP.NET Medium Trust environment

Q: If the IIS 6.0 hosting servers are configured to run on ASP.net Medium Trust, how can you test code under Medium Trust locally ?



A: Try watching this video on MSDN TV: Working with medium trust in ASP.NET. Stefan Schackow discusses important security restrictions implemented with trust levels. http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=2396

 

You can test your code locally under ASP.NET Medium Trust environment.  To enable Medium Trust please modify this file on your local development PC:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config

<location allowOverride="false">
<system.web>
<securityPolicy>
<trustLevel name="Full" policyFile="internal" />
<trustLevel name="High" policyFile="web_hightrust.config" />
<trustLevel name="Medium" policyFile="web_mediumtrust.config" />
<trustLevel name="Low" policyFile="web_lowtrust.config" />
<trustLevel name="Minimal" policyFile="web_minimaltrust.config" />
</securityPolicy>
<trust level="Medium" originUrl="" />
</system.web>
</location>

 

  • 2 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?