我有一个asp.net网页应用程序,我希望它可以通过本地区域网络(LAN)或无线局域网(WLAN)访问。
我不知道从哪里开始。有没有一些配置需要我做才能让别人访问我的网页?
我非常感激您的回答,非常感谢。(^_^)…
我有一个asp.net网页应用程序,我希望它可以通过本地区域网络(LAN)或无线局域网(WLAN)访问。
我不知道从哪里开始。有没有一些配置需要我做才能让别人访问我的网页?
我非常感激您的回答,非常感谢。(^_^)…
I m not sure how stuck you are:
You must have a web server (Windows comes with one called IIS, but it may not be installed)
http://localhost/
in your browser and see what happens. If nothing happens it means that you may not have IIS installed. See Installing IISInstalling your application
Once you have done that, you can more or less just copy your application to C:inetpubwwwroot
. Read Installing ASP.NET Applications (IIS 6.0) for more information
Accessing the web site from another machine
In theory, once you have a web server running, and the application installed, you only need the IP address
of your web server to access the application.
To find your IP address try:
Start
-> Run
-> type cmd
(hit ENTER
) -> type ipconfig
(hit ENTER
)
Once
you can access your website from another machine in your LAN by just typing in the IP Address of you web server and the correct path to your application.
If you put your application in a directory called NewApp
, you will need to type something like http://your_ip_address/NewApp/default.aspx
Turn off your firewall
If you do have a firewall turn it off while you try connecting for the first time, you can sort that out later.
You may also need to enable the World Wide Web Service inbound firewall rule.
On Windows 7: Start -> Control Panel -> Windows Firewall -> Advanced Settings -> Inbound Rules
Find World Wide Web Services (HTTP Traffic-In)
in the list and select to enable the rule. Change is pretty much immediate.
You will need to configure you IIS (assuming this is the web server your are/will using) allowing access from WLAN/LAN to specific users (or anonymous). Allow IIS trought your firewall if you have one.
Your application won t need to be changed, that s just networking problems ans configuration you will have to face to allow acces only trought LAN and WLAN.
If you use IIS Express via Visual Studio instead of the builtin ASP.net host, you can achieve this.