How do I get the Emulator on the same network as m

2020-04-07 18:52发布

I've created some Web API methods in .NET 4 / Visual Studio 2010 (and have now ported it to VS 2013 RC).

I want to consume them from a Windows CE / Compact Framework app using RestSharp.

Regardless of how I call these methods, though, I need to know the IP Address to use for the app running the Web API methods. I can access it from a browser using "localhost" and the port number Visual Studio displays when running the View for the Web API project in the browser (works fine, returns XML in Chrome).

But: how can I call it from my Windows CE / Compact Framework app? The emulator in which I run it doesn't believe that it and localhost are really on the same machine, so I can't use that, nor the machine's actual IP address as, again, it is delusional about who/where it is.

So: what is the workaround? How can I test this?

More details about this can be seen here: RFC on HttpWebRequest vs RESTSharp from Windows CE / Compact Framework 3.5

UPDATE

Vasily, my guess was that you meant for me to do this:

enter image description here

...but that led to this:

enter image description here

Note: I get the same when I choose the other option from the dropdown asociated with the "Enable NE2000 PCMCIA network adapter and bind to:" czechbox, namely "Intel(R) 82579LM Gigabit Network Connection".

And trying to install http://go.microsoft.com/fwlink/?linkid=46859 (both the 64-bit and the 32-bit flavors) slapped me with:

enter image description here

So tell me, I implore: Is there balm in Gilead, so that there may be joy in Mudville tonight?

UPDATE 2

In step 6 (bullet 6), I did this:

enter image description here

...which got me first a message that the software didn't install correctly, with the option to retry or assert that, no, everything is really fine (I chose the latter), but then this:

enter image description here

...IOW, I don't make it to step/bullet point 7

Then again, this Peek cat did warn, "Note that this is very much a “works on my machine” experience. If it burns your house down, don’t hold me responsible."

My house didn't burn down (I don't think - I'm not there right now), but the process to extract the file did fail ignominiously.

2条回答
甜甜的少女心
2楼-- · 2020-04-07 19:31

This was helpful for me:

Windows Virtual PC and the Microsoft Device Emulator

I've had to use it more than a couple of times.

I saved the file as a PDF to my network folder, so it took me a while to find the link.

查看更多
Root(大扎)
3楼-- · 2020-04-07 19:36

You can use workstation network card by the emulator. Todo it you have to select "Use installed network card" checkbox and select the card from the list. after that you can use the workstation ip.

查看更多
登录 后发表回答