locked
how to include local web page(which runs in another web server in current local machine) with iframe tag RRS feed

  • Question

  • Hi,

       My scenario is that, I want to test a local web html page which runs in Tomcat web server(whatever Tomcat or IIS, they are same), and I use iframe tag as below:

    <section class="contentsection">   

             <div class="content">   

                 <iframe src="http://info.fredserver.net/TestServer/sugarsync.html" width="100%" height="100%"> 

               </div>    

    </section>

    "info.fredserver.net" is a visual relam name which maps to current WLAN IP, and

    I can open "http://info.fredserver.net/TestServer/sugarsync.html" page in Metro IE 10 & IE 10, but when I run in my metro style application there is an error: 

    APPHOST9613: The App Host was unable to navigate to http://info.fredserver.net/TestServer/sugarsync.html due to the following error: RESOURCE_NOT_FOUND.

    I don't know why and how to test my local web page in iframe tag, thank you.

    Wednesday, June 13, 2012 6:28 AM

Answers

  • You can enable local loopback for debugging purposes like so:

    1. In Visual Studio, open your project's property pages.
    2. Select the debugging page.
    3. Set Allow Local Network Loopback to Yes.

    Loopback is not allowed for metro apps by default. Changing this VS setting allows you to dev your metro app and web-app on the same machine (for convenience and debugging). When your app is deployed as a "release" version it will not be able to hit loopback addresses (the idea is that you would have the app hit some public external endpoint).

    • Proposed as answer by Bryan Thomas Wednesday, June 13, 2012 6:08 PM
    • Marked as answer by Dino He Tuesday, June 19, 2012 9:08 AM
    Wednesday, June 13, 2012 6:08 PM

All replies

  • You can enable local loopback for debugging purposes like so:

    1. In Visual Studio, open your project's property pages.
    2. Select the debugging page.
    3. Set Allow Local Network Loopback to Yes.

    Loopback is not allowed for metro apps by default. Changing this VS setting allows you to dev your metro app and web-app on the same machine (for convenience and debugging). When your app is deployed as a "release" version it will not be able to hit loopback addresses (the idea is that you would have the app hit some public external endpoint).

    • Proposed as answer by Bryan Thomas Wednesday, June 13, 2012 6:08 PM
    • Marked as answer by Dino He Tuesday, June 19, 2012 9:08 AM
    Wednesday, June 13, 2012 6:08 PM
  • Hi, Bryan

       Thank you for your answer.

       Unfortunately, I donot find the "Allow Local Network Loopback" in my project property page in VS11 Beta,  windows Metro Style Javascript project.


    • Edited by fredrain Thursday, June 14, 2012 8:02 AM
    Thursday, June 14, 2012 8:00 AM
  • You need to upgrade to the Release Candidate for this functionality.


    Jeff Sanders (MSFT)

    Thursday, June 14, 2012 5:22 PM
    Moderator