开发者

ASP app on a Win2k3 64-bit server - need a web.config in root?

开发者 https://www.devze.com 2023-03-18 15:55 出处:网络
I\'ve got a win2k3 serv开发者_运维百科er set up in 32-bit mode to run classic asp and asp.net 3.5.

I've got a win2k3 serv开发者_运维百科er set up in 32-bit mode to run classic asp and asp.net 3.5.

If i request the trace.axd file on the url to the classic site, it gives me a trace error and an unhandled exception in the log.

I've turned tracing off on the web.config and machine.config of the server, but haven't put anything in the classic asp root.

Do I need a web.config in there too to suppress the error?


If you have installed IIS Url Rewrite on you Server you can block the request with this web.config in the root of your asp classic app. This should stop the unhandled exception in the log.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="BlockTraceRequest" patternSyntax="ExactMatch" stopProcessing="true">
                    <match url="trace.axd" />
                    <action type="AbortRequest" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号