ASP.NET not processing CSharp code

C

CSDunn

Hello,
I'm having a problem with ASP.NET using IIS 5.1 on a Windows XP Pro machine.
ASP.NET will not process the following code:
*******************************
<html>
<head>
</head>
<body>
<form method= "post" runat="server">
<asp:Label id=lblHelloWorld text="HelloWorld" runat=Server />
<br>
<asp:Button onclick=ClickedIt text="Submit" runat=server />
</form>
</body>
<script Language=C# runat=Server>
void ClickedIt (Object sender, System.EventArgs e)
{
lblHelloWorld.Text = ".NET Rules!";
}
</Script>
</html>
******************************
This code is in a page called HelloWorld.aspx, and the expressed address bar
syntax of the IE 6.0 browser is localhost/HelloWorld.aspx. The file is
located at C:\InetPub\wwroot, which is configured as the the local path in
the properties of the default web site. When I attempt to render this page
in the browser, the page comes up blank. After attempting to render the
page, View\Source shows the code exactly as it appears above.

I experienced a similar problem with IIS 5.1 on a Windows 2000 Pro box. The
difference was that when I tried to render the page in the same type and
version of browser, I got the following message:

"Server Application Unavailable

The web application you are attempting to access on this web server is
currently unavailable. Please hit the "Refresh" button in your web browser
to retry your request.

Administrator Note: An error message detailing the cause of this specific
request failure can be found in the application event log of the web server.
Please review this log entry to discover what caused this error to occur."

The application log did not show any events. On the 2000 box, I went to the
properties of the default web site, on the Home Directory tab, and saw that
there was no 'Application Name'. I clicked the 'Create' button and created
'Default Application'. After I did this, the page worked fine, and
View/Source showed the following code:
***********************************
<html>
<head>
</head>
<body>
<form name="_ctl0" method="post" action="helloworld.aspx" id="_ctl0">
<input type="hidden" name="__VIEWSTATE"
value="dDwtOTUxOTE4ODcwOzs++2ZLq58Ul7wMXQDdnnhWV0I67IQ=" />

<span id="lblHelloWorld">HelloWorld</span>
<br>
<input type="submit" name="_ctl1" value="Submit" />
</form>
</body>

</html>
***********************************
I tried to do the same thing with the 'Application Name' on the XP box, but
the page would still not render anything at all. On both machines, the
domain users have local admin rights.

Why would ASP.NET on the XP box not render the code?

Thanks for your help!

CSDunn
 
K

Kevin Spencer

In IIS Admin snap-in, go to the Properties dialog box for a web site, Home
Directory tab, and click "Configuration" - The ISAPI mappings are one of the
tabs in that section.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
C

CSDunn

I can see that the aspnet_isapi.dll is included with the application
mappings on the Windows 2000 machine, but is not present on the XP box.

When I installed Visual Studio 2003 on the XP Box, the .NET Framework
version 1.1 was also installed, but I guess ASP.NET was not part of the
install package.

Should I uninstall the .NET Framework 1.1 on the XP box and install the the
..NET Framework 1.1 Redistributable, or should I just install the
Redistributable over what is on the XP box now? Is there some way to install
ASP.NET for XP other than instaling the .NET Framework 1.1 Redistributable?

Thanks again for your help!

CSDunn
 
M

mikeb

CSDunn said:
I can see that the aspnet_isapi.dll is included with the application
mappings on the Windows 2000 machine, but is not present on the XP box.

When I installed Visual Studio 2003 on the XP Box, the .NET Framework
version 1.1 was also installed, but I guess ASP.NET was not part of the
install package.

Should I uninstall the .NET Framework 1.1 on the XP box and install the the
.NET Framework 1.1 Redistributable, or should I just install the
Redistributable over what is on the XP box now? Is there some way to install
ASP.NET for XP other than instaling the .NET Framework 1.1 Redistributable?

Thanks again for your help!

Try running:

aspnet_regiis -r

to register ASP.NET with IIS.

<snip>
 
K

Kevin Spencer

No, not at all necessary. All that is necessary is to install ASP.Net on the
web server. This can be done with the aspnet_regiis.exe Command-line utility
fond at (approximate - adjust for your system)
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe.
Run it with the -i (install) parameter, as in:

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe - i

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
C

CSDunn

Kevin,
I did as instructed below, and everything works fine. Thanks for your help!

CSDunn
 

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

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top