views:

443

answers:

3

I would like to test my web app in other browsers. I have installed Virtual PC to do just that. the ASP.NET development server does not allow remote connections so the virtual pc (another computer on the network) cannot access the website.

I found this post that was started but there was no solution.

I understand that using localhost will not work. I heard about using the machines ip, but how do I get that correct ip? Look at my lynksys router admin?

If I were to get as far as getting my IP, im sure that the asp.net dev server does not allow remote connections. How do I enable it to do so?

A: 

Open a command prompt and type; "ipconfig" this will give you your machines IP address.

If you disable your firewall (for the asp.net dev port at least) you should be able to type into the virtual PC's browser http://192.168.1.3:3243/default.aspx

Dead account
This doesn't work. It's not that simple. The Development Server is designed to accept only connection from the same machine.
splattne
+3  A: 

I'm making some guesses about your setup here so bear with:

If your virtual machine is XP Professional, Vista Businesss or Windows 7 Business or better than you should be able to run IIS locally on the development machine and access that webserver from another machine which is on the same network via the virtual machine's name.

Likewise, if you're doing development on a real machine and would like to use different virtual machines to access the web application, you should make sure that you have IIS installed, create a new website in IIS and you should be to browse to the web application via machine name from your virtual machines.

Either way, don't try to use the builtin web server from Visual Studio, just publish your site to IIS and work with it that way.

Good luck and hope this helps some.

Chris
A: 

The answer is: no(*). You cannot access the ASP.NET Development Server on one machine from another, even if you open the Windows firewall TCP port.

From the MSDN article "Web Servers in Visual Web Developer":

It is specifically built to serve, or run, ASP.NET Web pages under the local host scenario (browsing from the same computer as the Web server).

In other words, the ASP.NET Development Server will serve pages to browser requests on the local computer. It will not serve pages to another computer. Additionally, it will not serve files that are outside of the application scope.

(*) You'll have to run your site from your locally installed IIS... or do the nice hack using some freeware described in this blog post:

iPhone Accessing the Visual Studio ASP.NET Development Server

Use SPI Port Forward to accept the device connections do the following:

Set "Local port" to the port number the device will connect on, I usually use 8080 out of habit
Set "Remote host" to localhost
Set "Remote port" to the ASP.NET Dev Server Port

Click the "Activate" button to start accepting connections

splattne