3 Replies Latest reply on Nov 23, 2015 7:57 AM by peterk45717876

    How To: Use Visual Studio, IIS Express, and Adobe Edge Inspect to view local projects

    CMosqueda

      You CAN view a Visual Studio project with Adobe Inspect. The work around takes a little bit of time.

      This involves using IIS Express to run your Visual Studio project, which is mainly a setting in Visual Studio, a Firewall change, a few command line and IIS Express config change.  It isn't actually all that bad, but will make your life A LOT easier.

       

      Here are the steps. (Note these are steps I used for Visual Studio 2012 and your project is part of a solution project.  Windows 7 or Windows 8)

       

      1. If IIS in not turned on, turn it on.How to: Enable Internet Information Services (IIS) - this should install IIS Express as well.

       

      2. In Visual Studio, find the port that Visual Studio will be using for your project by Running your web project (Debug), and note/write down/save the port number that shows up in the browser when the project launches. (ex.  http://localhost:12345)

       

      3. Add a NetShare Reservation (process for this will be different for Windows XP)

      Go to your Command Line (CMD) in Windows and in c:\Windows\system32> type in
      netsh http add urlacl url=http://yourIPaddress:yourPortNumber user=everyone
      (ex. netsh add urlacl url=http://12.34.56.78:12345 user=everyone)

      Hit Enter key. You should be a successful add reservation message

       

      3. Go to your Windows Explorer (File system) and go to c:/Users/YourName/MyDocuments (or Documents)/IISExpress/config/ and open 'applicationhost.config'

      In the 'applicationhost.config' file find your site in the <sites> section.
      Example:

      <sites>

      <site name="WebSite1" id="1" serverAutoStart="true">

                      <application path="/">

                          <virtualDirectory path="/" physicalPath="C:\MyProjects\TestSite" />

                      </application>

                      <bindings>

                          <binding protocol="http" bindingInformation=":12345:localhost" />

                      </bindings>

                  </site>

      </sites>

       

      In this section ADD 2 new lines to the <bindings> section. Note add your own IP address and your own Computer Name

      <binding protocol="http" bindingInformation="*:12345:12.34.56.78" />

      <binding protocol="http" bindingInformation=":12345:MyComputerName" />

       

      Save the config file.

       

      4. Open up your Windows Firewall and go to 'Advanced Settings'. Here you want to create an Inbound Rule.

      Right click on Inbound Rule and select New Rule

      - Rule Type select 'Custom'
      - Program leave this
      - Protocol and Ports > Protocol Type select 'TCP' then Local Port select 'Specific Port' and fill in the port number you got from VS.  Leave Remote Port alone.
      - Scope
      There are a few ways of doing this. Typically you would go the the Remote IP address and select 'These IP addresses: and select ADD > select 'Predefined set of computers' and choose Local Subnet.  IF this does not work leave Remote IP addresses > Any IP address option selected instead.

      - Action leave this

      - Profile select Domain and Private

      - Name put IISExpressWeb for the name

      Select 'Finish'

       

      5. Go to Visual Studio. (Note if you have multiple projects in your solution, choose your start up project. Right click on your project in Solution Explorer in VS and select 'Set as Start Up Project' )
      Right click on your start up project again and you should see an option to 'Use IISExpress'

       

      In the DEBUG dropdown (from the main menu bar at the top) select 'YourProjectName Properties'. Mine was the last one in the list with a wrench icon next to it.
      This should open an new tab in your project, You should see a left hand list of option and a right hand column of options.
      In the left column select 'Web' and in this tab select Use Local IIS Web server and select 'Use IIS Express' and type in your IP Address and port number (same as before) in the Project Url text box.

       

       

      VSWebScreen.png

       

      Save.

       

      NOW, you should be able to run your project in Visual Studio and use Adobe Edge Inspect on your device and view new results in Chrome. You can develop from there.

      If you still can not see it working, please be sure your device is on the same SubNet or Wireless network as your computer.  If you are in a large network but the domains can still see each other, the Firewall Setting detailed above to allow Any IP Address in your Scope section.