views:

23

answers:

3

Hopefully I am just overlooking something incredibly simple, if so I apologize....

I have an ASP.NET application in .NET4 and we're trying to use URL rewriting using

<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule....>

For some reason intellisense is returning an error which says that <rewrite> is not a valid child element of <system.webserver>

When I build it and run it, it says something akin to "Error at line 0 in web.config"

If I remove all the <rewrite> lines it works properly (but of course no rewriting)

Is there a switch I need to flip on or something? It has to be something I'm stupidly overlooking....

Thanks

A: 

Did you make sure you're targeting Framework 4.0?

<compilation targetFramework="4.0"/>
Keith
yep, still no dice
Matthew PK
Have you installed URL Rewrite for IIS7? http://weblogs.asp.net/scottgu/archive/2010/04/20/tip-trick-fix-common-seo-problems-using-the-url-rewrite-extension.aspx
Keith
Sorry looks like you were already asked this. I would just start pulling out one level of xml at a time until the error goes away (i.e. does the error still occur if you have a blank <rewrite /> node?
Keith
A: 

Do you have URL Rewrite module installed on your IIS?

rarouš
It is, but will have nothing to do with the VS error
Matthew PK