Hosting ASP.NET outside of IIS with medium trust ?

I

ilkka

Hi !

SimpleWorkerRequest class can be used to host asp.net pages outside of
IIS. However when a web application is configured to run as medium
trust (or lower), you will get an exception
"System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.SecurityPermission......' failed." when
calling HttpRuntime.ProcessRequest (or trying to parse the page using
PageParser.GetCompiledPageInstance).

The reason for this is that both constructors for the
SimpleWorkerRequest perform a security demand that requires
UnmanagedCode permission. This permission is not normally granted in
any partial trust environment.

How can I host (if possible) asp.net in medium trust environment? I
suppose I'd have to inherit from the HttpWorkerRequest class and do
some stuff. Any help would be appreciated.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top