Browser Link In Visual Studio Is Not Working

4.5k Views Asked by At

I'm trying to launch my web application (asp.net MVC) with debugging mode using Browser Link To Enable Edit Operations during Browser

but actually when i try to do this (Browser Link Not Working and it ask me to register the page inspector in the Web.Config)

enter image description here


Edit

and when i add the following to web.config nothing Happens

<add key="VisualStudioDesignTime:Enabled" value="true" />
<add key="PageInspector:ServerCodeMappingSupport" value="Enabled"/>

still i can't see that any browser connect through Browser Link

with knowledge that I Have Enabled debug=true in web.config

<compilation debug="true" targetFramework="4.6" />

and knowing that i have uninstall web essentials Package

enter image description here

2

There are 2 best solutions below

3
On

Add the following in your web.config:

<appSettings>
    <add key="VisualStudioDesignTime:Enabled" value="true" />
    <add key="PageInspector:ServerCodeMappingSupport" value="Enabled"/>
 </appSettings>
0
On

I found this post very useful.

<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>

Take care in that the <modules> element might already exist.