file could not be found on localhost

G

Guest

I have just installed IIS on my XP machine, and created a folder in
inetpub/wwwroot with several asp and html files in, but when I go tohttp://localhost/foldername/filename, I just get 'File could not be
found'. What am I doing wrong?

*** Sent via Developersdexhttp://www.developersdex.com***

Is the web server running? What do you have when you navigate http://localhost
?
 
J

Juan T. Llibre

Create a virtual directory which points to drive:\inetpub\wwwroot\foldername, using the IIS Manager.
Open the IIS Manager, right-click the "Default Web Site", select "New", and then "Virtual Directory".

Name the virtual directory whatever you want to, point the virtual directory to the physical directory,
and call your files in the browser with:

http://localhost/whateveryounamedthevirtualdir/file.aspx
or
http://localhost/whateveryounamedthevirtualdir/file.html
or
http://localhost/whateveryounamedthevirtualdir/file.asp

If you configure a default document for the site, it will come up ( if the file exists ) with :

http://localhost/whateveryounamedthevirtualdir/
 
J

Juan T. Llibre

You tried... what ?

Is IIS running ?

Did you create a virtual directory ?
Did you run into problems creating a virtual directory ?

Did you create the virtual directory but the site doesn't run ?

What happened ? What is the error reported ?
 
G

Guest

In the status bar is ASP.NET Development Server - Port 1073, but when I
click on Start Debugging I get the error :

http://localhost.lbm-solution.com:1073/default.aspxurl could not be
retrieved

When trying to get to an ASP page, I get the error :

The page cannot be found

It cannot find your server.

If you develop a web application, you should specify the server. Go to
Project - <appname> Properties and check what you have under Servers.
I guess you specified Use Visual Studio development server and port
number is 1073. In this case http://localhost/ will not work, but
http://localhost:1073 should work.

I'm not sure why VS.NET server is pointing you to
http://localhost.lbm-solution.com:1073/default.aspx, try http://localhost:1073/
instead
 
M

Mike P

When I try http://localhost:1073/, it gets redirected to
http://localhost.lbm-solution.com:1073/default.aspx. This is what
happens run an ASP.NET app through VS 2005. Writing an ASP app using
Dreamweaver and then going to http://localhost/appname/pagename just
gets 'Page could not be found'.

I have never seen anything like this before, maybe I should
uninstall/reinstall all the relevant software? Although this would
still not explain why the ASP created in Dreamweaver or Notepad does not
work.
 
M

Mike P

Strangely, when I run VS 2005, it only gives me the option to Open or
Create a Project, and not a Website as it usually does...?
 
J

Juan T. Llibre

re:
!> Writing an ASP app using Dreamweaver and then going to
!> http://localhost/appname/pagename just gets 'Page could not be found'.

Is appname a virtual directory's name ?
As soon as you make appname a virtual directory, the file will be "found".

Dreamweaver doesn't create IIS applications.
You must create them with the IIS Manager.
 
G

Guest

When I tryhttp://localhost:1073/, it gets redirected tohttp://localhost.lbm-solution.com:1073/default.aspx. This is what
happens run an ASP.NET app through VS 2005. Writing an ASP app using
Dreamweaver and then going tohttp://localhost/appname/pagenamejust
gets 'Page could not be found'.

I have never seen anything like this before, maybe I should
uninstall/reinstall all the relevant software? Although this would
still not explain why the ASP created in Dreamweaver or Notepad does not
work.

Mike, I would recommend you to follow advice of Juan: go to IIS
(Control Panel - Administrative Tools) and check the settings of
default website. If it has been properly configured and started, you
should get default document (e.g. default.htm, or default.aspx from
your inetpub/wwwroot) when you type http://localhost in your web
browser. If it works, you can change settings of the web server in
VS.NET to run your site on IIS. If the site in IIS doesn't work, try
to find the reason, for example, look in the Event Log.
 
M

Mike P

Thanks guys for your help...it turned out that there were 2 components
for IIS that hadn't been installed, so once I had installed them I no
longer got this problem. Although on loading up VS2005, I still don't
have the option to create or amend a website, which is a bit strange.

Thanks,

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,057
Messages
2,570,443
Members
47,115
Latest member
DorothyLus

Latest Threads

Top