Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 16, 2013 03:24 PM by skmcfadden
Member
35 Points
97 Posts
Feb 16, 2013 03:24 PM|LINK
We have a custom IHttpHandler/Factory implementation that works on localhost/Cassini. Deployed to IIS and it when trying to invoke we get 404's. Here is pertitent web.config parts.
<location path="FederationMetadata.xml"> <system.web> <authorization> <allow users="*" /> </authorization> </system.web> </location>
<system.web>
.
<httpHandlers>
<add verb="GET" path="FederationMetadata.xml" type="Castle.Utils.Misc.Impl.WindsorHttpHandlerFactory, Castle.Utils.Misc.Impl" /> </httpHandlers> </system.web>
<system.webServer>
<handlers>
<add name="HandlerFactory" path="FederationMetadata.xml" verb="GET" type="Castle.Utils.Misc.Impl.WindsorHttpHandlerFactory, Castle.Utils.Misc.Impl" resourceType="File" requireAccess="Script" /> </handlers> </system.webServer>
Here is our MVC route registration code:
public void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("FederationMetadata.xml"); //prevent MVC from interferring with our custom http handler
routes.MapRoute( "Default", // Route name "{controller}/{action}" // URL with parameters );
}
WebApp=ASP.NET MVC 4.5
IIS WebServer=Windows 2008R2
Please advise.
thanks
skmcfadden
Member
35 Points
97 Posts
custom HttpHandler works on cassini / localhost but not with IIS 7.5
Feb 16, 2013 03:24 PM|LINK
We have a custom IHttpHandler/Factory implementation that works on localhost/Cassini. Deployed to IIS and it when trying to invoke we get 404's. Here is pertitent web.config parts.
<location path="FederationMetadata.xml">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<system.web>
.
.
<httpHandlers>
<add verb="GET" path="FederationMetadata.xml" type="Castle.Utils.Misc.Impl.WindsorHttpHandlerFactory, Castle.Utils.Misc.Impl" />
</httpHandlers>
</system.web>
<system.webServer>
.
.
<handlers>
<add name="HandlerFactory" path="FederationMetadata.xml" verb="GET" type="Castle.Utils.Misc.Impl.WindsorHttpHandlerFactory, Castle.Utils.Misc.Impl" resourceType="File" requireAccess="Script" />
</handlers>
</system.webServer>
Here is our MVC route registration code:
public void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("FederationMetadata.xml"); //prevent MVC from interferring with our custom http handler
routes.MapRoute(
"Default", // Route name
"{controller}/{action}" // URL with parameters
);
}
WebApp=ASP.NET MVC 4.5
IIS WebServer=Windows 2008R2
Please advise.
thanks