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
228 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Alias for "domain to path" translation instead of VirtualHost on Apache 3 90
question about access to website 2 93
Problem to go to Web page 2 140
cookies analysis tools 2 111
This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

738 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