Last post Oct 10, 2007 03:29 AM by Guang-Ming Bian - MSFT
Oct 06, 2007 01:52 PM|fitz29|LINK
I've been having a hell of day trying to get Context.RewritePath() working. It was all going really well until I try to change a url that doesn't specify the aspx file i.e
/localhost/House and Home/. If I do this then I get the following error:
Description: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Error Code: 0x80070002
Module: IIS Web Core
Requested URL: http://localhost/FAQ.aspx?
Physical Path: C:\inetpub\wwwroot\House and Home
Logon User: Anonymous
Logon Method: Anonymous
The strange thing is though if I do it specify the file name i.e /localhost/House and Home/default.aspx then it works. However I'm already on google with the first file name so can't simply change all urls to specify the full path. Anyone have any ideas?
many thanks, Anthony
Oct 06, 2007 02:03 PMemail@example.com|LINK
Spaces in the URL may get replaced with %20, becoming a new URL.
Oct 06, 2007 02:13 PM|fitz29|LINK
No this is not the issue at all. As I said it's to do with whether default.aspx is specified at the end. If I put a dummy default file in the location of the url it works. I've read somewhere that it might be to do with how IIS 7 deals with unspecified
default files and that they just put lots of dummy files everywhere, however this would mean hundreds of dummy files in my root directory, so any other solutions are very welcome.
Oct 10, 2007 03:29 AM|Guang-Ming Bian - MSFT|LINK
You should add "default.aspx" as "default content page".
Default content page include:
So you add default.aspx as default page , it will works.