httphander pagehanderfactory medium trust security exception.



Hi all i have a strang issue when using a custom http hander in a medium
trust enviroment, thats enforced by my webhost

for sake of ease and to rule out my custom code i have a http handler
defined as below. This assembly is signed.

namespace SimpleHTTPHandler
{

[PermissionSetAttribute(SecurityAction.LinkDemand, Unrestricted = true)]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Unrestricted =
true)]
public class Handler : PageHandlerFactory, IRequiresSessionState
{

public override IHttpHandler GetHandler(HttpContext context, string
requestType, string virtualPath, string path)
{
return base.GetHandler(context, requestType, virtualPath, path);
}

}
}

in my web.config httphandlers are defined as bellow.

<httpHandlers>
<remove verb="*" path="*.asmx" />
<add verb="*" path="*.aspx" type="SimpleHTTPHandler.Handler,
SimpleHTTPHandler" validate="false" />
</httpHandlers>


when browsing to an aspx page in the hosted enviroment i get a security
exception

Exception Details: System.Security.SecurityException: Request failed.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:


[SecurityException: Request failed.]
System.Reflection.Assembly._GetType(String name, Boolean throwOnError,
Boolean ignoreCase) +0
System.Reflection.Assembly.GetType(String name, Boolean throwOnError,
Boolean ignoreCase) +41

System.Web.Compilation.CompilationUtil.GetTypeFromAssemblies(AssemblyCollection assembliesCollection, String typeName, Boolean ignoreCase) +176
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean
throwOnError, Boolean ignoreCase) +325
System.Web.Configuration.ConfigUtil.GetType(String typeName, String
propertyName, ConfigurationElement configElement, XmlNode node, Boolean
checkAptcaBit, Boolean ignoreCase) +38


i can simulate this is the dev enviroment by inserting a trust level into
the web.config

<trust level="Medium"/>

however i cant see what the issue is here as my handler actually does
nothing, other than be a custom implementation of pagehandlerfactory.

am i missing some code based security stuff , or are custom httphandlers not
allows in medium trust?

would appericiate and help :-)


.



Relevant Pages

  • ready to scream
    ... it's for an IT Service Request list form. ... EndUserEntry.aspx that has a Custom List Form on it with just the fields the ... An unhandled exception has occurred. ... Thread account name: NT AUTHORITY\NETWORK SERVICE ...
    (microsoft.public.sharepoint.portalserver)
  • =?Utf-8?Q?SBS2003_-_Some_websites_don=C2=B4t_wo?= =?Utf-8?Q?rk?=
    ... The current error page you are seeing can be replaced by a custom ... Server Error in '/Backup' Application. ... Exception Details: System.UnauthorizedAccessException: Access to the path ... granting access rights to the resource to the ASP.NET request identity. ...
    (microsoft.public.windows.server.sbs)
  • System.OutOfMemoryException and PreRenderRecursiveInternal
    ... I'm getting all my data from a web service. ... Exception of type 'System.OutOfMemoryException' was thrown. ... Please review the stack trace for more ... throwOnError, Boolean ignoreCase) +0 ...
    (microsoft.public.dotnet.framework)
  • Re: Exception of type System.OutOfMemoryException was thrown
    ... Exception of type 'System.OutOfMemoryException' was thrown. ... assembliesCollection, String typeName, Boolean ignoreCase) +258 ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.general)
  • Security Exception
    ... Exception Details: System.Security.SecurityException: Request for the ... Boolean ignoreCase) +0 ... System.Web.UI.Util.GetTypeFromAssemblies(ICollection assemblies, String ...
    (microsoft.public.dotnet.framework.aspnet.security)