Solved

Urlmappings - works locally not on server IIS

Posted on 2007-03-18
3
1,970 Views
Last Modified: 2007-12-19
Hi,
I'm trying to use the urlmappings in asp.net 2.0 on iis 6 / win 2003.
Everything works fine on my local xp vs 2005 edition, but on server I get a 404 page.
Here is sample of web.config with relevant bits:
<system.web>
<urlMappings enabled="true">
      <add url="~/wakefield.html" mappedUrl="~/partner/index.aspx?p=1"/>
    </urlMappings>
</system.web>

- when I go to wakefield.html local, everything works fine and it goes to the correct page.
On the server I get a 404 page.

If I change it to

<add url="~/wakefield.aspx" mappedUrl="~/partner/index.aspx?p=1"/>
ie change the file type to aspx from html, everything works fine, so I know the code is ok.  Am I missing something in the setup of IIS and the way it copes with the .html?

Any help greatly appreciated,
Andrew
0
Comment
Question by:andrewh123
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Dave_Dietz earned 500 total points
ID: 18746382
Do you have HTML mapped to ASPNET_Isapo in the application mappings?

If no then requests to .html pages will not be handled by ASP.Net and will not be mapped properly.

Dave Dietz
0
 
LVL 1

Author Comment

by:andrewh123
ID: 18746824
Cheers Dave - but did you actually mean aspnet_isapi.dll ?  Mapped this and all seems to work now.
Regards
Andrew
0
 
LVL 34

Expert Comment

by:Dave_Dietz
ID: 18747982
D'oh!  Yes, I fumble fingered my spelling.

aspnet_isapi.dll is correct.  

If you actally have an aspnet_isapo mapping you might want to run some antivirus scans.....  ;-)

Dave Dietz
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question