473,770 Members | 2,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

script tag generating error

on windows XP and visual studio 2005, I cannot load a javascript or a style
sheet file.
when I try to run the aspx page I get a client side runtime error stating:

"
A Runtime error has occurred
Do you wish to debug?

Line 2:
Error: Syntax error

Yes No
"

when I click Yes/No, the page continue loading but I cannot fire any client
function
from it, due to file loading failure, and, no style is applied to the page.

I know for sure that there's nothing wrong with the syntax in the javascript
file.
Plus, the file is in the same folder as the aspx page.

I tried it as:
<script type="text/javascript" src="Logon_scri pt.js"></script>
<script language="javas cript" src="Logon_scri pt.js"></script>
and move the declaration to the top, header , body, end of document and
still not working.
I noticed that, when the <authenticati on ... > in web config file is set to
"Forms"
the error is generated, but when I set the authentication to "Windows"
everything works fine.

when I publish the page on our web server or on different pc, everything
works ok.
It generate this error only on my PC.
I tried to reinstall internet explorer but on winXP I don't have the option
to repair/uninstall IE.
I contacted Microsoft and they couldn't figure out the reason why.
I beleive I'm going to uninstall IIS as my last option, unless somebody can
refer me to a solution.

thanks for help

my aspx page:

<%@ Page Language="VB" AutoEventWireup ="false" CodeFile="Logon .aspx.vb"
Inherits="Logon " %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitl ed Page</title>
<script type="text/javascript" src="Logon_scri pt.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div onclick="myfunc tion();">Logon page </div>
</form>
</body>
</html>
Mar 23 '06 #1
2 1329
Hi Zino,

Welcome to the MSDN newsgroup.

AS for the problem ASP.NET application, are you developing it in VS2005
through file system project? if so, this is caused by the .NET 2.0's test
webserver. When we running ASP.NET application in test server, all the
requests (no matter for ASP.NET dynamic resources or static files like
script , image files) are processed by ASP.NET runtime. Thus, if we
configure the application to use forms authentication, those script or
images files will also be protected, this could be the cause in your
scenario.

and for deployment environment(in IIS), this won't be the problem since IIS
will directly handle those static files' requests.
Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may

learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 24 '06 #2
sai

zino wrote:
on windows XP and visual studio 2005, I cannot load a javascript or a style
sheet file.
when I try to run the aspx page I get a client side runtime error stating:

"
A Runtime error has occurred
Do you wish to debug?

Line 2:
Error: Syntax error

Yes No
"

when I click Yes/No, the page continue loading but I cannot fire any client
function
from it, due to file loading failure, and, no style is applied to the page.

I know for sure that there's nothing wrong with the syntax in the javascript
file.
Plus, the file is in the same folder as the aspx page.

I tried it as:
<script type="text/javascript" src="Logon_scri pt.js"></script>
<script language="javas cript" src="Logon_scri pt.js"></script>
and move the declaration to the top, header , body, end of document and
still not working.
I noticed that, when the <authenticati on ... > in web config file is set to
"Forms"
the error is generated, but when I set the authentication to "Windows"
everything works fine.

when I publish the page on our web server or on different pc, everything
works ok.
It generate this error only on my PC.
I tried to reinstall internet explorer but on winXP I don't have the option
to repair/uninstall IE.
I contacted Microsoft and they couldn't figure out the reason why.
I beleive I'm going to uninstall IIS as my last option, unless somebody can
refer me to a solution.

thanks for help

my aspx page:

<%@ Page Language="VB" AutoEventWireup ="false" CodeFile="Logon .aspx.vb"
Inherits="Logon " %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitl ed Page</title>
<script type="text/javascript" src="Logon_scri pt.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div onclick="myfunc tion();">Logon page </div>
</form>
</body>
</html>


Apr 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
1895
by: nobody | last post by:
Hello all, I've searched just about everything and although I can see that other people are having problems, but theirs don't seem to relate, so in a last ditch attempt, my posting! Script tags are hanging in ie when generating a html page in a new window. Works fine in netscape/moz. I know ie does some weird things with scripts but...
12
2994
by: tshad | last post by:
I am not sure why I am getting this error: I have the following code I want to run from another include file that holds all my functions. functions.inc ************************************************************************************ <Script runat="Server"> Sub fnHeader(client As String) response.write("<!-- #include file = ../includes/staffingHeaders.inc -->")
3
9443
by: Raed Sawalha | last post by:
Hello when I serialize an object an error generated using this function public string SerializeObject(object oClassObject,System.Type oClassType) { XmlSerializer oSerializer = new XmlSerializer(oClassType); System.Text.StringBuilder strBuilder = new System.Text.StringBuilder(); System.IO.TextWriter writer = new System.IO.StringWriter(strBuilder); try { oSerializer.Serialize(writer,oClassObject); }
2
3115
by: Muzzy | last post by:
Hi, I've used information on these newsgroups to build many pages. So I thought that now that I have my script working (something that I've been working on for about a week), I should post it so that it may help others. If posting this script is against the rules in this group then please accept my appologies. I developped this script so that I can add and remove rows in a table in which I have various input fields and I would use the...
0
993
by: Razcer | last post by:
I am getting 'Object Expected' script errors from the scripts rendered by aspnet 2.0 webcontrols. This happens if I set OnTextChange="methodnamehere" on the .aspx page or use the Control.Focus() method in the code behind. The script that is created generates an error on the client side each keypress for the ontextchanged and after a postback on the focus method. I am pretty sure it's not getting the right ID, but since it's the default...
4
2091
by: dbee | last post by:
Right. I've got a really, really annoying/difficult/time consuming problem with my development environment. I'm using django to build a web app with paypal integration. My server is hosted remotely, and it is receiving IPN (payment notifications) POST requests from Paypal. I've checked on google and irc and this is my last shot at solving this before I go mad ... :-( The problem is that I can't debug those POST requests. Browser...
3
1694
by: John Kotuby | last post by:
Hey guys, In IE7 where I am tesing my Web Apps written with VB in VS 2005 I have set the IE option: "Display Notification of all script errors" to be active. Now that I have changed some asp:links to asp:linkbuttons, I am getting notification of script errors whereas before on the same page I wasn't. It has to be the Javascript DoPost with options that ASP.NET is generating, I
1
1069
by: Yansky | last post by:
I'm having some problems debugging a python script on my server. I'm getting a "500 Internal Server Error". What the script does is take a link and then scrape a page and store some info from the page into a database. It seemed to be working fine until I changed one line of code from: shortenLink = "/forum-replies.cfm?t="+threadNum+"&p="+pageNum +"#r"+anchorNum to:
1
47484
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10057
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10002
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7415
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3575
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.