Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing ASP.NET Development Server from another pc on the network

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?

like image 492
Paul Knopf Avatar asked Nov 13 '09 16:11

Paul Knopf


People also ask

How do I access localhost API from another computer on the same network?

Provided both machines are in the same workgroup, open cmd.exe on the machine you want to connect to, type ipconfig , and note the IP at the IPv4 Address line. E.g http://192.168.0.1:80 if your site runs on port 80. That should do it.

Which Web server is used to run ASP.NET programs?

ASP.NET Core ships with Kestrel server, which is the default, cross-platform HTTP server. ASP.NET Core ships with Kestrel server, which is the default, cross-platform HTTP server.

Is ASP.NET an application server?

ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stands for Active Server Pages Network Enabled Technologies.


1 Answers

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

(note: make sure you've started the program with admin rights)

like image 169
splattne Avatar answered Sep 22 '22 05:09

splattne