How to access your website through LAN in ASP.NET [closed]
Solution 1:
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)
- Make sure you actually have IIS
installed! Try typing
http://localhost/
in your browser and see what happens. If nothing happens it means that you may not have IIS installed. See Installing IIS - Set up IIS How to set up your first IIS Web site
- You may even need to Install the .NET Framework (or your server will only serve static html pages, and not asp.net pages)
Installing your application
Once you have done that, you can more or less just copy your application to C:\inetpub\wwwroot
. 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 have the IP address AND
- IIS running AND
- the application is installed
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.
Solution 2:
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.
Solution 3:
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.