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

dotnet web services enhancements : Soap and basic authorization


vidar NO[at]SPAM webscape.no
7/18/2006 2:03:00 PM
Hi!

I'm building an application to send MMS messages. In order to do that I
need to send a custom soap envelope to a webservice that uses
BASIC-AUTH as the first line of security(it also uses the soap header).

The problem is getting the SoapSender to use the BASIC-AUTH header.

How can I turn on BASIC-AUTH in the soap request?

This is the code I have now(The soap xml is generated earlier):

SoapEnvelope env = new SoapEnvelope();
env.LoadXml(xmlSOAP.OuterXml);
env.Context.Addressing.Action = new Action(anMm7Url.ToString());
EndpointReference destination = new EndpointReference(anMm7Url);
SoapSender aSender = new SoapSender(destination);
aSender.Send(env);


This is the error I get: "The remote server returned an error: (401)
Unauthorized."

I'm sure the problem is that the SoapSender isn't setting the
Authorization header of the request to basic (I've tested making a
HttpWebRequest with basic authorization added, and it works).

Any help is VERY appreciated! If you need a more detailed explanation,
please let me know!
feroz
8/14/2007 12:00:00 AM

[quoted text, click to view]

Hi,
I hope u have posted this problem one year back and got the answer.could u please share the answer if you have

Regards,
Feroz

BizTalk Utilities - Frustration free BizTalk Adapters
AddThis Social Bookmark Button