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 839679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:30:17+00:00 2026-05-15T05:30:17+00:00

I am getting a System.Net.ProtocolViolationException: Operation is not valid due to the current state

  • 0

I am getting a “System.Net.ProtocolViolationException: Operation is not valid due to the current state of the object.” error when trying to call

 var request = (HttpWebRequest)WebRequest.Create(uri);

 request.Method = "GET";

 request.ContentType = "text/xml";

 request.BeginGetRequestStream(RequestCompleted, request);
  • 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-05-15T05:30:18+00:00Added an answer on May 15, 2026 at 5:30 am

    I suspect this may be because you are performing a BeginGetRequestStream on a request object for which you have specified the “GET” method.

    When performing a “GET” the server will not be expecting an entity body in the request hence you should proceed straight to BeginGetResponse. Also specifying a ContentType on the request is not necessary, it specifies the type of content being sent in the entity body of the request but as stated a “GET” doesn’t send any content it only gets content.

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

Sidebar

Related Questions

I am getting a Method not found: 'Boolean MyCompany.LibraryAssembly.SomeFunction(System.String)' exception/error when running a VB.NET
I am trying to send email via System.Net.Mail. On clicking send I am getting
I'm getting the following error when I try to Serialize an HttpWebRequest Type 'System.Net.KnownHttpVerb'
We are getting a really rare error during HTTP requests: System.Net.InternalException: System error. at
I've been getting the following exception when trying to send an e-mail using System.Net.Mail:
Getting system.entrypointnotfoundexception: loadlibrary While trying to use SevenZipLib.dll to uncompress the .7z file containing
I’m getting system error when I try to compile the code below on Visual
at the moment im loading xml and i am getting error: System.Xml.XmlException: ' ',
I keep getting this error System.Web.HttpException was unhandled by user code Message=Validation of viewstate
We are getting this error: System.ServiceModel.ServerTooBusyException: The request to create a reliable session has

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.