views:

195

answers:

4

I'm running Win7x64 Ultimate with Visual Studio 2008. I have a website built in ASP.NET 3.5 and hosted via IIS on my box. I can run the website perfectly fine and I can hit all of the web services that I have built in the website, using a web browser.

When I pull up my Windows Mobile 6 emulator and hit the site (using my IP address) it always returns a 404 error.

I have the emulator cradled w/ Device Emulator Manager and I can interact with the emulated device normally. I am also able to get out to google.com and other websites w/ the emulated device.

I have also verified that the emulator is hitting my box by stopping the IIS website and seeing that the WinMo emulator cannot get any response. Then when I start the site again, I get a 404 error.

When I pull up my site on my local dev box via FireFox or IE using the IP address it works perfectly fine.

The worst part is this worked perfectly fine a few weeks ago, when I used it last. I don't know that I've changed anything since then - I'm just trying to use the emulator to hit my site again.

Help?!

Update: my http requests comign from the WinMo emulator are not getting logged in the IIS log files, while my requests from FireFox on my local box are getting logged. Not sure if that helps in figuring out the problem...

Update 2: I can use the ruby Webbrick server on my local box and hit that server from my emulator just fine. is in IIS not allowing me to hit the IIS site from the emu?

UPdate 3: I cradled an actual WinMo device to my box with it's networking turned off and was able to hit the IIS site just fine. that makes me think it's something set up wrong in the emulator.

A: 

Just and idea: Does it have anything to do with the Firewall settings?

Donn Felker
doesn't seem to be the firewall. i turned windows firewall off and still get the same 404 problem.
Derick Bailey
A: 

Derick I faced the same problem recently; here's what worked for me.

Download TcpTrace from here

Start Tcptrace, and it'll pop up a dialog and by default try to redirect traffic from port 8080 to port 80. Click Ok

Now try hitting the web service again using the emulator, and make sure you are using IP addresses instead of localhost.

Update: Finally solved this issue on my system. Had to open up port 80 to the emulator. See http://dotnetsurfers.com/blog/2010/06/06/connecting-to-a-local-resourceservice-from-the-smart-device-emulator-in-visual-studio/

Latish
here's the direct download link for tcptrace http://www.pocketsoap.com/tcptrace/tcpTrace081.zip
Latish
using TCPTrace to redirect from 8080 to 80 allowed the emulator to hit the site correctly. this is very strange. what does that mean and how do i fix it?
Derick Bailey
TBH, I never dug into the core issue since that seemed to solve the problem for me. Sorry man.P.S Also Under Start->Settings->Connections->Connections->Advanced->Select Networks, make sure you select "My Work Network" in both.
Latish
i got this to work as a workaround... i still want a solution, though.
Derick Bailey
A: 

Try using the public IP assigned to your box not a local IP....if possible. It might be a routing problem since your phone emulator is probably running from the same computer as your web service.

Also, check the .NET framework you are running on IIS... if 4 try changing it to 2 and try it again.

Ricardo
A: 

Some things to try:

1) Try hitting a different site from WinMo 2) Try creating a new virtual directory in IIS which doesn't use ASP.NET, put an HTML page in there and see if you can hit it 3) Since I know you are a Rails guy too, try starting up Webrick and see if you can hit that from your WinMo device 4) Check your IIS logs to see if the request is even making it to your IIS box 5) Copy your ASP.NET project to a different box and hit that. If you can't, use something like Wireshark to trace the traffic and see what request it's making.

Cory Foy