I used notepad to create VB.NET code exactly as it is in a book,
then saved the file as TestWeb.aspx into C:\ASP.NET\TestWeb directory.
When I type http://localhost/ASP.NET/TestWeb/TestWeb.aspx, I get message

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: /ASP.NET/TestWeb/TestWeb.aspx

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
What is the problem?

9 Years
Discussion Span
Last Post by nikkiH

try http://localhost/TestWeb/default.aspx,),

if not then I think its an error with your IIS configuration

It still doesn't work. The code is: <html>
<script language="VB" runat="server">
Private Sub Page_load()
lblTest.Text = "Hello, the Page.Load event occured."
End Sub
<form id="Form" runat="server">
<asp:Label id="lblTest" runat="server" />

I did not make any configuration of IIS after installing it from Add/Remove Components/Add Windows Components.
So any IIS configurations are the default ones. Are there any configurations you can suggest I should make.


If you are not putting your code under C:\inetpub\wwwroot, then you need to tell IIS where to look for it. You appear to have put it in a normal directory. You can either make that a virtual directory in IIS, or move the whole thing under wwwroot.

I am a fan of virtual directories, personally.

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.