Solved

Urlmappings - works locally not on server IIS

Posted on 2007-03-18
3
1,977 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

737 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