Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 12th, 2005, 11:58 PM
Authorized User
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Web Service Enhancements dilemma

I have been trying to use Web Service Enhancements 2.0 SP3, to authenticate and authorize users to use my web services. I have created my web service class on the server side also using WSE.

On the client side I have created a proxy to access the web services. I have also managed to create the security token to authenticate users. However, when I try to add the token to the request context, the code does not compile. The code snippet is given below;

WebserviceClass ws = new WeserviceClass();
UsernameToken token = new UsernameToken(Username,hashedPassword,PasswordOpti on.SendHashed);
ws.RequestSoapContext.Security.Tokens.Add(token);

It says that "RequestSoapContext" is not defined for "ws" object.

Because of this error users aren't getting authenticated and no one is able to access my web services.

Saban.

 
Old December 13th, 2005, 06:36 AM
Authorized User
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The above mentioned problem is solved. But I am faced with another problem. When I try to access the Web Services, I encounter "HTTP status 405 error: Method not allowed". What is wrong?

 
Old December 15th, 2005, 01:48 AM
Authorized User
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The problem is solved.

saban.

 
Old July 11th, 2006, 03:07 AM
Registered User
 
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi saban,

Please let me know how did you solve ""RequestSoapContext" is not defined for "ws" object." issue.

Thanks
Ginny




Quote:
quote:Originally posted by sabansingh
 I have been trying to use Web Service Enhancements 2.0 SP3, to authenticate and authorize users to use my web services. I have created my web service class on the server side also using WSE.

On the client side I have created a proxy to access the web services. I have also managed to create the security token to authenticate users. However, when I try to add the token to the request context, the code does not compile. The code snippet is given below;

WebserviceClass ws = new WeserviceClass();
UsernameToken token = new UsernameToken(Username,hashedPassword,PasswordOpti on.SendHashed);
ws.RequestSoapContext.Security.Tokens.Add(token);

It says that "RequestSoapContext" is not defined for "ws" object.

Because of this error users aren't getting authenticated and no one is able to access my web services.

Saban.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Service Consuming another web service CraigWhitfield EJB 0 January 10th, 2008 08:38 AM
Upgrades and enhancements plb BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 January 29th, 2007 09:21 AM
Error to Add Web Reference from a Web service jdjbarrios ASP.NET 2.0 Professional 0 July 18th, 2006 02:58 PM
Service Oriented Web Service aldwinenriquez .NET Web Services 2 September 15th, 2005 03:25 AM
Performance Enhancements vidya SQL Server 2000 1 February 19th, 2005 02:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.