angularJs中trace.axd的自定义路由

时间:2018-11-28 07:32:30

标签: c# .net angularjs asp.net-mvc

我使用$ routeProvider进行路由。样品在下面

 $routeProvider.
                when("/home", {
                    templateUrl: "/src/home.html,
                    controller: 'home',
                })

我的url格式如localhost:1145 /#/ home-一切正常,直到这里。 像<trace enabled="false" />

这样的跟踪被禁用

如果某个类型键入localhost:1145 / trace.axd,则显示默认跟踪错误页面,如下所示。 如果某些类型为localhot,如何重定向到错误页面:1145 / trace.axd

Server Error in '/' Application.

Trace Error
Description: The current trace settings prevent trace.axd from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. 

Details: To enable trace.axd to be viewable on remote machines, please create a <trace> tag within the configuration file located in the root directory of the current web application. This <trace> tag should then have its "localOnly" attribute set to "false".


    <configuration>
        <system.web>
            <trace localOnly="false"/>
        </system.web>
    </configuration

0 个答案:

没有答案