Click here to Skip to main content
15,899,825 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have an error on running my application.
And I tried it as a virtual directory also. Both of them give me the same error (with the one exception of the URL):



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.



Thanks in advance
Ramya:)
Posted
Comments
OriginalGriff 20-Jul-11 4:11am    
That still tells us nothing useful.
What line of code is it complaining about?
Use the "Improve question" widget to edit your question and provide better information.
Smithers-Jones 20-Jul-11 12:17pm    
Repost. You posted the same as a fake solution to your last "question".

1 solution

404 just means your web server cannot find the requested resource. Most probably the path to the aspx page is incorrect, you need to check that. In general, for a normal ASP.NET app:

HTML
http://server/directories/page.aspx


Where server is the name or IP address of the server, most likey localhost. If you are running with ASP.Net Development Server (a balloon will pop up, this will give you a port number (e.g. 4907) in which case server would be localhost:4907. This is randomly assigned so I can't tell you what it is.

Page is the name of the page you want probably default

Directories follow the directory structure of the app. If your document is in root you can just leave this blank and remove and double forward slashes.

Your required url is most likely to be:

HTML
http://localhost:4907/Default.aspx


Where 4907 needs to be replaced with your port number.

Without more information it is hard to give a specific answer. One thing you can do is to right-click the web project and set that as the startup project, then right-click the page you want to display and set it as the default page. Running the application should then work.

One final thing, I've had problems with Visual Studio not serving up pages in the past. After I eliminated the possibility of an incorrect URL as a reason, a machine re-boot fixed the problem.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900