Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InvalidOperationException: Request format is unrecognized 1

Status
Not open for further replies.

sjakiePP

Programmer
Apr 6, 2004
104
NL
I have a webservice that wants to retreive an object. To get this, all sort of events are raised and handled. I have a listener for this to handle the events.

But when the object comes in the listener, it is in an other thread. I have named the thread i started with and saved this in the listener. It is also set in a Join state, to wait. I also have an timeout set for it.

When the object comes in the listener the start thread has to be started again. I use the Interrupt method to do this.

But nothing happens. The method i use for handling the incoming event is the only thing that works. Then I get a 500 error in my browser.

When reloading the browser i get following error: "InvalidOperationException: Request format is unrecognized".

What am I doing wrong?

Thnx,
Sjakie

----------
Yes, the world is full of strange people.
 
This is the complete exception:

[InvalidOperationException: Request format is unrecognized.]
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig) +699
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +95
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +173


----------
Yes, the world is full of strange people.
 
Fixed it.

Added to web.config:
<webServices>
<protocols>
<!-- <add name="HttpSoap1.2"/> -->
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<!-- <add name="HttpPostLocalhost"/> -->
<add name="Documentation"/>
</protocols>
</webServices>

and to machine.config:

<webServices>
<protocols>
<!-- <add name="HttpSoap1.2"/> Not supported-->
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="HttpPostLocalhost"/>
<add name="Documentation"/>
</protocols>
<!-- some other settings -->
</webServices>

----------
Yes, the world is full of strange people.
 
hm, the problem is somewhat different.

When I leave out the interrupt, and give the join a timeout, it works, but I do not wish to wait for the timeout. When i use it, it returns the 500 error.

What is going wrong?

----------
Yes, the world is full of strange people.
 
Se "sessionstate <element>" in MSDN Documentation

The configuration elements that are relevant for you in web.config are located under sessionState:

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

Pay particular attention to mode.

guanha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top