Click here to Skip to main content
15,668,842 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using URL Mapping showed in tried section. works fine in visual studio,but when i go to deployment in IIS 7.5 it says 404 error resource not found & i also try rewrite rules & rewrite map
still not not work.
I am in puzzle.please help me.


What I have tried:

its .

<urlMappings enabled="true">

  <add  url="~/User/Dashboard" mappedUrl="~/UserManagement/Default.aspx"/>
  <add  url="~/Employee/employee" mappedUrl="~/Employee_Personal/employee.aspx"/>
  <add  url="~/Requistion/Product" mappedUrl="~/Requistion/product.aspx"/>
  <add  url="~/Requistion/Vehicle" mappedUrl="~/Requistion/vehicle-details.aspx"/>
  <add  url="~/Requistion/Supplier" mappedUrl="~/Requistion/supplier.aspx"/>
  <add  url="~/Requistion/Driver" mappedUrl="~/Requistion/driver.aspx"/>
  <add  url="~/Requistion/Requisition" mappedUrl="~/Requistion/requisition.aspx"/>
  <add  url="~/Requistion/Requisition-Approve" mappedUrl="~/Requistion/approve-requisition.aspx"/>
  <add  url="~/Requistion/Gate-Pass" mappedUrl="~/Requistion/gate-pass.aspx"/>
  <add  url="~/Requistion/Requsition-Car" mappedUrl="~/Requistion/requistion-for-car.aspx"/>
  <add  url="~/Requistion/Requsition-Car-Approve" mappedUrl="~/Requistion/approve-requistion-car.aspx"/>

I have googled lots of time & try

              <remove name="Rewrite rule1 for StaticRewrites" />
              <rule name="Redirect rule1 for StaticRewrites">
                  <match url=".*" />
                      <add input="{StaticRewrites:{REQUEST_URI}}" pattern="(.+)" />
                  <action type="Redirect" url="{C:1}" appendQueryString="false" />
              <remove name="StaticRewrites" />
              <rewriteMap name="StaticRewrites">
                  <add key="~/Employee_Personal/employee" value="~/Employee_Personal/employee.aspx" />
Updated 8-Sep-22 17:06pm

1 solution

For the URL rewriting rules, you'll need to install the URL Rewrite module on the server:
URL Rewrite : The Official Microsoft IIS Site[^]

For the URL mappings, you might need to install this hotfix[^], or apply one of the workarounds to ensure that ASP.NET is invoked for extensionless URLs:
Using ASP.NET 4.0 Extension-less Routing on IIS 7.5 – Sven Aelterman[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900