开发者

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 serve开发者_如何学Pythonr 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


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