Following several online examples, we have implemented the following using WSE 2.0:
In the Web Servic .asmx file:
namespace WebService1
{
public class Service1 : System.Web.Services.WebService
{
public class AuthenticationManager : UsernameTokenManager
{
protected override string AuthenticateToken(UsernameToken token)
{
return token.Password;;
}
}
....
And in the Service's Web.config file we have the following:
<security>
<securityTokenManager
qname="wsse:UsernameToken"
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"
type="WebService1.AuthenticationManager, WebService1" />
When we run the client application, we get an exception when it calls the web service:
System.Web.Services.Protocols.SoapHeaderException: Server unavailable, please try later ---> System.Configuration.ConfigurationException: WSE032: There was an error loading the microsoft.web.services2 configuration section. ---> System.Configuration.ConfigurationException: WSE040: Type WebService1.AuthenticationManager, WebService1 could not be loaded. Please check the configuration file. at System.Web.Configuration.HttpConfigurationRecord.E valuate(String configKey, SectionRecord section)
Any clues as to what we're doing wrong?
Thanks,
Chris