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
223 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
ID: 12018253

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
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 Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

19 Experts available now in Live!

Get 1:1 Help Now