I built a web service in .NET 2.0 and have implement WSE 3.0 with it for security.
The problem I am having is that I cannot authenticate to it as I cannot reference the SetPolicy and SetClientCredential methods for my webservice. If I don't call these, my application throws an exception as it seems to be expecting the authentication to
be set.
I don't understand why I can't call the SetPolicy and SetClientCredential methods from my webservice. I've followed many examples.
Below is a the declaration for my webservice...
<System.Web.Services.WebService(Namespace:="CGSDotNET_LDAP")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
<Policy("CGSDotNetPolicy")> _
Public Class DotNETLDAP
Inherits System.Web.Services.WebService
The web.config for the web service specifies to use the custom security manager...
And looking at wse3policyCache.config, everything I believe is good...
<policies xmlns="http://schemas.microsoft.com/wse/2005/06/policy">
<extensions>
<extension name="usernameOverTransportSecurity" type="Microsoft.Web.Services3.Design.UsernameOverTransportAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<extension name="requireActionHeader" type="Microsoft.Web.Services3.Design.RequireActionHeaderAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</extensions>
<!-- Important: Name below is used in the Policy attribute of the web service class -->
<policy name="CGSDotNetPolicy">
<!-- Important: This list must either allow all authenticated (*) or specifically name each user -->
<authorization>
<allow user="*"/>
</authorization>
<usernameOverTransportSecurity />
<requireActionHeader />
</policy>
When I run the webservice and publish it, there is no errors so confused.
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
BCTCGS
0 Points
2 Posts
.NET Web Service and WSE 3.0
Nov 18, 2008 01:12 PM|LINK
I built a web service in .NET 2.0 and have implement WSE 3.0 with it for security.
The problem I am having is that I cannot authenticate to it as I cannot reference the SetPolicy and SetClientCredential methods for my webservice. If I don't call these, my application throws an exception as it seems to be expecting the authentication to be set.
I don't understand why I can't call the SetPolicy and SetClientCredential methods from my webservice. I've followed many examples.
Below is a the declaration for my webservice...
<System.Web.Services.WebService(Namespace:="CGSDotNET_LDAP")> _ <System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ <ToolboxItem(False)> _ <Policy("CGSDotNetPolicy")> _ Public Class DotNETLDAP Inherits System.Web.Services.WebServiceThe web.config for the web service specifies to use the custom security manager...
<security> <securityTokenManager> <add type="DotNETLDAPService.CGSUsernameTokenManager, DotNET_LDAP" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken" /> </securityTokenManager> </security> <policy fileName="wse3policyCache.config"/>WSE 3.0 Web Service
johnwsaunder...
Star
11262 Points
1981 Posts
Re: .NET Web Service and WSE 3.0
Nov 19, 2008 08:00 PM|LINK
I can't help you directly, but want to make sure you understand that WSE is obsolete.
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: .NET Web Service and WSE 3.0
Nov 25, 2008 03:11 PM|LINK
Can you upgrade to WCF?
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
PonyBalaji
Member
3 Points
11 Posts
Re: .NET Web Service and WSE 3.0
Nov 25, 2008 05:41 PM|LINK
WSE is obsolete ? How about WSE 2.0 ?
johnwsaunder...
Star
11262 Points
1981 Posts
Re: .NET Web Service and WSE 3.0
Nov 25, 2008 05:48 PM|LINK
All versions of WSE are obsolete. WCF should be used for all new web service development, especially where security is a concern.