I’m going to try something: Posting a project to my blog.
I rarely trust posts with snippets in which they try to guide you to do something you’re trying to learn. Most of times you end up with a mess, a project that doesn’t work and you being frustrated and feeling silly.
I don’t want you feel that way! So I’m posting a ZIP file with the whole project
download it here! http://www.mediafire.com/?3dzd55c9z6n2a88
I will try to explain the current challenges I have found in my next post! Stay tuned!
- Start Visual Studio as Administrator. Important.
- Open the solution file.
- Right click the solution and choose Startup projects. Sort them. The server should start first! The action for both should be “Start”.
- Run the project. It will throw an exception because we have to configure the IIS Express. You have to run the project for the required configuration to be auto created in the configuration folder (next steps!).
- Disable your firewall
- Go to the folder “C:\Users\[YourUsername]\Documents\IISExpress\config” and open the file applicationhost.config
- Go to the section <sites> and locate the one that says <site name=”ChorriServer…>
- In the <bindings> section of the site you should copy the existing binding a copy it below.
- Replace “localhost” with the IP of the machine you are debuging into.
- It should remain like this:
- In this case, my IP is 192.168.1.182 (a private IP in my local network).
- Choose to debug the Windows Phone with the emulator. If you choose a real device, make sure the development machine and the device are in the same network.
- Run the project again and with a bit of luck, you are done
Try it and tell if if it does!
You should see a browser window that complaints about something, BUT the important thing is the Windows Phone Application that runs (in the emulator).
Click the button “Retrieve orders” and a list of n elements with some random data will be brought to you from the server! If you press it again, the data is taken again. That’s all! It client receives the data from the server. Silly, uh?
You should have seen the hard time I had trying to figure how to do it, hahaha.