HttpModules does not work with iis 7.5 to rewrite / expand URLs, less url (enter error 500.0)

I am using URL rewriting using IHttpModule. The application works with a local one, but on the server application it gives an error if I wrote the path without the extension (aspx).

I had a URL rewrite module in web configuration like

<system.webServer> <validation validateIntegratedModeConfiguration="false" /> <modules> <add name="URLRewriteModule" type="URLRewriteModule" preCondition="ManagedHandler" /> </modules> <defaultDocument> <files> <add value="Login.aspx" /> </files> </defaultDocument> </system.webServer> 

Also there is ExtensionlessUrlHandler-Integrated-4.0, ExtensionlessUrlHandler-ISAPI-4.0_64bit, ExtensionlessUrlHandler-ISAPI-4.0_32bit. Then also I get the following error

HTTP Error 500.0 - Internal Server Error

ManagedPipelineHandler Module

ExecuteRequestHandler notification

ExtensionlessUrlHandler-Integrated-4.0 Handler

Error Code 0x800703e9

+4
source share
1 answer

I think you missed the configuration.

Below is an example, a custom HTTP module must be configured in both system.web node and system.webserver node

  <system.web> <compilation debug="true" targetFramework="4.0" /> <httpModules> <add name="CustomHttpModule" type="Routing_Static_Page_Demo.WebModule.CustomHttpModule, Routing_Static_Page_Demo" /> </httpModules> 

 <system.webServer> <modules runAllManagedModulesForAllRequests="true"> <remove name="UrlRoutingModule"/> <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <add name="CustomHttpModule" type="Routing_Static_Page_Demo.WebModule.CustomHttpModule" /> </modules> 

0
source

Source: https://habr.com/ru/post/1379636/


All Articles