Solved

ASP.NET Parse Errors with everything...did I set up my server right and if yes/no what is wrong?

Posted on 2004-08-22
3
220 Views
Last Modified: 2010-04-20
Hello,

I do not know what I am doing...setting up this server...everything i try on it gives me a parse error... I am trying to make an asp.net page but it is much more complicated than php.

I have the .NET 1.1 framework installed on a Windows 2003 server.. I basically just told it to run as a application server so it enabled IIS for me also.  Just in case I ran this command

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

to make sure I installed ASP.NET after, IIS

I keep hearing about virtual directories and enabling applications.. I did go to my wwwroot and the folder within it clicked new and so forth.  here is the small script I am trying to run.

<%@Page Language="VB"%>
<html>
<body>
<h1>hello world, <% Response.Write(DateTime.Now.ToString()) %></h1>
</body>
</html>


<%@Page Language="JScript"%>
<html>
<body>
<h1>hello world, <% Response.Write(DateTime.Now.ToString()); %></h1>
</body>
</html>

HERE IS THE ERROR MESSAGE

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: There can be only one 'page' directive.

Source Error:


Line 7:  
Line 8:  
Line 9:  <%@Page Language="JScript"%>
Line 10: <html>
Line 11: <body>
 

Source File: c:\inetpub\wwwroot\sweeps.aspx    Line: 9


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Everything I try to run on this server gives me somesort of parse error...although different ones.
0
Comment
Question by:Pharcyde616
3 Comments
 
LVL 20

Accepted Solution

by:
ihenry earned 125 total points
Comment Utility

Your installation seems working fine because it throws you correct error message. You have two definitions of 'Page' directive which is <%@Page Language="JScript"%> and <%@Page Language="VB"%>. You can only have one in a aspx page.

use either
<%@Page Language="VB"%>
<html>
<body>
<h1>hello world, <% Response.Write(DateTime.Now.ToString()) %></h1>
</body>
</html>

or

<%@Page Language="JScript"%>
<html>
<body>
<h1>hello world, <% Response.Write(DateTime.Now.ToString()); %></h1>
</body>
</html>
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now