How to make an ASP application available over an Intranet - asp.net

I've created a copy of our legacy, (decrepit) homegrown Timesheet ASP application on to a different, newer workstation for backup purposes.
I've finally got it to the point where I can run it locally over http, using this address:
http://localhost/timesheet/Timesheet.asp
I would like to test it over the network with an address like this:
http://backupServerHostname/timesheet/Timesheet.asp
The live application uses a similar addressing scheme. I'm just not clear on what needs to be done to make this application available from the new server.

You'll want to ensure that backup server isn't using windows firewall or something to block port 80 access. Also you may run into permissions issues if your asp app isn't set to allow anonymous access (assuming you want that).

Goto the folder where the Timesheet web stuff lives (could be C:\Inetpub\wwwroot\TimeSheet, just a guess).
Then Right-Click on the folder, select "Properties", then click the "Web Sharing" tab, then select "Share This Folder" option, this should bring up an "Edit Alias" window. Change the alias to "backupServerHostName".
This is assuming all the machines on on the same LAN.

Nothing needs to be done. If it is serving localhost on Port 80, it should serve other computers on your local network using a name similar to the one you gave. It may literally be as easy as just trying it...

If you just need to browse to it from other machines at work, just replace the "localhost" part with your machine name.
If you need it accessible over the net, you need to install it with IIS on an outward-facing server, and then browse to it that way.

Related

Host ASP.Net MVC Site

I've created a site using ASP.Net MVC that is meant to be stored on a local machine at my place of work. The intention is to have the site stored on this machine, but then accessible by all the other machines within this building.
I've followed Microsoft's tutorial as well as Code Project's tutorial, but I am not having very much luck. The binding is just the localhost, port 80, with * for the IP address. The URL is localhost/GrantTracker.
I've opened the ports within the firewall, checked the permissions on the directory (which is just within wwwroot), tried having the site take the place of the default IIS site (as Microsoft tutorial has you do) and tried having the site stand on its own with its own port (per Code Projects tutorial).
On the host machine I am receiving the standard "This site can't be reached, localhost refused to connect" which feels like either a port or permissions problem. I must be missing a step, but I can't seem to find what it would be. I am new to hosting sites through IIS so forgive me if I am just missing something basic.
I find it a bit strange too because my project uses Windows Authentication and when the site is first visited it performs that initial check with the user, authenticates, but then throws me the error.
Anyone have any ideas? Thanks in advance.
start simple,
create a simple html page, create an IIS application for it, on port 80.
Check and make sure you can see that page from another computer using the internal IP address of the the host machine so something like:
http:\\192.168.0.3\hostapp\test.html .
You can see the proper URL by running it from IIS, this will give you the entire URL you need, with localhost then just replace localhost with the IP address of the host machine to see it on other machines.
Do this in the original IIS folder so you don't encounter any folder permission issues. If you choose another folder you'll have to give access to the Network Service user ( i think, can't remember now, but there is a specific user that needs access to the folder where the website is deployed )
if you can see the page then deploy a proper website and do the same thing. Make sure the app pool is created correctly and it's up and running, then access it again on other computers and it should work.
Port 80 should be open by default so that should not be an issue.

IIS7 and Classic ASP and Applications and Paths

I yesterday received a zip file containing an old asp site from 2005. Its came in a folder called ivx.
I've unzipped ivx to c:\inetpub\wwwroot and then created an application in IIS called ivxapp and pointed it to c:\inetpub\wwwroot\ivx. Now when I type http://localhost/ivxapp, I am able to access the index page.
My problem is, whoever designed that site, designed it when IIS5 or IIS6 was around. He's used paths like more... which leads to http://localhost/new_posts.asp and not http://localhost/imagevertex/new_posts.asp
The whole site is some 21000 lines of code and contains many many references like this. Then comes the problem with <!--#include virtual = "/common/adminverify.asp" -->
Instead of having to manually edit the entire code, do you know a way to get things going?
This site worked perfectly well on a production server. Right now it's on my local machine on Windows 7 64 home premium.
Yes, you need to give this site a root-URL of its own, and not run it in a subdirectory of your localhost.
This is more of a web-administration question, but what you need to do is either run it under "localhost" directly, or add a domain-name to your network to run this site under.
The easiest for you right now is probably the first option.
If you aren't running a different site under localhost already:
Go to the IIS manager and click the 'localhost' site. On the right side of the IIS interface you can change the basic settings. Point the physical path to the ivx directory. You can reach the site directly on http://localhost.
If you are already running a site under localhost you need to keep:
Now, if you -are- already running a site on your localhost, the second easiest option is to run the ivx site under localhost, but on a different port. To accomplish that, click on the current ivx site in IIS, change the path in the same way as descibed above, and after that click on "bindings" in IIS, and change the PORT for the ivx site to something other than 80, for example 81.
The ivx site will then run on http://localhost:81, your current localhost will still run on http://localhost.
The hard way: adding a host to your network or PC:
The last option is to add a new hostname for the site to your network. You can add an A-record in your DNS for the ip-address of your server or add a host name to your HOSTS file in Windows on your server ("server" in the sense of the machine that runs the site, which can also be your local machine)
You can add a made-up name to the ip-address of the server, and in IIS' bindings add that name under "host name". this way you can run two different sites on the same machine, the "host name" seeting in IIS will make sure that calls to that specific hostname will reach the correct site. Adding it to the DNS of your network, or the HOST file in Windows will make sure the name is resolved to the correct machine (your webserver).
This last option is a little tricky of you've never done something like this before, but the first option works just as well.
Good luck!
Erik

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
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.

What do I need to publish my ASP.Net application to a URL locally?

I don't want to pay for a domain, but simulate a url exists, something like 'www.myapplication.app'. Is this possible?
I'm guessing I need to configure some thing with IIS7 or something right?
This is for a college course and instead of just doing the bare minimum I'd like to make something very nice to show.
I realize this question might be broad but any links would be great. :) Especially if it starts from the beginning of IIS configuration.
My ultimate plan is to have a Windows Server 2008 on a Virtual Machine and publish it there, is it possible?
c:\windows\system32\drivers\etc\hosts
In this file you can mimic domains, for example you would put:
127.0.0.1 www.myapplication.com
Where 127.0.0.1 is always referring to you locally (== localhost)
Added obvious step:
You then create an application in IIS where you use this domain in the HostName of the application. You then can acccess your own domain from your browser.

Run ASP.NET application as Default Web Site on dev machine

I am trying to run my ASP.NET Web Application Project in my Local IIS Web Server instead of using the Visual Studio Development Server. It seems to only allow me to run my application in a Virtual Directory off of the Default Web Site. However, I would like to run the application in the root of the Default Web Site itself.
I go into the properties of my project, go to the Web tab, click the User Local IIS Web server radio box, and change the Project URL to http://localhost/. However, when I attempt to save, it tells me I need to configure the Virtual Directory, although I am not using a Virtual Directory.
Has anybody made this work before? Thanks!!
It sounds like localhost port 80 is already in use.
IIS creates a default web site that listens on localhost port 80. Have you disabled that before trying to add yours?
Another approach is to have your site listen on a different port, 81 for example.
So far I used a Post-Build event to copy the contents of my project to c:\inetpub\wwwroot\ and I set the Start Action's Start URL to http://localhost/. Not very elegant, but it gets the job done. I would love for somebody to include a more elegant solution.

Resources