URL rewriting problems with ASP .NET 2 on IIS7 and Vista?

I know that the web. Config way is supposed to be 100% foolproof, but I've seen a few things where it helps to just configure it in IIS to get it working correctly.

I've tried this but to no avail. – gilles27 Dec 1 '08 at 15:25 Interesting, do you have anything else that modifies the config? Or any other global handlers registered?

Is this application a virtual directory? – Mitchel Sellers Dec 1 '08 at 15:45 AFAIK, nothing else modifies the config. The code is running a website rather than virtual directory.

I've added some samples of the config to the question itself. – gilles27 Dec 1 '08 at 16:57 I have had trouble getting wild card support to work right in IIS 7.0. You may want to try adding a right before your handler that you added in to make sure that nothing else is trying to run before you stuff.

– Nick Berardi Dec 1 '08 at 17:46.

You also may want to check out the new IIS7 rewrite module. You can read more about it here learn.iis.net/page.aspx/460/using-url-re..., but chances are it will be more solid then your homegrown ISAPI filter.

Thanks but I need my own rewriter as our rewriting is quite custom. I'm also pretty confident the rewriting is working fine, it's just that static file requests are not working properly. – gilles27 Dec 2 '08 at 9:07.

If you're runnning in classic pipeline mode you don't need section it is required for integrated mode Enable wildcard script mapping Open the IIS7 Manager and navigate to your site Click on Handler Mappings In the Action panel click on "Add Wild Card Script Map" In the dialog point to aspnet_isapi. Dll Click Yes on the message box that asks you to confirm your mapping In the action panel click on "View Ordered List" and move your WildcardScriptMap just before StaticFile Handler This should bee enough.

I've tried this and I still get the same issue. I also noticed that, after using IIS to make the changes you suggested, if I go back into Visual Studio there is a new section in the config file. – gilles27 Dec 2 '08 at 9:05.

I'm ashamed to admit this but it was a simple mistake by me :-( In my URL rewriting module, the code to rewrite the request path was in the Init method, when it should have been inside an Application. BeginRequest handler. This explains why the rewriting worked only the first time the site was hit.

Sorry to have wasted your time people!

Try codeplex.com/urlrewriter it supports all the Apache mod_rewrite syntax and also supports Reverse Proxy.

Thanks but I need my own rewriter as our rewriting is quite custom. I'm also pretty confident the rewriting is working fine, it's just that static file requests are not working properly. – gilles27 Dec 2 '08 at 9:09.

So this (if time permits) will be the first of a series of migration notes that I discover as I move it to use ASP.NET Razor (aka WebPages). Do note that this is not meant to be a best practice in anyway, I would never claim I can make such a thing, these will be only my personal notes as I discover more details in ASP.NET WebPages features and as I move my own implementation to use them. So with that, one of the first things I faced during this migration, was the use of a Sitemap control (asp:SiteMapPath) in my MasterPage (future post about moving from MasterPages coming).

I knew about Sitemap API, so I just decided to write a simple Sitemap helper that I can now use anywhere in Razor. The code is pretty simple, it basically generates an unordered list of links using and with inside, and used CSS to layout them in a way that I liked.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions