Andrej
Andrej

Reputation: 391

Set up ASP.NET web app on server and run on other computer in the network

I googled this a bit, but could't find anything useful.

I need to set up my ASP.NET web app on my server, but run it from another computer in the network.

How can I do this?

The idea is to have the files on the server and run the app by typing the ip adress of the server in the browser adress bar to run it. eg. 158.1.6.102/myApp.aspx

Any help is appriciated!

Thanks!

Andrej

Upvotes: 0

Views: 853

Answers (2)

immutabl
immutabl

Reputation: 6903

Steps:

a. Set up the site in IIS on your server. Make a note of the Host Name under the basic binding properties e.g. MyApp.local

b. Set this in your hosts file (%WINDIR%/system32/drivers/etc/hosts) on your workstation machine.

... MyApp.local 192.168.1.100 <use the IP Address of your Server /> ...

c. In the Properties sheet for your Web Application in Visual Studio (right-click the web project in Solution Explorer and get 'Properties') go to the 'Web' section and put a dot in the radiobutton that says 'Use Custom Web Server' and set the 'Server Url' field to http://MyApp.local (or whatever you put for step 1).

d. Build and Go/Debug!

hth

Upvotes: 1

Reza
Reza

Reputation: 426

you need to publish it on webserver (IIS) and then you can access it from another machine.

(assume that ip address of webserver is 192.168.0.1) http://192.168.0.1/webapplication

the most important is the windows firewall of webserver should allow access to another machine.

Upvotes: 1

Related Questions