Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / June 2005

Tip: Looking for answers? Try searching our database.

WSE and SSL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RG - 10 Jun 2005 14:58 GMT
I have created a Web Service (using WSE 2.0, SP3) that has a method
ProcessRequest exposed. A client application calls the webservice using the
following code.

========================================
Dim loWebService As New MyWebServiceWse

loWebService.Url = "http://www.testwebservice.com/MyTest/MyTest.asmx"

loWebService.AllowAutoRedirect = True
System.Net.ServicePointManager.CertificatePolicy = New CertPolicy

Dim loContext As SoapContext = loWebService.RequestSoapContext
loContext.Security.Timestamp.TtlInSeconds = -1

'Instantiate a new UsernameToken object.
Dim loUserNameToken As New UsernameToken(txtUserID.Text, txtPassword.Text,
PasswordOption.SendHashed)

'Add the token to the SoapContext.
loContext.Security.Tokens.Add(loUserNameToken)

'Generate a signature using the username token,
'and add the signature to the SoapContext.
loContext.Security.Elements.Add(New MessageSignature(loUserNameToken))

'Call the Web method.
lsResponse = loWebService.ProcessRequest(rtbRequest.Text)

========================================

This code works fine when the URL is HTTP. But, on a HTTPS call, when the
SSL is enabled to this site, It first gives me Security.SecurityFault
exception (WSE563) - The computed password digest does not match the incoming
username token. Then after that, for the subsequent requests, I get a
Destination unreachable WSE816 error - The header must match the value of the
incoming message's HTTP request.

How can I get this fixed? Is there anything different that I need to do in
the WebService code and/or the Client application code to handle HTTPS
request.

Thanks,
R
MAHESH MANDHARE - 13 Jun 2005 06:04 GMT
hi RG,
you are calliing web service from client app using sendhashed option does
your web service supports password hashing if not set this option to
sendPlainText
Signature

Have A Good Day,
Mahesh,
Maheshmandhare@yahoo.co.in

> I have created a Web Service (using WSE 2.0, SP3) that has a method
> ProcessRequest exposed. A client application calls the webservice using the
[quoted text clipped - 40 lines]
> Thanks,
> R
RG - 14 Jun 2005 17:07 GMT
Yes, the web service supports password hashing. The service works fine when
the calling application requests using HTTP.  But it does not when HTTPS is
enabled.
Any suggestions on how to get it working? Are there any examples/sample
codes that would implement like a Hello World service in HTTPS?

Thanks

> hi RG,
> you are calliing web service from client app using sendhashed option does
[quoted text clipped - 45 lines]
> > Thanks,
> > R
Dilip Krishnan - 16 Jun 2005 15:38 GMT
Adding ssl support has nothing to do with web service implementation.
All you need to do is get a valid certificate and change the settings in
IIS to make the web application use ssl.
What is the error you are getting?

> Yes, the web service supports password hashing. The service works fine when
> the calling application requests using HTTP.  But it does not when HTTPS is
[quoted text clipped - 53 lines]
>>>Thanks,
>>>R

Signature

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dilip.krishnan AT apdiya DOT com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.