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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Intranet Solution - Sharepoint Foundation or up 4 65
ip / url redirect 13 72
Moving web servers into a DMZ? 3 58
move expression web site to a new server 13 38
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
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 teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 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