WSE SecurityTokenManager in GAC

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

    #1

    WSE SecurityTokenManager in GAC

    I am using a WSE security token manager I have written myself.

    My Web config looks like this
    <securityTokenM anager type="MyNamespa ce.WseSecurityH elper,MyAssembl y"
    xmlns:wsse="htt p://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    qname="wsse:Use rnameToken" />

    It all works really well until I put MyAssembly in the GAC and no longer
    have it in the webservice's bin directory. I then get:

    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
    MyNamespace.Wse SecurityHelper, MyAssembly 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()
    --- End of inner exception stack trace --- at
    Microsoft.Web.S ervices2.Config uration.WebServ icesConfigurati on.Initialize()
    at
    Microsoft.Web.S ervices2.WebSer vicesExtension. BeforeDeseriali zeServer(SoapSe rverMessage
    message)

    Any ideas? Its a hassle because all my webservices use the same helper to
    set roles etc.

    Thanks for any help
    Jon



  • Drew Robbins

    #2
    Re: WSE SecurityTokenMa nager in GAC

    Are you using the strong name with the version and public key token
    appended to "MyAssembly "? For example:

    type="MyNamespa ce.WseSecurityH elper,MyAssembl y,Version=1.0.0 .0,Culture=neut ral,PublicKeyTo ken=5c09e92c59d 4bdda"

    Jon Booth wrote:[color=blue]
    > I am using a WSE security token manager I have written myself.
    >
    > My Web config looks like this
    > <securityTokenM anager type="MyNamespa ce.WseSecurityH elper,MyAssembl y"
    > xmlns:wsse="htt p://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    > qname="wsse:Use rnameToken" />
    >
    > It all works really well until I put MyAssembly in the GAC and no longer
    > have it in the webservice's bin directory. I then get:
    >
    > 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
    > MyNamespace.Wse SecurityHelper, MyAssembly 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()
    > --- End of inner exception stack trace --- at
    > Microsoft.Web.S ervices2.Config uration.WebServ icesConfigurati on.Initialize()
    > at
    > Microsoft.Web.S ervices2.WebSer vicesExtension. BeforeDeseriali zeServer(SoapSe rverMessage
    > message)
    >
    > Any ideas? Its a hassle because all my webservices use the same helper to
    > set roles etc.
    >
    > Thanks for any help
    > Jon
    >
    >
    >[/color]

    Comment

    • Jon Booth

      #3
      Re: WSE SecurityTokenMa nager in GAC

      Thanks Drew, that did it.
      Much appreciated.

      Jon

      "Drew Robbins" <"drew at drewby.com"> wrote in message
      news:OLkqBj5rEH A.1164@TK2MSFTN GP10.phx.gbl...[color=blue]
      > Are you using the strong name with the version and public key token
      > appended to "MyAssembly "? For example:
      >
      > type="MyNamespa ce.WseSecurityH elper,MyAssembl y,Version=1.0.0 .0,Culture=neut ral,PublicKeyTo ken=5c09e92c59d 4bdda"
      >
      > Jon Booth wrote:[color=green]
      >> I am using a WSE security token manager I have written myself.
      >>
      >> My Web config looks like this
      >> <securityTokenM anager type="MyNamespa ce.WseSecurityH elper,MyAssembl y"
      >> xmlns:wsse="htt p://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
      >> qname="wsse:Use rnameToken" />
      >>
      >> It all works really well until I put MyAssembly in the GAC and no longer
      >> have it in the webservice's bin directory. I then get:
      >>
      >> 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
      >> MyNamespace.Wse SecurityHelper, MyAssembly 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()
      >> --- End of inner exception stack trace --- at
      >> Microsoft.Web.S ervices2.Config uration.WebServ icesConfigurati on.Initialize()
      >> at
      >> Microsoft.Web.S ervices2.WebSer vicesExtension. BeforeDeseriali zeServer(SoapSe rverMessage
      >> message)
      >>
      >> Any ideas? Its a hassle because all my webservices use the same helper to
      >> set roles etc.
      >>
      >> Thanks for any help
      >> Jon
      >>
      >>[/color][/color]

      Comment

      • Guest

        #4
        Re: WSE SecurityTokenMa nager in GAC

        Hello Jon,
        I didnot get how you fixed the problem.
        I am also getting similar kind of problem when client is used from some other machin than from machin on which web services are hosted.
        I am also using strong name for the assembly.
        [<section name="microsoft .web.services2" type="Microsoft .Web.Services2. Configuration.W ebServicesConfi guration, Microsoft.Web.S ervices2, Version=2.0.0.0 , Culture=neutral , PublicKeyToken= XXX" />]
        Can you please tell me how to fix the problem...
        Thanks
        Bhagvan
        bchouguleATgmai l.com
        [color=blue]
        > I am using a WSE security token manager I have written myself.
        >
        > My Web config looks like this
        > <securityTokenM anager type="MyNamespa ce.WseSecurityH elper,MyAssembl y"
        > xmlns:wsse="htt p://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
        > qname="wsse:Use rnameToken" />
        >
        > It all works really well until I put MyAssembly in the GAC and no longer
        > have it in the webservice's bin directory. I then get:
        >
        > 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
        > MyNamespace.Wse SecurityHelper, MyAssembly 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()
        > --- End of inner exception stack trace --- at
        > Microsoft.Web.S ervices2.Config uration.WebServ icesConfigurati on.Initialize()
        > at
        > Microsoft.Web.S ervices2.WebSer vicesExtension. BeforeDeseriali zeServer(SoapSe rverMessage
        > message)
        >
        > Any ideas? Its a hassle because all my webservices use the same helper to
        > set roles etc.
        >
        > Thanks for any help
        > Jon
        >
        >
        >[/color]

        User submitted from AEWNET (http://www.aewnet.com/)

        Comment

        Working...