Solved

Urlmappings - works locally not on server IIS

Posted on 2007-03-18
3
1,958 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
Comment Utility
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
Comment Utility
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
Comment Utility
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 Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now