×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Posts
    1,733

    HTTP/1.0 406 error

    Posted by ZISIS HARALAMPOPOULOS, zisgr@yahoo.gr
    on February 28, 2002 at 18:11

    I made sure my web server is configured correctly.I published the .asp file to my web server.Then, I used the Toolkit and loaded http://domain.com/wmlfile.asp (my own URL).
    I used the following example:

    <%@ LANGUAGE="VBSCRIPT" %>
    <% Response.ContentType = "text/vnd.wap.wml" %><?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
    <!-- The following Response.ContentType line is all you need
    to ensure your .asp file will work on a WML browser -->
    <wml>
    <card title="MainCard">
    <p>This is the current date and time <%=now()%></p>
    </card>
    </wml>

    ...and the simulator's output was:
    "HTTP:/1.0 406
    No acceptable objects were found"

    What should I do?

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Posts
    1,733

    RE: HTTP/1.0 406 error

    on April 26, 2002 at 23:39



    I cut and pasted your code on my server; generic IIS 5 NT Box. As:

    <%@ LANGUAGE="VBSCRIPT" %>
    <% Response.ContentType = "text/vnd.wap.wml" %><?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">

    <wml>
    <card title="MainCard">
    <p>This is the current date and time <%=now()%></p>
    </card>
    </wml>

    It ran fine in the simulator. I was however getting the same error with the simulator and could not figure out why. So create a helloworld.wml file basically your file w/o .asp and the <% Response.ContentType = "text/vnd.wap.wml" %> and it failed to same error.

    Then realized I created another virtual server I was running the file on, on a different port and did not configure the mime types correctly on that virtual server. I added them all. Though only needed .wml for now.

    .hdml text/x-hdml
    .wbmp image/vnd.wap.wbmp
    .wml text/vnd.wap.wml
    .wmlc application/vnd.wap.wmlc
    .wmls text/vnd.wap.wmlscript
    .wmlsc application/vnd.wap.wmlsc
    .xml text/xml

    And it worked.

    So I tried to create your error for you saving the file with different encoding. Could not get it to error except on Unicode then got a 500.

    Hope that helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •