• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

how do i validate a .asp file?

F

fazfazzi

#1
hello
i have some asp file and i want to validate them via validator.w3.org.
I'm developing locally so i can't feed the validar
with an url, if i use the option file upload i get an error message:
"Sorry, I am unable to validate this document because its content type
is application/octet-stream..", weird enough because i have this line
in all my pages:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
Finally, if i try to validate by direct input all the asp code will
lead to a validate error..
Any helps is appreciated
 

My Computer

E

Evertjan.

#2
wrote on 27 dec 2008 in microsoft.public.scripting.vbscript:

> hello
> i have some asp file and i want to validate them via validator.w3.org.
> I'm developing locally so i can't feed the validar
> with an url, if i use the option file upload i get an error message:
> "Sorry, I am unable to validate this document because its content type
> is application/octet-stream..", weird enough because i have this line
> in all my pages:
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
> Finally, if i try to validate by direct input all the asp code will
> lead to a validate error..
> Any helps is appreciated
Content type of an ASP file can and should be set using serveride commands.

Validating serverside code is done by debugging.

Validating of the html result is possible like any html file on the web.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 

My Computer

F

fazfazzi

#3
On 27 Dic, 22:58, "Evertjan." <exjxw.hannivo...@xxxxxx> wrote:

>  wrote on 27 dec 2008 in microsoft.public.scripting.vbscript:
>

> > hello
> > i have some asp file and i want to validate them via validator.w3.org.
> > I'm developing locally so i can't feed the validar
> > with an url, if i use the option file upload i get an error message:
> > "Sorry, I am unable to validate this document because its content type
> > is application/octet-stream..", weird enough because i have this line
> > in all my pages:
> > <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
> > Finally, if i try to validate by direct input all the asp code will
> > lead to a validate error..
> > Any helps is appreciated
>
> Content type of an ASP file can and should be set using serveride commands.
Nothing changes if i add the serverside command to declare the content
type

> Validating serverside code is done by debugging.
> Validating of the html result is possible like any html file on the web.
Still don't understand, i can't validate an asp file i have to put in
a remote server first?
 

My Computer

E

Evertjan.

#4
wrote on 28 dec 2008 in microsoft.public.scripting.vbscript:

> On 27 Dic, 22:58, "Evertjan." <exjxw.hannivo...@xxxxxx> wrote:

>>  wrote on 27 dec 2008 in microsoft.public.scripting.vbscript:
>>

>> > hello
>> > i have some asp file and i want to validate them via
>> > validator.w3.org. I'm developing locally so i can't feed the
>> > validar with an url, if i use the option file upload i get an error
>> > message: "Sorry, I am unable to validate this document because its
>> > content type is application/octet-stream..", weird enough because i
>> > have this line in all my pages:
>> > <meta http-equiv="Content-Type" content="text/html;charset=utf-8"
> />

>> > Finally, if i try to validate by direct input all the asp code will
>> > lead to a validate error..
>> > Any helps is appreciated
>>
>> Content type of an ASP file can and should be set using serveride
>> commands.
>
> Nothing changes if i add the serverside command to declare the content
> type
It should, did you read the header?

Show us the header please.

>> Validating serverside code is done by debugging.
>> Validating of the html result is possible like any html file on the
>> web.
>
> Still don't understand, i can't validate an asp file i have to put in
> a remote server first?
Please explain what you mean by validating an asp file.
Page validation is usually the term for validating what is sent to the
client, and that is NOT the ASP-file.

An ASP-file is a file that serverside renders an html file that is sent
to the user.

Serverside debugging is quite possible.

Do you want to detect serverside code syntax errors?
If so what serverside programming language do you use under ASP?




--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 

My Computer

F

fazfazzi

#5
On 28 Dic, 17:20, "Evertjan." <exjxw.hannivo...@xxxxxx> wrote:

>  wrote on 28 dec 2008 in microsoft.public.scripting.vbscript:

> Show us the header please.
ok, those are the first lines:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
......

> Please explain what you mean by validating an asp file.
I want to validate my pages for xhtml 1.0 strict, the problem is that
i have vbscript code merged in all pages
but i want to validate them for xhtml, not for serverside code
I thought that i can validate my page even if i don't have a public
http server

> Page validation is usually the term for validating what is sent to the
> client, and that is NOT the ASP-file.
>
> An ASP-file is a file that serverside renders an html file that is sent
> to the user.
>
> Serverside debugging is quite possible.
>
> Do you want to detect serverside code syntax errors?
> If so what serverside programming language do you use under ASP?
vbscript, but to detect serverside code errors i just feed the page to
my localhost.. there is a
better way?

Thank you for your answers
 

My Computer

E

Evertjan.

#6
wrote on 28 dec 2008 in microsoft.public.scripting.vbscript:

> On 28 Dic, 17:20, "Evertjan." <exjxw.hannivo...@xxxxxx> wrote:

