The exception is raised in the following line of the code:
SecurityContextToken sct
= client.IssueSecurityContextTokenAuthenticated(token, issuerToken);
The exception is the following:
uncontrolled exception of type 'System.Web.Services.Protocols.SoapException'
en microsoft.web.services2.dll
additional information: 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
WSSecureConvService.CustomUsernameTokenManager, WSSecureConvService could not
be loaded. Please check the configuration file.
at System.Web.Configuration.HttpConfigurationRecord.Evaluate(String
configKey, SectionRecord section)
at System.Web.Configuration.HttpConfigurationRecord.GetConfig(String
configKey, Boolean cacheResult)
at System.Web.Configuration.HttpConfigurationRecord.GetConfig(String
configKey, Boolean cacheResult)
at System.Web.HttpContext.GetConfig(String name)
at
System.Web.Configuration.HttpConfigurationSystemBase.System.Configuration.IConfigurationSystem.GetConfig(String configKey)
at System.Configuration.ConfigurationSettings.GetConfig(String sectionName)
at
Microsoft.Web.Services2.Configuration.WebServicesConfiguration.Initialize()
Any help will be great.
Thanks.
Fernando - 26 May 2005 17:47 GMT
I found the problem... it was this line in the configuration file:
<securityTokenManager type="LaboratorioContracts.CustomUsernameTokenManager,
LaboratorioContracts"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" qname="wsse:UsernameToken" />
It had old reference (from where i took the example).
But, now i have a new problem... :(
System.Web.Services.Protocols.SoapHeaderException: Server unavailable,
please try later ---> System.InvalidOperationException: Private Key is not
available
at
Microsoft.Web.Services2.Security.Cryptography.RSACryptoServiceProvider.Decrypt(Byte[] ciphertext, Boolean useOAEP)
at
Microsoft.Web.Services2.Security.Cryptography.RSA15KeyExchangeFormatter.DecryptKey(Byte[] cipherKey)
at Microsoft.Web.Services2.Security.EncryptedKey.Decrypt()
at Microsoft.Web.Services2.Security.Security.LoadXml(XmlElement element)
at
Microsoft.Web.Services2.Security.SecurityInputFilter.ProcessMessage(SoapEnvelope envelope)
at Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope
envelope)
at
Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage message)