views:

406

answers:

2

Hello,

I installed windows 2008 server integrated iis 7.0

1 day ago, i use windows 2003 and iis 6.0

with windows 2008 server, everything is alright except one thing.

in 2003-iis6 i could use custom 404 pages to handle for url friendly sites. example i could set custom404.asp as custom 404 pages(execute url)

in 2008, i can't do it. when i set custom 404 page as /custom404.asp, nothing happens. in custom error pages it says this is for asp.net

how can i do it?

it's urgent :(

+1  A: 

On the "Error Pages" section in IIS manager select the "Edit Feature Settings..." under the Actions section. Ensure that "Custom error pages" is selected.

AnthonyWJones
+1  A: 

the webconfig file below fixed the problem. i share in case anyone needs

save the code as web.config and move it to main site folder

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors>
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" subStatusCode="-1" prefixLanguageFilePath="" path="/default.asp" responseMode="ExecuteURL" />
        </httpErrors>
     <rewrite>
        <rules>
            <rule name="MyURLCleaned" enabled="false" stopProcessing="true">
                <match url="^([^])+" />
                <conditions>
                    <add input="{REQUEST_FILENAME}" />

                </conditions>
                <action type="Rewrite" url="/default.asp?{R:0}" />
            </rule>
        </rules>
            <rewriteMaps>
                <rewriteMap name="static">
                </rewriteMap>
            </rewriteMaps>
    </rewrite>

    </system.webServer>
</configuration>
darkandcold
What part of this fixed it? The solution Anthony describes will modify Web.config according to the <httpErrors /> section. But then again, you have this rewrite rule stuff, which is new to IIS 7, so I want to know if maybe something with your rewrite rules was causing this.
thomask