|
-
Nov 12th, 2005, 10:49 PM
#1
Thread Starter
Fanatic Member
A name was started with an invalid character
first line of the code below cause some error "A name was started with an invalid character".............what is the error??
Code:
<% Response.ContentType = "application/xml" %>
<?xml version="1.0" encoding="UTF-8"?>
<?xml:stylesheet type = "text/xsl" href ="NBAGuideTransform.xsl"?>
<TVSchedule>
<TVGuide>
<%
Dim adoConnect
Dim adoRecordset
Set adoConnect = Server.CreateObject("ADODB.Connection")
adoConnect.open = "Provider=Microsoft.Jet.OLEDB.4.0;" & "DataSource=C:\NBATVGuide.mdb"
Set adoRecordset = adoConnect.Execute("Select ProgramTitle, ProStartTime from tblNBASchedule order by ProStartTime")
Do While Not adoRecordset.EOF
Response.Write "<ProgramTime>" + adoRecordset("ProStartTime") + "</ProgramTime>"
Response.Write "<ProgramTitle>" + adoRecordset("ProgramTitle") + "</ProgramTitle>"
adoRecordset.MoveNext
Loop
adoRecordset.Close
set adoRecordset = Nothing
%>
</TVGuide>
</TVschedule>
Last edited by kenny_oh; Dec 9th, 2005 at 08:59 AM.
-
Nov 13th, 2005, 02:17 AM
#2
Re: A name was started with an invalid character
Do you mean this line?
<% Response.ContentType = "application/xml" %>
-
Nov 13th, 2005, 06:50 AM
#3
Thread Starter
Fanatic Member
Re: A name was started with an invalid character
yes!! what is the mistake?
-
Nov 13th, 2005, 06:54 AM
#4
Re: A name was started with an invalid character
There is no mistake. If you are using Notepad to edit the file, make sutre that you save it in ANSI and not Unicode.
-
Nov 13th, 2005, 07:02 AM
#5
Thread Starter
Fanatic Member
Re: A name was started with an invalid character
ya...i'm save in ANSI.....but still cannot...
-
Nov 13th, 2005, 07:04 AM
#6
Thread Starter
Fanatic Member
Re: A name was started with an invalid character
"A name was started with an invalid character"
this line error is it mean i'm using some invalid character?
-
Nov 13th, 2005, 07:06 AM
#7
Re: A name was started with an invalid character
What is giving you the error? ASP or the XML viewer you are using. I think you may have to remove all white space before the first tag, like this:
Code:
<% Response.ContentType = "application/xml" %><?xml version="1.0" encoding="UTF-8"?>
<?xml:stylesheet type = "text/xsl" href ="NBAGuideTransform.xsl"?>
<TVSchedule>
<TVGuide>
-
Nov 13th, 2005, 07:10 AM
#8
Thread Starter
Fanatic Member
Re: A name was started with an invalid character
i'm using Internet Explorer to view.............i remove the white space but still have the same error!
-
Nov 13th, 2005, 07:13 AM
#9
Thread Starter
Fanatic Member
Re: A name was started with an invalid character
error message:
Code:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'http://localhost/ASP_Sample.aspx'. Line 1, Positi...
<% Response.ContentType = "application/xml" %>
-^
-
Nov 13th, 2005, 07:37 AM
#10
Re: A name was started with an invalid character
Well you have ASP code in the XML file, you need to have that executed by a webserver first. Internet Explorer doesn't execute ASP code. You need to upload it to a web server with ASP and view in the browser from there.
-
Nov 13th, 2005, 07:50 AM
#11
Thread Starter
Fanatic Member
Re: A name was started with an invalid character
how about using Apache web server?
-
Nov 13th, 2005, 07:53 AM
#12
Re: A name was started with an invalid character
-
Nov 13th, 2005, 07:57 AM
#13
Thread Starter
Fanatic Member
Re: A name was started with an invalid character
put the asp file in the wwwroot and then how to view the file?
i dont know how to use iis server?
-
Nov 13th, 2005, 08:04 AM
#14
Re: A name was started with an invalid character
Make sure it has been started and go to http://localhost/file_name.xml
-
Nov 13th, 2005, 08:18 AM
#15
Thread Starter
Fanatic Member
Re: A name was started with an invalid character
what u mean "has been started"??
-
Nov 13th, 2005, 08:27 AM
#16
Re: A name was started with an invalid character
Goto Internet Information Services under computer management and check that the IIS web service has been started.
-
Nov 13th, 2005, 08:38 AM
#17
Thread Starter
Fanatic Member
Re: A name was started with an invalid character
service and application there got IIS, is it mean started?
-
Nov 13th, 2005, 09:12 AM
#18
Thread Starter
Fanatic Member
Re: A name was started with an invalid character
i have change the IIS port to 8585 and the IIS have started.......and then i put the ASP_Sample.aspx file in the wwwroot...............
in the web browser there i type "http://localhost:8585/ASP_Sample.aspx
but display error message "the page cannot displayed"
what is the problem?
-
Jun 12th, 2008, 12:39 AM
#19
New Member
Getting same error "a name was started with an invalid character"
Hi i am also getting the same error but when i access my pages using localhost its opened successfully but while accessing with IP address its giving error have you any idea why i am getting this error.
Ali.
-
Jun 12th, 2008, 12:38 PM
#20
Re: A name was started with an invalid character
You'll only get that error if you're running the page against a server that doesn't have ASP installed or has ASP 'locked down'. Look under the web services extension in IIS.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|