Exception in WSE 2.0 example

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

    Exception in WSE 2.0 example

    I am trying to run the Secure Conversation example in WSE 2.0.
    On the call to client.IssueSec urityContextTok enAuthenticated (token,
    issuerToken);
    I get the following exception:

    System.Web.Serv ices.Protocols. SoapException:
    SOAP-Fault code: http://schemas.xmlsoap.org/soap/envelope/:Server
    Message: Server unavailable, please try later
    at
    Microsoft.Web.S ervices2.Messag ing.SoapClient. SendRequestResp onse(String
    methodname, SoapEnvelope envelope)
    at
    Microsoft.Web.S ervices2.Securi ty.SecurityToke nServiceClient. RequestSecurity Token(SecurityT okenMessage
    request, String methodName) at
    Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.RequestS ecurityContextT oken(SecurityTo ken
    baseToken, SecurityToken issuerToken, AppliesTo appliesTo)
    at
    Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.IssueSec urityContextTok enAuthenticated (SecurityToken
    baseToken, SecurityToken issuerToken)
    at SecureConvClien t.SecureConvCli ent.Run() in
    d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
    91
    at SecureConvClien t.SecureConvCli ent.Main(String[] args) in
    d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
    55

    This is all being run locally on a Server 2003 machine with IIS 6.0. I
    believe that I have installed the certificates correctly (emphasis on
    believe...).
    The client private cert is in Current User/Personal.
    The server private cert is in Local Computer/Personal.
    The server public cert in in Current User/Other People

    Any ideas where this is coming from?

    Thanks.

    David



  • aualias

    #2
    Re: Exception in WSE 2.0 example

    Figured it out...

    I just had to give IIS read access to the certificate. I don't think that
    this was mentioned anywhere in the documentation.


    "aualias" <aualias@newsgr oups.nospam> wrote in message
    news:OBGuK0$XFH A.3320@TK2MSFTN GP12.phx.gbl...[color=blue]
    >I am trying to run the Secure Conversation example in WSE 2.0.
    > On the call to client.IssueSec urityContextTok enAuthenticated (token,
    > issuerToken);
    > I get the following exception:
    >
    > System.Web.Serv ices.Protocols. SoapException:
    > SOAP-Fault code: http://schemas.xmlsoap.org/soap/envelope/:Server
    > Message: Server unavailable, please try later
    > at
    > Microsoft.Web.S ervices2.Messag ing.SoapClient. SendRequestResp onse(String
    > methodname, SoapEnvelope envelope)
    > at
    > Microsoft.Web.S ervices2.Securi ty.SecurityToke nServiceClient. RequestSecurity Token(SecurityT okenMessage
    > request, String methodName) at
    > Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.RequestS ecurityContextT oken(SecurityTo ken
    > baseToken, SecurityToken issuerToken, AppliesTo appliesTo)
    > at
    > Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.IssueSec urityContextTok enAuthenticated (SecurityToken
    > baseToken, SecurityToken issuerToken)
    > at SecureConvClien t.SecureConvCli ent.Run() in
    > d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
    > 91
    > at SecureConvClien t.SecureConvCli ent.Main(String[] args) in
    > d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
    > 55
    >
    > This is all being run locally on a Server 2003 machine with IIS 6.0. I
    > believe that I have installed the certificates correctly (emphasis on
    > believe...).
    > The client private cert is in Current User/Personal.
    > The server private cert is in Local Computer/Personal.
    > The server public cert in in Current User/Other People
    >
    > Any ideas where this is coming from?
    >
    > Thanks.
    >
    > David
    >
    >
    >[/color]


    Comment

    • Fernando

      #3
      Re: Exception in WSE 2.0 example

      I am having the following exception, maybe you can help me...:

      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()

      it doesn't looks like it is the same problem... do you have any idea?
      any help will be great...

      "aualias" wrote:
      [color=blue]
      > Figured it out...
      >
      > I just had to give IIS read access to the certificate. I don't think that
      > this was mentioned anywhere in the documentation.
      >
      >
      > "aualias" <aualias@newsgr oups.nospam> wrote in message
      > news:OBGuK0$XFH A.3320@TK2MSFTN GP12.phx.gbl...[color=green]
      > >I am trying to run the Secure Conversation example in WSE 2.0.
      > > On the call to client.IssueSec urityContextTok enAuthenticated (token,
      > > issuerToken);
      > > I get the following exception:
      > >
      > > System.Web.Serv ices.Protocols. SoapException:
      > > SOAP-Fault code: http://schemas.xmlsoap.org/soap/envelope/:Server
      > > Message: Server unavailable, please try later
      > > at
      > > Microsoft.Web.S ervices2.Messag ing.SoapClient. SendRequestResp onse(String
      > > methodname, SoapEnvelope envelope)
      > > at
      > > Microsoft.Web.S ervices2.Securi ty.SecurityToke nServiceClient. RequestSecurity Token(SecurityT okenMessage
      > > request, String methodName) at
      > > Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.RequestS ecurityContextT oken(SecurityTo ken
      > > baseToken, SecurityToken issuerToken, AppliesTo appliesTo)
      > > at
      > > Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.IssueSec urityContextTok enAuthenticated (SecurityToken
      > > baseToken, SecurityToken issuerToken)
      > > at SecureConvClien t.SecureConvCli ent.Run() in
      > > d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
      > > 91
      > > at SecureConvClien t.SecureConvCli ent.Main(String[] args) in
      > > d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
      > > 55
      > >
      > > This is all being run locally on a Server 2003 machine with IIS 6.0. I
      > > believe that I have installed the certificates correctly (emphasis on
      > > believe...).
      > > The client private cert is in Current User/Personal.
      > > The server private cert is in Local Computer/Personal.
      > > The server public cert in in Current User/Other People
      > >
      > > Any ideas where this is coming from?
      > >
      > > Thanks.
      > >
      > > David
      > >
      > >
      > >[/color]
      >
      >
      >[/color]

      Comment

      • Fernando

        #4
        Re: Exception in WSE 2.0 example

        I am having the following exception, maybe you can help me...:

        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()

        it doesn't looks like it is the same problem... do you have any idea?
        any help will be great...

        "aualias" wrote:
        [color=blue]
        > Figured it out...
        >
        > I just had to give IIS read access to the certificate. I don't think that
        > this was mentioned anywhere in the documentation.
        >
        >
        > "aualias" <aualias@newsgr oups.nospam> wrote in message
        > news:OBGuK0$XFH A.3320@TK2MSFTN GP12.phx.gbl...[color=green]
        > >I am trying to run the Secure Conversation example in WSE 2.0.
        > > On the call to client.IssueSec urityContextTok enAuthenticated (token,
        > > issuerToken);
        > > I get the following exception:
        > >
        > > System.Web.Serv ices.Protocols. SoapException:
        > > SOAP-Fault code: http://schemas.xmlsoap.org/soap/envelope/:Server
        > > Message: Server unavailable, please try later
        > > at
        > > Microsoft.Web.S ervices2.Messag ing.SoapClient. SendRequestResp onse(String
        > > methodname, SoapEnvelope envelope)
        > > at
        > > Microsoft.Web.S ervices2.Securi ty.SecurityToke nServiceClient. RequestSecurity Token(SecurityT okenMessage
        > > request, String methodName) at
        > > Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.RequestS ecurityContextT oken(SecurityTo ken
        > > baseToken, SecurityToken issuerToken, AppliesTo appliesTo)
        > > at
        > > Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.IssueSec urityContextTok enAuthenticated (SecurityToken
        > > baseToken, SecurityToken issuerToken)
        > > at SecureConvClien t.SecureConvCli ent.Run() in
        > > d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
        > > 91
        > > at SecureConvClien t.SecureConvCli ent.Main(String[] args) in
        > > d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
        > > 55
        > >
        > > This is all being run locally on a Server 2003 machine with IIS 6.0. I
        > > believe that I have installed the certificates correctly (emphasis on
        > > believe...).
        > > The client private cert is in Current User/Personal.
        > > The server private cert is in Local Computer/Personal.
        > > The server public cert in in Current User/Other People
        > >
        > > Any ideas where this is coming from?
        > >
        > > Thanks.
        > >
        > > David
        > >
        > >
        > >[/color]
        >
        >
        >[/color]

        Comment

        • aualias

          #5
          Re: Exception in WSE 2.0 example

          I'm just learning this stuff. Others in this newsgroup know a lot more than
          I do, so here is my guess...

          I think that you are right, that it is a different problem, but I would
          check the permissions just to be thorough.
          Also verify that the certificates have been installed correctly.

          I looked at the web.config file from the example that I have been playing
          with. Here is a section...

          <serverToken>
          <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"
          xmlns:wsse="htt p://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
          <wsse:SecurityT okenReference>
          <!-- Replace the identifier below with your own certificate Id in
          Base64String here
          The certificate is from the Local Machine store's Personal
          folder, and the certificate
          Id can be retrieved by X509Certificate
          -->
          <wsse:KeyIdenti fier
          ValueType="http ://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509Subject KeyIdentifier"> bBwPfItvKp3b6TN Dq+14qs58VJQ=</wsse:KeyIdentif ier>
          </wsse:SecurityTo kenReference>
          </KeyInfo>
          </serverToken>

          Make sure that your attributes (http://....) point to the correct locations
          and that the KeyIdentifier is the correct one for your certificate.

          Hopefully, someone who knows more that I will weigh in on this...

          David




          "Fernando" <Fernando@discu ssions.microsof t.com> wrote in message
          news:5245BA7D-1D8C-44E8-819A-52CE0A38CE0D@mi crosoft.com...[color=blue]
          >I am having the following exception, maybe you can help me...:
          >
          > 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()
          >
          > it doesn't looks like it is the same problem... do you have any idea?
          > any help will be great...
          >
          > "aualias" wrote:
          >[color=green]
          >> Figured it out...
          >>
          >> I just had to give IIS read access to the certificate. I don't think
          >> that
          >> this was mentioned anywhere in the documentation.
          >>
          >>
          >> "aualias" <aualias@newsgr oups.nospam> wrote in message
          >> news:OBGuK0$XFH A.3320@TK2MSFTN GP12.phx.gbl...[color=darkred]
          >> >I am trying to run the Secure Conversation example in WSE 2.0.
          >> > On the call to client.IssueSec urityContextTok enAuthenticated (token,
          >> > issuerToken);
          >> > I get the following exception:
          >> >
          >> > System.Web.Serv ices.Protocols. SoapException:
          >> > SOAP-Fault code: http://schemas.xmlsoap.org/soap/envelope/:Server
          >> > Message: Server unavailable, please try later
          >> > at
          >> > Microsoft.Web.S ervices2.Messag ing.SoapClient. SendRequestResp onse(String
          >> > methodname, SoapEnvelope envelope)
          >> > at
          >> > Microsoft.Web.S ervices2.Securi ty.SecurityToke nServiceClient. RequestSecurity Token(SecurityT okenMessage
          >> > request, String methodName) at
          >> > Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.RequestS ecurityContextT oken(SecurityTo ken
          >> > baseToken, SecurityToken issuerToken, AppliesTo appliesTo)
          >> > at
          >> > Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.IssueSec urityContextTok enAuthenticated (SecurityToken
          >> > baseToken, SecurityToken issuerToken)
          >> > at SecureConvClien t.SecureConvCli ent.Run() in
          >> > d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
          >> > 91
          >> > at SecureConvClien t.SecureConvCli ent.Main(String[] args) in
          >> > d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
          >> > 55
          >> >
          >> > This is all being run locally on a Server 2003 machine with IIS 6.0. I
          >> > believe that I have installed the certificates correctly (emphasis on
          >> > believe...).
          >> > The client private cert is in Current User/Personal.
          >> > The server private cert is in Local Computer/Personal.
          >> > The server public cert in in Current User/Other People
          >> >
          >> > Any ideas where this is coming from?
          >> >
          >> > Thanks.
          >> >
          >> > David
          >> >
          >> >
          >> >[/color]
          >>
          >>
          >>[/color][/color]


          Comment

          • aualias

            #6
            Re: Exception in WSE 2.0 example

            I'm just learning this stuff. Others in this newsgroup know a lot more than
            I do, so here is my guess...

            I think that you are right, that it is a different problem, but I would
            check the permissions just to be thorough.
            Also verify that the certificates have been installed correctly.

            I looked at the web.config file from the example that I have been playing
            with. Here is a section...

            <serverToken>
            <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"
            xmlns:wsse="htt p://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:SecurityT okenReference>
            <!-- Replace the identifier below with your own certificate Id in
            Base64String here
            The certificate is from the Local Machine store's Personal
            folder, and the certificate
            Id can be retrieved by X509Certificate
            -->
            <wsse:KeyIdenti fier
            ValueType="http ://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509Subject KeyIdentifier"> bBwPfItvKp3b6TN Dq+14qs58VJQ=</wsse:KeyIdentif ier>
            </wsse:SecurityTo kenReference>
            </KeyInfo>
            </serverToken>

            Make sure that your attributes (http://....) point to the correct locations
            and that the KeyIdentifier is the correct one for your certificate.

            Hopefully, someone who knows more that I will weigh in on this...

            David




            "Fernando" <Fernando@discu ssions.microsof t.com> wrote in message
            news:5245BA7D-1D8C-44E8-819A-52CE0A38CE0D@mi crosoft.com...[color=blue]
            >I am having the following exception, maybe you can help me...:
            >
            > 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()
            >
            > it doesn't looks like it is the same problem... do you have any idea?
            > any help will be great...
            >
            > "aualias" wrote:
            >[color=green]
            >> Figured it out...
            >>
            >> I just had to give IIS read access to the certificate. I don't think
            >> that
            >> this was mentioned anywhere in the documentation.
            >>
            >>
            >> "aualias" <aualias@newsgr oups.nospam> wrote in message
            >> news:OBGuK0$XFH A.3320@TK2MSFTN GP12.phx.gbl...[color=darkred]
            >> >I am trying to run the Secure Conversation example in WSE 2.0.
            >> > On the call to client.IssueSec urityContextTok enAuthenticated (token,
            >> > issuerToken);
            >> > I get the following exception:
            >> >
            >> > System.Web.Serv ices.Protocols. SoapException:
            >> > SOAP-Fault code: http://schemas.xmlsoap.org/soap/envelope/:Server
            >> > Message: Server unavailable, please try later
            >> > at
            >> > Microsoft.Web.S ervices2.Messag ing.SoapClient. SendRequestResp onse(String
            >> > methodname, SoapEnvelope envelope)
            >> > at
            >> > Microsoft.Web.S ervices2.Securi ty.SecurityToke nServiceClient. RequestSecurity Token(SecurityT okenMessage
            >> > request, String methodName) at
            >> > Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.RequestS ecurityContextT oken(SecurityTo ken
            >> > baseToken, SecurityToken issuerToken, AppliesTo appliesTo)
            >> > at
            >> > Microsoft.Web.S ervices2.Securi ty.SecurityCont extTokenService Client.IssueSec urityContextTok enAuthenticated (SecurityToken
            >> > baseToken, SecurityToken issuerToken)
            >> > at SecureConvClien t.SecureConvCli ent.Run() in
            >> > d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
            >> > 91
            >> > at SecureConvClien t.SecureConvCli ent.Main(String[] args) in
            >> > d:\work\tests1\ securitytestsws e\secureconvcod eclient\securec onvclient.cs:li ne
            >> > 55
            >> >
            >> > This is all being run locally on a Server 2003 machine with IIS 6.0. I
            >> > believe that I have installed the certificates correctly (emphasis on
            >> > believe...).
            >> > The client private cert is in Current User/Personal.
            >> > The server private cert is in Local Computer/Personal.
            >> > The server public cert in in Current User/Other People
            >> >
            >> > Any ideas where this is coming from?
            >> >
            >> > Thanks.
            >> >
            >> > David
            >> >
            >> >
            >> >[/color]
            >>
            >>
            >>[/color][/color]


            Comment

            Working...