RE: MessageSecurityException when consuming WCF service
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Fri, 10 Aug 2007 08:27:03 GMT
Hi Daniel,
From your description, you're encountering the following error when runninga WCF based client server communication application, correct?
=========
The message could not be processed. This is most likely because the action
'http://tempuri.org/IBCC2MatrixService/UserMatchingSearch' is incorrect or
because the message contains an invalid or expired security context token
or
because there is a mismatch between bindings. The security context token
would be invalid if the service aborted the channel due to inactivity. To
prevent the service from aborting idle sessions prematurely increase the
Receive timeout on the service endpoint's binding.
=========
Regarding on the error info, I've performed some research and found some
cases with similar symptom. I'd like to confirm some things about your WCF
client, server applications:
** What's the type of endpoint binding type are you using and are you using
Message layer security to secure the service communiaton?
** For the client-side, are you using the autogenerated proxy class?
According to those former issue with the similar error message, the problem
is likely caused by the securitycontextToken be expired (client send to
server). When you use message layer security, the generated proxy will use
established security context token to communicate with server. However,
when the server close the connection (for some reason), the client is not
going to know the service connection timed out until it actually tries to
contact the service...which raises the exception.
If the problem in your case does be due to the above reason, you can
consider the following resolutions:
The best solution is to catch the exception and then abort the proxy and
recreate it.
Or you can also disable message layer security and use transport layer
security.
<<<<<<<<<<<<<<<
Hope this helps some.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- Prev by Date: Re: C# calling C++ dll (Instruction at referenced memory could not be read)
- Next by Date: Running app from network drive
- Previous by thread: Re: XSL Question
- Next by thread: RE: MessageSecurityException when consuming WCF service
- Index(es):
Relevant Pages
|