ASP.NET调试重定向到无效的URL

时间:2012-11-15 21:57:05

标签: asp.net visual-studio-2010 debugging

我正在尝试调试我的应用程序,但是找不到正确的URL。

在Visual Studio 2010中单击F5(开始调试)后,我在系统托盘通知窗口中看到以下内容:

ASP.NET Development Server  
http://localhost:1392/zz

但是在打开的Chrome浏览器地址中,网址为:

http://www.localhost/zz/editad.aspx

我看到了一个通知: 哎呀! Google Chrome无法找到www.localhost

如果我手动将地址更改为

http://localhost:1392/zz 

它再次重定向到

http://www.localhost/zz/editad.aspx again

所以我似乎无法调试我的网站。

我的主持人使用以下网址运行:

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost
192.168.0.10    www.zorgbeurs.nl
192.168.0.10    zorgbeurs.nl

不确定是否重要,但在我的web.config中我有。 作为重写规则:

<rule name="edit ad">?/?
<match url="^account/edit-ad/([0-9]+)?/??(/[a-zA-Z0-9-]+)?$" />
<action type="Rewrite" url="editad.aspx?id={R:1}" />
</rule>

并防止未经授权的访问:

<location path="editad.aspx">
    <system.web>
        <authorization>
            <deny users="?" />
        </authorization>
    </system.web>
</location>

我能做些什么来调试?

0 个答案:

没有答案