Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8535229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:23:02+00:00 2026-06-11T10:23:02+00:00

Please, someone help me. I’ve been researching this for hours, have tried lots of

  • 0

Please, someone help me. I’ve been researching this for hours, have tried lots of different suggested fixes, and I’m at a total loss as to why I am still getting this error.

I have an ASP.NET 4.0 web page with the following code in it:

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(targetHref);
// request.KeepAlive = false;
// request.ProtocolVersion = System.Net.HttpVersion.Version10;
// request.ServicePoint.Expect100Continue = false;

HttpWebResponse response = (HttpWebResponse)request.GetResponse();

I’ve tried every combination I can imagine of un-commenting the above 3 commented lines.

I have this in my web.config:

<system.net>
   <settings>
      <httpWebRequest useUnsafeHeaderParsing ="true"/>
   </settings>
</system.net>

When I am running Fiddler on my dev machine, the page runs without exception and fiddler shows this message at the top of the return:

HTTP/1.0 200 This buggy server did not return headers

Without Fiddler running, I get the error every time on the request.GetResponse() line.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:23:03+00:00Added an answer on June 11, 2026 at 10:23 am

    Well, I tried every suggestion I could find here on StackOverflow and elsewhere on the web, but never got an implementation of HttpWebRequest to work for me, so I tried using TcpClient instead after reading this:
    How To Set useUnsafeHeaderParsing For .NET Compact Framework

    To get it to work for me, I had to modify this line:

     sw.WriteLine(string.Format("GET /{0} HTTP/1.1", pathAndQueryString));
    

    to:

     sw.WriteLine(string.Format("GET /{0} {1}", pathAndQueryString, Environment.NewLine+Environment.NewLine));
    

    And that worked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please someone help me! I've been at this all day. I've seen several different
I have a small requirement.. Please someone help me I have this code to
please someone help out from this headaround problem of me; I have dynamically created
Please can someone help? I have the following code which uploads a file to
Im a beginner to css, please can someone help me get this element to
Someone please help. I have an interesting issue. I am trying to implement an
Could someone please help me to convert this String into a Map ... String
can someone please help me. why does this return an error: Dim stuff As
I'm sure someone can explain this. we have an application that has been in
i am so stuck , please someone help if you have 2 min. i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.