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
226 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Application launch issue with Apache Tomcat 5 64
Need to Configure Debug Diag 2.2 for IIS 7.5 to capture dump files 1 74
WEB Farm 6 76
Setting Up Local Lan Web Server 1 65
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

821 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