Exception while trying to use Secure Conversation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fernando

    #1

    Exception while trying to use Secure Conversation

    The exception is raised in the following line of the code:
    SecurityContext Token sct
    = client.IssueSec urityContextTok enAuthenticated (token, issuerToken);


    The exception is the following:
    uncontrolled exception of type 'System.Web.Ser vices.Protocols .SoapException'
    en microsoft.web.s ervices2.dll

    additional information: System.Web.Serv ices.Protocols. SoapHeaderExcep tion:
    Server unavailable, please try later --->
    System.Configur ation.Configura tionException: WSE032: There was an error
    loading the microsoft.web.s ervices2 configuration section. --->
    System.Configur ation.Configura tionException: WSE040: Type
    WSSecureConvSer vice.CustomUser nameTokenManage r, WSSecureConvSer vice could not
    be loaded. Please check the configuration file.
    at System.Web.Conf iguration.HttpC onfigurationRec ord.Evaluate(St ring
    configKey, SectionRecord section)
    at System.Web.Conf iguration.HttpC onfigurationRec ord.GetConfig(S tring
    configKey, Boolean cacheResult)
    at System.Web.Conf iguration.HttpC onfigurationRec ord.GetConfig(S tring
    configKey, Boolean cacheResult)
    at System.Web.Http Context.GetConf ig(String name)
    at
    System.Web.Conf iguration.HttpC onfigurationSys temBase.System. Configuration.I ConfigurationSy stem.GetConfig( String configKey)
    at System.Configur ation.Configura tionSettings.Ge tConfig(String sectionName)
    at
    Microsoft.Web.S ervices2.Config uration.WebServ icesConfigurati on.Initialize()

    Any help will be great.
    Thanks.
  • Fernando

    #2
    RE: Exception while trying to use Secure Conversation

    I found the problem... it was this line in the configuration file:
    <securityTokenM anager type="Laborator ioContracts.Cus tomUsernameToke nManager,
    LaboratorioCont racts"
    xmlns:wsse="htt p://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" qname="wsse:Use rnameToken" />

    It had old reference (from where i took the example).
    But, now i have a new problem... :(

    System.Web.Serv ices.Protocols. SoapHeaderExcep tion: Server unavailable,
    please try later ---> System.InvalidO perationExcepti on: Private Key is not
    available
    at
    Microsoft.Web.S ervices2.Securi ty.Cryptography .RSACryptoServi ceProvider.Decr ypt(Byte[] ciphertext, Boolean useOAEP)
    at
    Microsoft.Web.S ervices2.Securi ty.Cryptography .RSA15KeyExchan geFormatter.Dec ryptKey(Byte[] cipherKey)
    at Microsoft.Web.S ervices2.Securi ty.EncryptedKey .Decrypt()
    at Microsoft.Web.S ervices2.Securi ty.Security.Loa dXml(XmlElement element)
    at
    Microsoft.Web.S ervices2.Securi ty.SecurityInpu tFilter.Process Message(SoapEnv elope envelope)
    at Microsoft.Web.S ervices2.Pipeli ne.ProcessInput Message(SoapEnv elope
    envelope)
    at
    Microsoft.Web.S ervices2.WebSer vicesExtension. BeforeDeseriali zeServer(SoapSe rverMessage message)

    Comment

    Working...