简体   繁体   中英

IBM Worklight 6.0 - Launch Windows 8 App in Visual Studio sets a wrong WL Server IP Address

When I launch a Windows 8 app from Worklight 6.0 using Run->Visual Studio Project, the app is launched inside VS using 169.254 (linnl local block) Ip address regardless the correct IP I have used using the Build for Remote Server. Looking the generated html file inside Eclipse it looks correct, however when I launch it it gets a wrong ip address for some reason inside Visual Studio.

Here is the code snnipet with the wrong ip address

<script>
        // Define WL namespace.
        var WL = WL ? WL : {};
        /**
         * WLClient configuration variables.
         * Values are injected by the deployer that packs the gadget.
         */
        WL.StaticAppProps = {
   "APP_DISPLAY_NAME": "My App",
   "APP_ID": "cnu",
   "APP_SERVICES_URL": "http:\/\/169.254.80.80:9080\/cnu\/apps\/services\/",
   "APP_VERSION": "1.0",
   "ENVIRONMENT": "windowsphone8",
   "LOGIN_DISPLAY_TYPE": "embedded",
   "WORKLIGHT_PLATFORM_VERSION": "6.0.0",
   "WORKLIGHT_ROOT_URL": "http:\/\/169.254.80.80:9080\/myapp\/apps\/services\/api\/cnu\/windowsphone8\/"
};</script>

Am I doing something wrong ?

If it is overwriting the IP that you specified on build for Remote server when you launch into Visual Studio, then that's a problem. It ought to work the way you are trying.

One possible workaround is to not launch Visual Studio out of eclipse, but launch it from the Windows tiles page, and explicitly load the project in the Win8 native folder in your app.

Then whenever you switch back to Eclipse and do a build, upon returning to VS, it should notice that something changed and prompt you to reload the project.

I do this anyway, because the cycle time to build and test is shorter if you leave both eclipse and VS running.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM