Groups | Blog | Home
all groups > dotnet web services enhancements > september 2006 >

dotnet web services enhancements : WSE 3.0 UsernameOverTransport Problem


gramanero-spam NO[at]SPAM yahoo.com
9/18/2006 7:10:56 AM
Hello,

I am fairly new to WSE, in general, however I have read several
articles online and believe I have a fairly good grasp of it. I am
working on integrating WSE 3.0 into an web service. The web service is
a very simple web service for the purposes of testing WSE 3.0
UsernameOverTransport.

The problem that I am having is that I am getting the following
exception stack trace on the server side:

Microsoft.Web.Services3.Security.SecurityFault: UsernameToken is
expected but not present in the security header of the incoming
message.
at
Microsoft.Web.Services3.Design.UsernameOverTransportAssertion.ServiceInputFilter.ValidateMessageSecurity(SoapEnvelope
envelope, Security security)
at
Microsoft.Web.Services3.Security.ReceiveSecurityFilter.ProcessMessage(SoapEnvelope
envelope)
at Microsoft.Web.Services3.Pipeline.ProcessInputMessage(SoapEnvelope
envelope)
at Microsoft.Web.Services3.WseProtocol.FilterRequest(SoapEnvelope
requestEnvelope)
at
Microsoft.Web.Services3.WseProtocol.RouteRequest(SoapServerMessage
message)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type
type, HttpContext context, HttpRequest request, HttpResponse response,
Boolean& abortProcessing)

In doing a fair amount of Google searches, it looks like I am not the
only one having this issue. I am curious if anyone has been able to
resolve this issue.

I have verified that the client is in fact sending the Username token
to the web service. In fact, I have verified, based on the stack trace,
the the server side does in fact see a security header, for some reason
it is simply unable to locate the Username token in the security
header. According to the server side log files though, it does exist
prior to processing the message.

Any help would be greatly appreciated.

Thank you!!
Pablo Cibraro [MVP]
9/19/2006 10:22:39 AM
Hi,

Which WSE policies are you using on the client and the service ?

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax

[quoted text, click to view]

gramanero-spam NO[at]SPAM yahoo.com
9/19/2006 11:54:25 AM
Hi Pablo,

Client side: usernameOverTransport
Server side: usernameOverTransport and requireActionHeader

--Scott

[quoted text, click to view]
Pablo Cibraro [MVP]
9/20/2006 9:29:43 AM
Hi,

Do you have the following section in the web.config file ?

<system.web>
<webServices>
<soapServerProtocolFactory
type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<soapExtensionImporterTypes>
<add type="Microsoft.Web.Services3.Description.WseExtensionImporter,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
</soapExtensionImporterTypes>
</webServices>
</system.web>

Usually WSE throws that exception when the WSE extension is not configured
correctly.

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax

[quoted text, click to view]

gramanero-spam NO[at]SPAM yahoo.com
9/20/2006 10:43:39 AM
Yes, I do have that section in my web.config. Does the ordering matter?
I wouldn't think so.

<webServices>
<soapExtensionImporterTypes>
<add
type="Microsoft.Web.Services3.Description.WseExtensionImporter,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />
</soapExtensionImporterTypes>
<soapServerProtocolFactory
type="Microsoft.Web.Services3.WseProtocolFactory,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />
</webServices>

Interesting that you mention that WSE will "usually" throw the
exception it is not configured properly. I am figuring that this is a
configuration issue, I just have not been able to figure out what it
is.

Thank you for the insight.

[quoted text, click to view]
Anshu
11/14/2006 9:03:01 PM

[quoted text, click to view]

Scott, I'm having the exact same problem as you are. Were you able to resolve it? and if so how?

When I look at the trace logs going out of my client and going into my service, the UsernameToken appears in the security header of the SOAP message.

AddThis Social Bookmark Button