Alex Gordon
Alex Gordon

Reputation: 60871

publishing asp.net application to the internet

i have a web app that runs locally on our network. the way users access it is by going to myserver:80/site/default.aspx

i reconfigured the settings to display the website to the internet.

the way i am accessing it now is:

ipaddress/site/default.aspx

and getting the following error:

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /site/default.aspx

so it seems as if it does see the site, but the site does not want to grant access?

what am i doing wrong?

edit if the consensus is that it doesnt actually see the webpage. then again i would like to know what i am doing wrong

Upvotes: 0

Views: 1056

Answers (3)

ChrisLively
ChrisLively

Reputation: 88082

You need to edit the host header bindings in IIS for your website.

If you are really on IIS 5.1 (which ONLY shipped with Windows XP Pro) then do the following:

  1. Open your IIS Manager (go to start > run > inetmgr).
  2. Expand the computer name.
  3. Expand websites.
  4. Right click on the site name
  5. Go to the Website tab
  6. Click on the Advanced button
  7. In the "multiple identities for this web site" click the Add button
  8. Set the IP address. Leave the Host Header Value blank
  9. Click Ok

At this point there should be 2 identities listed. One that maps the DNS name to the IP address and another that only has the IP address.

IF for some reason it warns you about duplicate bindings, go to the other sites and remove any that tie the IP address to a blank host header. Then come back to this site and set up the blank configuration.

Upvotes: 1

Asif Mukhida
Asif Mukhida

Reputation: 142

In normal case if you are hosting your site in IIS and if you are having your IP fix you can also browse your website through your local ip in your network by address by keeping your 'ipaddress' in place of 'localhost'. Now if you wants to access it from your global ip you need to add binding to the IIS and then it will respond to all the requests.

So in your particular case you need to add binding with your IP (check it from whatismyip.com). Go to IIS -> Sites -> Default Web Site. On right hand side column you will get bindings. Add new binding in it.

Upvotes: 1

John Pick
John Pick

Reputation: 5650

When moving from Visual Studio's built-in web server to IIS, often you need to simply remove the top level directory form the URL:

ipaddress/default.aspx

or simply

ipaddress

if default.aspx really is a default.

Upvotes: 1

Related Questions