>>  wrote on 28 dec 2008 in microsoft.public.scripting.vbscript:
>

>> Show us the header please.
> ok, those are the first lines:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
> .....
No, that is the top and <head> section of the html,
please show the header content of the html sent to the client
as returned by xmlhttp.open("HEAD"...:

var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
function getUrlhead(url) {
xmlhttp.open("HEAD", url,false);
xmlhttp.send()
sta = xmlhttp.status
return xmlhttp.getAllResponseHeaders();
};

>> Please explain what you mean by validating an asp file.
>
> I want to validate my pages for xhtml 1.0 strict, the problem is that
> i have vbscript code merged in all pages
NO, you have vbscript in your asp-files, but that is not what is sent to
the client, that is simple html, perhaps with clientside script.

so show the html as seen by view-source or the source function of your
browser.


> but i want to validate them for xhtml, not for serverside code
> I thought that i can validate my page even if i don't have a public
> http server
>

>> Page validation is usually the term for validating what is sent to
>> the client, and that is NOT the ASP-file.
>>
>> An ASP-file is a file that serverside renders an html file that is
>> sent to the user.
>>
>> Serverside debugging is quite possible.
>>
>> Do you want to detect serverside code syntax errors?
>> If so what serverside programming language do you use under ASP?

> vbscript, but to detect serverside code errors i just feed the page to
> my localhost.. there is a
> better way?
Eh, that seems not to be your primary question?



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 

My Computer

F

fazfazzi

#7
On 28 Dic, 20:45, "Evertjan." <exjxw.hannivo...@xxxxxx> wrote:

>  wrote on 28 dec 2008 in microsoft.public.scripting.vbscript:
>

> > On 28 Dic, 17:20, "Evertjan." <exjxw.hannivo...@xxxxxx> wrote:

> >>  wrote on 28 dec 2008 in microsoft.public.scripting.vbscript:
>

> >> Show us the header please.
> > ok, those are the first lines:
>

> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> > <html xmlns="http://www.w3.org/1999/xhtml">
> > <head>
> > <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
> > .....
>
> No, that is the top and <head> section of the html,
> please show the header content of the html sent to the client
> as returned by xmlhttp.open("HEAD"...:
>
> var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
> function getUrlhead(url) {
>         xmlhttp.open("HEAD", url,false);
>         xmlhttp.send()
>         sta = xmlhttp.status
>         return xmlhttp.getAllResponseHeaders();
>
> };
Uhm.. that's not vbscript and i don't know how to transpose it..

> so show the html as seen by view-source or the source function of your
> browser.
Maybe is that the answer? If i put the hmtl by view-source of the
browser in the validator it can validate it, is this the way i have to
validate a page?
Thx
 

My Computer

E

Evertjan.

#8
wrote on 29 dec 2008 in microsoft.public.scripting.vbscript:

> On 28 Dic, 20:45, "Evertjan." <exjxw.hannivo...@xxxxxx> wrote:

>>  wrote on 28 dec 2008 in microsoft.public.scripting.vbscript:
>>

>> > On 28 Dic, 17:20, "Evertjan." <exjxw.hannivo...@xxxxxx> wrote:
>> >>  wrote on 28 dec 2008 in microsoft.public.scripting.vbscript:
>>

>> >> Show us the header please.
>> > ok, those are the first lines:
>>

>> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>> > <html xmlns="http://www.w3.org/1999/xhtml">
>> > <head>
>> > <meta http-equiv="Content-Type" content="text/html;charset=utf-8"
> />

>> > .....
>>
>> No, that is the top and <head> section of the html,
>> please show the header content of the html sent to the client
>> as returned by xmlhttp.open("HEAD"...:
>>
>> var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
>> function getUrlhead(url) {
>>         xmlhttp.open("HEAD", url,false);
>>         xmlhttp.send()
>>         sta = xmlhttp.status
>>         return xmlhttp.getAllResponseHeaders();
>>
>> };
>
> Uhm.. that's not vbscript and i don't know how to transpose it..
sigh!

That is clientside javascript to read the header of a sent html.
It is not part of your page, so why do you nead to transpose it to vbs?

Any html sent to the browser has a header section "head" and a html
section "get".

ASP directives in the server asp file direct the server to change the
"head" section.

A typical head section as found by the above code looks like this:

Date: Mon, 29 Dec 2008 17:06:27 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
Content-Length: 40271
Content-Type: text/html
Expires: Mon, 29 Dec 2008 16:56:27 GMT
Set-Cookie: ASPSESSIONIDQSBSBBSR=PHBICBCAAIPEKGIMLKEDAGNL; path=/
Cache-control: private

or even [Apache server]

Date: Mon, 29 Dec 2008 10:31:59 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Connection: close
Content-Type: text/html; charset=UTF-8

typical asp directive that change or ads to such head:

<%
Response.Expires = -10
Response.ContentType = "video/x-ms-asf"
%>

>> so show the html as seen by view-source or the source function of your
>> browser.
>
> Maybe is that the answer? If i put the hmtl by view-source of the
> browser in the validator it can validate it, is this the way i have to
> validate a page?
If your definition of validation is to validate the html sent to the
client browser, yes.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 

My Computer

F

fazfazzi

#9
On 29 Dic, 18:14, "Evertjan." <exjxw.hannivo...@xxxxxx> wrote:

>  wrote on 29 dec 2008 in microsoft.public.scripting.vbscript:

> > Maybe is that the answer? If i put the hmtl by view-source of the
> > browser in the validator it can validate it, is this the way i have to
> > validate a page?
>
> If your definition of validation is to validate the html sent to the
> client browser, yes.
I want to validate a page for xhtml 1.0 strict
My page is an .asp file: vbscript + xhtml + javascript
Why are we making it so complex? All i want is to validate my page for
xhtml, so how do i?
 

My Computer

B

Bob Barrows

#10
fazfazzi@xxxxxx wrote:

> On 29 Dic, 18:14, "Evertjan." <exjxw.hannivo...@xxxxxx> wrote:

>> wrote on 29 dec 2008 in microsoft.public.scripting.vbscript:
>
>

>>> Maybe is that the answer? If i put the hmtl by view-source of the
>>> browser in the validator it can validate it, is this the way i have
>>> to validate a page?
>>
>> If your definition of validation is to validate the html sent to the
>> client browser, yes.
>
> I want to validate a page for xhtml 1.0 strict
> My page is an .asp file: vbscript + xhtml + javascript
> Why are we making it so complex? All i want is to validate my page for
> xhtml, so how do i?
An html validator validates html.
ASP generates html.
You need to cause the ASP page to generate the html to be validated.
Only the html can be validated. Hence the need to View Source after
running the page to see the generated html.

--
HTH,
Bob Barrows
 

My Computer

E

Evertjan.

#11
Bob Barrows wrote on 29 dec 2008 in microsoft.public.scripting.vbscript:

> fazfazzi@xxxxxx wrote:

>> On 29 Dic, 18:14, "Evertjan." <exjxw.hannivo...@xxxxxx> wrote:

>>> wrote on 29 dec 2008 in microsoft.public.scripting.vbscript:
>>
>>

>>>> Maybe is that the answer? If i put the hmtl by view-source of the
>>>> browser in the validator it can validate it, is this the way i have
>>>> to validate a page?
>>>
>>> If your definition of validation is to validate the html sent to the
>>> client browser, yes.
>>
>> I want to validate a page for xhtml 1.0 strict
>> My page is an .asp file: vbscript + xhtml + javascript
>> Why are we making it so complex? All i want is to validate my page for
>> xhtml, so how do i?
>
> An html validator validates html.
> ASP generates html.
> You need to cause the ASP page to generate the html to be validated.
> Only the html can be validated. Hence the need to View Source after
> running the page to see the generated html.
A .asp "file" exists on the server,
an html "page" is what is shown on the browser,
even where the page url shows the filename ending in .asp.

These two are not one and the same.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 

My Computer

B

Bob Barrows

#12
Evertjan. wrote:

> A .asp "file" exists on the server,
> an html "page" is what is shown on the browser,
> even where the page url shows the filename ending in .asp.
>
> These two are not one and the same.
>
So? You understood what I was talking about. I refuse to get into this
discussion again. We hashed it out quite thoroughly in asp.general
--
HTH,
Bob Barrows
 

My Computer

E

Evertjan.

#13
Bob Barrows wrote on 29 dec 2008 in microsoft.public.scripting.vbscript:

> Evertjan. wrote:

>> A .asp "file" exists on the server,
>> an html "page" is what is shown on the browser,
>> even where the page url shows the filename ending in .asp.
>>
>> These two are not one and the same.
>>
> So? You understood what I was talking about.
I was not contesting you, Bob, but adding to the many posts I wrote in this
thread.

> I refuse to get into this
> discussion again. We hashed it out quite thoroughly in asp.general
Feel free not to take part in this thread, Bob.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 

My Computer

B

Bob Barrows

#14
Evertjan. wrote:

> Bob Barrows wrote on 29 dec 2008 in
> microsoft.public.scripting.vbscript:
>

>> Evertjan. wrote:

>>> A .asp "file" exists on the server,
>>> an html "page" is what is shown on the browser,
>>> even where the page url shows the filename ending in .asp.
>>>
>>> These two are not one and the same.
>>>
>> So? You understood what I was talking about.
>
> I was not contesting you, Bob, but adding to the many posts I wrote
> in this thread.
>
My apologies. I was confused since you replied to me rather than the OP.
--
HTH,
Bob Barrows
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)