WSE 3.0 problems with BeginMethod EndMethod calls.



Hi all,

I've got a web service that worked fine (or appeared to) before I added
WSE 3.0 security to it. Now, everything works right, except for my BeginXxxx
and EndXxxx webmethods.

My code is returning our own IAsyncResult implementation, but the
callback and state are identical to that passed into the BeginXxxx method.
The really strange part is that when the call completes synchronously, it
works. However, when the call is delayed (and later triggered by a "polling"
thread), I get the following error every time.

Is this a bug in WSE 3, or is there a known solution to the problem?

John


Client found response content type of 'text/html; charset=utf-8', but
expected 'text/xml'. The request failed with the error message: --
Server Error in '/NKUsers' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an
object.]

Microsoft.Web.Services3.WseProtocol.GetOrCreateSessionStateFromHttpContext()
+33
Microsoft.Web.Services3.WseProtocol.GetWriterForMessage(SoapServerMessage
message, Int32 bufferSize) +436
System.Web.Services.Protocols.SoapServerProtocol.WriteException(Exception
e, Stream outputStream) +1461
System.Web.Services.Protocols.WebServiceHandler.WriteException(Exception
e) +156
System.Web.Services.Protocols.WebServiceHandler.EndInvoke(IAsyncResult
asyncResult) +224

System.Web.Services.Protocols.WebServiceHandler.EndCoreProcessRequest(IAsyncResult asyncResult) +69

System.Web.Services.Protocols.AsyncSessionlessHandler.EndProcessRequest(IAsyncResult asyncResult) +29
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult
ar) +87

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42 --.
.



Relevant Pages

  • Object reference not set to an instance of an object.
    ... Object reference not set to an instance of an object. ... An unhandled exception occurred during the execution of the ... Dim myJobRequest As New skillsDB.jobRequest ... Session= "The skills database has been updated ...
    (microsoft.public.dotnet.general)
  • Re: Exchange 2003 Mobile Admin
    ... Object reference not set to an instance of an object. ... Please review the stack trace for more information about ... Exception Details: System.NullReferenceException: Object reference not set ... Server Error in '/MobileAdmin' Application. ...
    (microsoft.public.exchange.setup)
  • Re: Load Testing Errors
    ... There are many reasons an application might fail under load when it normally ... I notice your exception is occurring inside a DataView. ... from your request when you were expecting non-null values. ... One is a "Object reference not set to an instance of an object." ...
    (microsoft.public.dotnet.framework.performance)
  • Re: Load Testing Errors
    ... There are many reasons an application might fail under load when it normally ... I notice your exception is occurring inside a DataView. ... from your request when you were expecting non-null values. ... One is a "Object reference not set to an instance of an object." ...
    (microsoft.public.dotnet.general)
  • Re: error when compiled in release mode works in debug mode.
    ... Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. ... Information regarding the origin and location of the exception can be identified using the exception stack trace below. ... >> Control throws error when compiled in release mode. ...
    (microsoft.public.dotnet.framework)