Freitag, 5. Juni 2015

Debugging azure mobile service locally with IIS express and android / IOS simulator or device

I had a lot of problems getting this to work so i thought i could share the solution.

1. First find out your local ip with ipconfig.

2. Open C:\Users\<your profile name>\Documents\IISExpress\config\applicationhost.config
Add/Change this part of code to add a port binding: 

<site name="todolist_Service" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="C:\Archive\GetStartedDataWP8\C#\todolist_Service" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:58203:localhost" />
        <binding protocol="http" bindingInformation="*:58203:192.168.137.72" />
    </bindings>
</site>

3. Very important: Start Visual studio as admin. Otherwise it can't create the binding.
4. Use your ip and port as connection string for your MobileServiceClient.
5. Try to access this url from your mobile broswer to see ti it works. It should show the blue azure screen with the :).
6. (Optional) If it still does not work try
- disabling your firewall
- Add netsh http add urlacl url=http://ip:port/ user=everyone (Or "Jeder" if you are on a german mashine as i was...)




Keine Kommentare:

Kommentar veröffentlichen