Last post Jul 18, 2008 03:04 AM by camino
Jul 09, 2008 05:20 AM|camino|LINK
In this moment, en my application, i have urls like
http://www.mypage.com/section/?P1=A where in folder section, there is a file index.aspx
and i want to have urls like www.my page.com/section/A/.
The idea is that when www.my page.com/section/A/ is requested, the page
http://www.mypage.com/section/?P1=A is show but in navigator direction, it continues
I have created a class library PageHandler:
But this doen't work fine. The url is changed fine but the page is in white.
The url www.my page.com/section/A/ isn't found, but
www.my page.com/section/index.aspx/A/ yes
How can you do that this works fine?
Many thanks for your help.
Jul 09, 2008 07:27 AM|Peter Bucher|LINK
HttpHandlers are wrong here.
Use the Global.asax or a HttpModule, or use a existing module out there.
Jul 11, 2008 03:58 AM|camino|LINK
Many thanks for your response. I were confused with httphandler.
I have seen some url rewriting modules, but I wanted to use the more simple code, because I prefers to use HttpModule.
I have created the httpmodule and works for example with
This converts in
But, how would it work http://www.mypage.com/section/1/A/? Perhaps, i have to modify something in IIS configuration, but I don't know that.
Thanks for your help.
Jul 11, 2008 07:00 AM|Peter Bucher|LINK
Right, you have to configure IIS to map all incoming Requests to the aspnet_isapi.dll.
Or use a ASP.NET File-Extension for your urls, like:
Jul 14, 2008 05:53 AM|camino|LINK
I need to map all request, then I use the first option.
I have found in
http://www.codeproject.com/KB/aspnet/urlrewriter.aspx, like configure IIS.
But when i indicate extension * or .*, the iis show "Format not valid". I revised the iis configuration but i didn't find something.
How can i configure it?
Thanks for your help, it has been very useful.
Jul 14, 2008 08:03 AM|Peter Bucher|LINK
Then, you have to set an - so called - "Application Wildcard" to the DLL.
Jul 15, 2008 03:57 AM|camino|LINK
Thanks for help. I have found information over "Application Wildcard" (http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx?mfr=true).
I have added the httpmodule.dll there, but then the web server doesn't show pages, it produces the message "Page not found".
My IIS is the version 6.
Jul 17, 2008 08:54 AM|Peter Bucher|LINK
Set the wildcard to "aspnet_isapi.dll".
Jul 18, 2008 03:04 AM|camino|LINK
Thanks for your help. It has been very useful.