[英]Browser Link In Visual Studio Is Not Working
我正在嘗試使用瀏覽器鏈接以調試模式啟動我的 Web 應用程序 (asp.net MVC) 以在瀏覽器期間啟用編輯操作
但實際上當我嘗試這樣做時(瀏覽器鏈接不起作用,它要求我在 Web.Config 中注冊頁面檢查器)
編輯
當我將以下內容添加到 web.config 時,什么也沒有發生
<add key="VisualStudioDesignTime:Enabled" value="true" />
<add key="PageInspector:ServerCodeMappingSupport" value="Enabled"/>
我仍然看不到任何瀏覽器通過瀏覽器鏈接連接
知道我在 web.config 中啟用了debug=true
<compilation debug="true" targetFramework="4.6" />
並且知道我已經卸載了 Web Essentials 包
在您的 web.config 中添加以下內容:
<appSettings>
<add key="VisualStudioDesignTime:Enabled" value="true" />
<add key="PageInspector:ServerCodeMappingSupport" value="Enabled"/>
</appSettings>
我發現這篇文章非常有用。
<system.webServer>
<handlers>
<add name="Browser Link for HTML" path="*.html" verb="*"
type="System.Web.StaticFileHandler, System.Web, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
resourceType="File" preCondition="integratedMode" />
</handlers>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
請注意<modules>
元素可能已經存在。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.