HTTP Error 400

Results 1 to 2 of 2

Thread: HTTP Error 400

  1. #1
    Join Date
    Dec 1969
    Posts
    572

    Default HTTP Error 400

    I have Response.Redirect in my ASP Page, and it passes the hidden variable to the page where it&#039s redirecting to. On some clients it works fine, but on the other ones I get this error:<BR><BR>HTTP Error 400<BR>400 Bad Request<BR>Due to malformed syntax, the request could not be understood by the server. The client should not repeat the request without modifications.<BR><BR>Please, advise.<BR>

  2. #2
    Ismael Melendez Guest

    Default RE: HTTP Error 400

    I believe I know exactly what it is. I bet you the users that get errors are you using Netscape 3.0 and above and the clients that are working are using IE. 3.0 and above. Its Simple to fix , by using the object from VB called Server.UrlEncode(the hidden variable) in the Redirect Url string. <BR>I bet that the hidden variable has a blank or some ascii character in its value, thats why Netscape has trouble with it, because blank spaces should have %20 and so forth. IE says fine ill insert %20 for blanks in your hidden values. By rule of thumb you should insert the object Server.UrlEncode in your hyperlinks and redirect strings so Netscape users won&#039t get the HTTP Error 400. Basiclly what the Server.UrlEncode does is insert the necessary %20 and special charcters in the hidden value. I hope this helps. Please let me know if it solves your problem, thanks.... See examples below, I can&#039t recall exactly the syntax, but I&#039ll give it a try. Just look up the Server.UrlEncode() object up. See examples below.<BR><BR>1. response.redirect("/myserver/site/mypage.asp?variable=" & Server.UrlEncode(value))<BR><BR>2. on the hyperlink html client side:<BR> &#060;a href="/myserver/site/mypage.asp?variable=&#060;%=Server.UrlEncode(VB value)%&#062;"&#062;mypage&#060;/a&#062;<BR><BR>If you get a error, let me know I look at me code.<BR>

Posting Permissions

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