2011-08-19 155 views
0

我有幾個url重寫規則在我的web.config中設置。它們是:無法在Web服務器上開始調試。無法啓動Asp.Net調試

<rewrite> 
     <rules> 

      <rule name="RedirectUserFriendlyURL1" stopProcessing="true"> 
       <match url="^(.*)\.aspx$"/> 
       <conditions> 
        <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true"/> 
        <add input="{QUERY_STRING}" pattern="^([^=&amp;]+)=([^=&amp;]+)$"/> 
       </conditions> 
       <action type="Redirect" url="{R:1}/{C:1}/{C:2}" appendQueryString="false"/> 
      </rule> 
      <rule name="RewriteUserFriendlyURL1" stopProcessing="true"> 
       <match url="^(.*)/([^/]+)/([^/]+)/?$"/> 
       <conditions> 
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> 
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> 
       </conditions> 
       <action type="Rewrite" url="{R:1}.aspx?{R:2}={R:3}"/> 
      </rule> 
      <rule name="RedirectUserFriendlyURL2" stopProcessing="true"> 
       <match url="^(.*)\.aspx$"/> 
       <conditions> 
        <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true"/> 
       </conditions> 
       <action type="Redirect" url="{R:1}" appendQueryString="false"/> 
      </rule> 
      <rule name="RewriteUserFriendlyURL2" stopProcessing="true"> 
       <match url="^(.*)$"/> 
       <conditions> 
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> 
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> 
       </conditions> 
       <action type="Rewrite" url="{R:1}.aspx"/> 
      </rule> 
     </rules> 
    </rewrite> 

所有這些作品很好,我相信它。但是,當我使用F5調試應用程序時,出現錯誤「無法在Web服務器上啓動調試,無法啓動Asp.Net調試。」不知道爲什麼會發生這種情況。如果我使用Ctrl + F5在釋放模式下運行它,它會很好地工作。有人可以告訴我爲什麼會發生這種情況?如果我只是刪除這些規則,然後F5它,它也可以。我試圖谷歌這個問題,並提出了一個鏈接。但它不爲我工作:

http://forums.asp.net/t/1649452.aspx/1

在上面的鏈接有人要求重新命名的形式以大寫字母開始小寫。挺滑稽的!並有人問改變項目類型使用.NET Framework 3.5的

回答

相關問題