Windows Vista Forums

how do i validate a .asp file?

  1. #1


    fazfazzi Guest

    how do i validate a .asp file?

    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 System SpecsSystem Spec

  2.   


  3. #2


    Evertjan. Guest

    Re: how do i validate a .asp file?

    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 System SpecsSystem Spec

  4. #3


    fazfazzi Guest

    Re: how do i validate a .asp file?

    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 System SpecsSystem Spec

  5. #4


    Evertjan. Guest

    Re: how do i validate a .asp file?

    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 System SpecsSystem Spec

  6. #5


    fazfazzi Guest

    Re: how do i validate a .asp file?

    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 System SpecsSystem Spec

  7. #6


    Evertjan. Guest

    Re: how do i validate a .asp file?

    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 System SpecsSystem Spec

  8. #7


    fazfazzi Guest

    Re: how do i validate a .asp file?

    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 System SpecsSystem Spec

  9. #8


    Evertjan. Guest

    Re: how do i validate a .asp file?

    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 System SpecsSystem Spec

  10. #9


    fazfazzi Guest

    Re: how do i validate a .asp file?

    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 System SpecsSystem Spec

  11. #10


    Bob Barrows Guest

    Re: how do i validate a .asp file?

    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 System SpecsSystem Spec

Page 1 of 2 12 LastLast

how do i validate a .asp file?
Similar Threads
Thread Forum
Validate XML against XSD file PowerShell
validate a cabinet file Vista General
Can't validate autounattend.xml file in WSIM. Vista installation & setup
Needs to validate? Vista General
Needs to validate? Vista General