41

I have an asp.net web-page application and i want it to be accessed using a local area network(LAN) or wireless area network(WLAN).

I do not know where to start. Is there something that i will configure in order for others to access my web-page??

I would really appreciate your answer, thanks a lot.. (^_^)...

4 Answers4

54

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)

  1. 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
  2. Set up IIS How to set up your first IIS Web site
  3. 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.

YektaDev
  • 438
  • 3
  • 11
  • 24
Ian G
  • 29,468
  • 21
  • 78
  • 92
  • but i need to publish or deploy my website first before coming up with http://your_ip_address/NewApp/default.aspx .,?? am i right.,?? how can i publish it.,??? –  Mar 14 '09 at 19:15
  • you can just copy and paste it to c:\inetpub\wwwroot\ then go to IIS and set it up as an application (try this one http://support.microsoft.com/kb/172138) – Ian G Mar 14 '09 at 20:17
  • by the way ., i have found out that my machine is using IIS 7., how can i create a virtuAL directory in it.,?? –  Mar 15 '09 at 00:05
  • try http://stackoverflow.com/questions/647484/how-to-create-a-virtual-directory-in-iis7-for-asp-net and http://msdn.microsoft.com/en-us/library/ms178477.aspx# – Ian G Mar 15 '09 at 10:18
  • I know this is an old thread, but make sure you have used "Add Windows Components" and added the Management Console too! Otherwise you won't even see it in your start menu. – bgmCoder Jun 25 '12 at 16:00
  • What if I want to publish the application to machines which are located on different LANs? Is it possible to publish for everyone from my local machine/IIS ? – user3751548 Jul 09 '19 at 13:55
32

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.

Mark
  • 1,884
  • 2
  • 25
  • 36
1

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.

MarmouCorp
  • 1,573
  • 10
  • 9
  • Not exactly. If you use an NTLM handshake for the request, then other users can even see the page through http://computer/site. If on simple LAN, you have the option of modifying your hosts file, create VPN, and more. A stage server will do you some justice as well., Out of the box, assuming the web site is localhost, this can be accomplished with just the IP address, and disable your firewall. I would say, imho, add the rules, but that's your call. All of this works really well, especially so if you begin using a self signed certificate. Firewall and security rules are the gotchas. – Anthony Mason Feb 14 '16 at 12:52
0

If you use IIS Express via Visual Studio instead of the builtin ASP.net host, you can achieve this.

Binding IIS Express to an IP Address

Community
  • 1
  • 1
David d C e Freitas
  • 7,481
  • 4
  • 58
  • 67