Delay Signing Project with WebService Proxy

Discussion in 'ASP .Net Web Services' started by cisco, Jan 24, 2006.

  1. cisco

    cisco Guest

    I'm still trying to learn all the changes for 2.0 but i have come across a
    problem i can't seem to figure out. I have a soltuion that has at least two
    projects with a reference to a web service.

    I want to delay sign my assemblies so that i can then obfuscate them for the
    final release. The problem i'm having is that when i delay sign them it
    gives me the error at [1]. If i fully sign them it works fine becuse then the
    xmlSerializers passes strong name validation.

    maybe i can run sn -Vr on it?

    appreciate any help,
    Cisco



    [1]
    Error: Cannot load dynamically generated serialization assembly. In some
    hosting environments assembly load functionality is restricted, consider
    using pre-generated serializer. Please see inner exception for more
    information.
    - Could not load file or assembly
    'HistoricalRepository.XmlSerializers, Version=0.6.0.0, Culture=neutral,
    PublicKeyToken=9046dbda5d4028d4' or one of its dependencies. Strong name
    validation failed. (Exception from HRESULT: 0x8013141A)
    - Strong name validation failed. (Exception from HRESULT: 0x8013141A)

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1892,9): error MSB6006: "sgen.exe" exited with code 1.
    Done building target "GenerateSerializationAssemblies" in project
    "HistoricalRepository.csproj" -- FAILED.
     
    cisco, Jan 24, 2006
    #1
    1. Advertising

  2. cisco

    cisco Guest

    Ok... i hate this but i found the "generate serialization assembly" option
    and turned it off. Doh! :)

    But i would still like to see if i can still turn this feature on and build
    with vs 2005?

    "cisco" wrote:

    >
    > I'm still trying to learn all the changes for 2.0 but i have come across a
    > problem i can't seem to figure out. I have a soltuion that has at least two
    > projects with a reference to a web service.
    >
    > I want to delay sign my assemblies so that i can then obfuscate them for the
    > final release. The problem i'm having is that when i delay sign them it
    > gives me the error at [1]. If i fully sign them it works fine becuse then the
    > xmlSerializers passes strong name validation.
    >
    > maybe i can run sn -Vr on it?
    >
    > appreciate any help,
    > Cisco
    >
    >
    >
    > [1]
    > Error: Cannot load dynamically generated serialization assembly. In some
    > hosting environments assembly load functionality is restricted, consider
    > using pre-generated serializer. Please see inner exception for more
    > information.
    > - Could not load file or assembly
    > 'HistoricalRepository.XmlSerializers, Version=0.6.0.0, Culture=neutral,
    > PublicKeyToken=9046dbda5d4028d4' or one of its dependencies. Strong name
    > validation failed. (Exception from HRESULT: 0x8013141A)
    > - Strong name validation failed. (Exception from HRESULT: 0x8013141A)
    >
    > C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1892,9): error MSB6006: "sgen.exe" exited with code 1.
    > Done building target "GenerateSerializationAssemblies" in project
    > "HistoricalRepository.csproj" -- FAILED.
    >
     
    cisco, Jan 24, 2006
    #2
    1. Advertising

  3. Hi Cisco,

    Welcome to .NET newsgroup.
    Regarding on the webservice serialization assembly problem, I've performed
    some tests on my side and here are some of my understanding and suggestion:

    1. When we turn off "generate serialization assembly", the runtime will
    dynamically generate the serlization assembly for proxy classes, thus, if
    we use delay signing, the runtime/CLR will perform the checking on the
    strong-name(key token and signed value...), thus, it'll generate runtime
    error if we haven't use SN -Vr to skip the verification for that
    assembly.

    2. When we turn on "generate serialization assembly", VS 2005 IDE will try
    using sgen.exe to generate the serizliation assemblies, then the error (due
    to verifiying assembly strong-name ) will be raised at compile/build
    time....

    So in either case, we can use sn -Vr and specify the certain assembly (all
    just use "*" to skip the verification for all delay signed assemblies) to
    avoid the problem.

    Hope helps. Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)





    --------------------
    | Thread-Topic: Delay Signing Project with WebService Proxy
    | thread-index: AcYhJNKkggx3PAvKTZyVheOPPo5SOQ==
    | X-WBNR-Posting-Host: 70.241.128.145
    | From: "=?Utf-8?B?Y2lzY28=?=" <>
    | References: <>
    | Subject: RE: Delay Signing Project with WebService Proxy
    | Date: Tue, 24 Jan 2006 12:29:06 -0800
    | Lines: 40
    | Message-ID: <>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="Utf-8"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | Content-Class: urn:content-classes:message
    | Importance: normal
    | Priority: normal
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webservices:31472
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    |
    | Ok... i hate this but i found the "generate serialization assembly"
    option
    | and turned it off. Doh! :)
    |
    | But i would still like to see if i can still turn this feature on and
    build
    | with vs 2005?
    |
    | "cisco" wrote:
    |
    | >
    | > I'm still trying to learn all the changes for 2.0 but i have come
    across a
    | > problem i can't seem to figure out. I have a soltuion that has at least
    two
    | > projects with a reference to a web service.
    | >
    | > I want to delay sign my assemblies so that i can then obfuscate them
    for the
    | > final release. The problem i'm having is that when i delay sign them
    it
    | > gives me the error at [1]. If i fully sign them it works fine becuse
    then the
    | > xmlSerializers passes strong name validation.
    | >
    | > maybe i can run sn -Vr on it?
    | >
    | > appreciate any help,
    | > Cisco
    | >
    | >
    | >
    | > [1]
    | > Error: Cannot load dynamically generated serialization assembly. In
    some
    | > hosting environments assembly load functionality is restricted,
    consider
    | > using pre-generated serializer. Please see inner exception for more
    | > information.
    | > - Could not load file or assembly
    | > 'HistoricalRepository.XmlSerializers, Version=0.6.0.0, Culture=neutral,
    | > PublicKeyToken=9046dbda5d4028d4' or one of its dependencies. Strong
    name
    | > validation failed. (Exception from HRESULT: 0x8013141A)
    | > - Strong name validation failed. (Exception from HRESULT:
    0x8013141A)
    | >
    | >
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1892,
    9): error MSB6006: "sgen.exe" exited with code 1.
    | > Done building target "GenerateSerializationAssemblies" in project
    | > "HistoricalRepository.csproj" -- FAILED.
    | >
    |
     
    Steven Cheng[MSFT], Jan 25, 2006
    #3
  4. cisco

    cisco Guest

    Hi Steven,

    That was my thinking too but for 2, generating serialization assembly, i
    did not find a way to turn off strong name verification before it built the
    serialization assembly. But i actually did not know about the * option for
    sn. So if i wanted 2 then i would turn off verification for all delay signed
    assemblies and then build? Not too bad for my dev box so i think that's the
    route i'll go.

    "Steven Cheng[MSFT]" wrote:

    > Hi Cisco,
    >
    > Welcome to .NET newsgroup.
    > Regarding on the webservice serialization assembly problem, I've performed
    > some tests on my side and here are some of my understanding and suggestion:
    >
    > 1. When we turn off "generate serialization assembly", the runtime will
    > dynamically generate the serlization assembly for proxy classes, thus, if
    > we use delay signing, the runtime/CLR will perform the checking on the
    > strong-name(key token and signed value...), thus, it'll generate runtime
    > error if we haven't use SN -Vr to skip the verification for that
    > assembly.
    >
    > 2. When we turn on "generate serialization assembly", VS 2005 IDE will try
    > using sgen.exe to generate the serizliation assemblies, then the error (due
    > to verifiying assembly strong-name ) will be raised at compile/build
    > time....
    >
    > So in either case, we can use sn -Vr and specify the certain assembly (all
    > just use "*" to skip the verification for all delay signed assemblies) to
    > avoid the problem.
    >
    > Hope helps. Thanks,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    >
    >
    >
    >
    > --------------------
    > | Thread-Topic: Delay Signing Project with WebService Proxy
    > | thread-index: AcYhJNKkggx3PAvKTZyVheOPPo5SOQ==
    > | X-WBNR-Posting-Host: 70.241.128.145
    > | From: "=?Utf-8?B?Y2lzY28=?=" <>
    > | References: <>
    > | Subject: RE: Delay Signing Project with WebService Proxy
    > | Date: Tue, 24 Jan 2006 12:29:06 -0800
    > | Lines: 40
    > | Message-ID: <>
    > | MIME-Version: 1.0
    > | Content-Type: text/plain;
    > | charset="Utf-8"
    > | Content-Transfer-Encoding: 7bit
    > | X-Newsreader: Microsoft CDO for Windows 2000
    > | Content-Class: urn:content-classes:message
    > | Importance: normal
    > | Priority: normal
    > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
    > | Xref: TK2MSFTNGXA02.phx.gbl
    > microsoft.public.dotnet.framework.aspnet.webservices:31472
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    > |
    > | Ok... i hate this but i found the "generate serialization assembly"
    > option
    > | and turned it off. Doh! :)
    > |
    > | But i would still like to see if i can still turn this feature on and
    > build
    > | with vs 2005?
    > |
    > | "cisco" wrote:
    > |
    > | >
    > | > I'm still trying to learn all the changes for 2.0 but i have come
    > across a
    > | > problem i can't seem to figure out. I have a soltuion that has at least
    > two
    > | > projects with a reference to a web service.
    > | >
    > | > I want to delay sign my assemblies so that i can then obfuscate them
    > for the
    > | > final release. The problem i'm having is that when i delay sign them
    > it
    > | > gives me the error at [1]. If i fully sign them it works fine becuse
    > then the
    > | > xmlSerializers passes strong name validation.
    > | >
    > | > maybe i can run sn -Vr on it?
    > | >
    > | > appreciate any help,
    > | > Cisco
    > | >
    > | >
    > | >
    > | > [1]
    > | > Error: Cannot load dynamically generated serialization assembly. In
    > some
    > | > hosting environments assembly load functionality is restricted,
    > consider
    > | > using pre-generated serializer. Please see inner exception for more
    > | > information.
    > | > - Could not load file or assembly
    > | > 'HistoricalRepository.XmlSerializers, Version=0.6.0.0, Culture=neutral,
    > | > PublicKeyToken=9046dbda5d4028d4' or one of its dependencies. Strong
    > name
    > | > validation failed. (Exception from HRESULT: 0x8013141A)
    > | > - Strong name validation failed. (Exception from HRESULT:
    > 0x8013141A)
    > | >
    > | >
    > C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1892,
    > 9): error MSB6006: "sgen.exe" exited with code 1.
    > | > Done building target "GenerateSerializationAssemblies" in project
    > | > "HistoricalRepository.csproj" -- FAILED.
    > | >
    > |
    >
    >
     
    cisco, Jan 26, 2006
    #4
  5. Hi Cisco,

    Yes, since I just test with a quick approach , so I choose "*" to include
    all delay signed assembly :)

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)



    --------------------
    | Thread-Topic: Delay Signing Project with WebService Proxy
    | thread-index: AcYiG2EtE1KJTF5fRs6wK9rY7MB3QQ==
    | X-WBNR-Posting-Host: 24.167.83.157
    | From: "=?Utf-8?B?Y2lzY28=?=" <>
    | References: <>
    <>
    <>
    | Subject: RE: Delay Signing Project with WebService Proxy
    | Date: Wed, 25 Jan 2006 17:54:01 -0800
    | Lines: 129
    | Message-ID: <>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="Utf-8"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | Content-Class: urn:content-classes:message
    | Importance: normal
    | Priority: normal
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webservices:31483
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    |
    |
    | Hi Steven,
    |
    | That was my thinking too but for 2, generating serialization assembly,
    i
    | did not find a way to turn off strong name verification before it built
    the
    | serialization assembly. But i actually did not know about the * option
    for
    | sn. So if i wanted 2 then i would turn off verification for all delay
    signed
    | assemblies and then build? Not too bad for my dev box so i think that's
    the
    | route i'll go.
    |
    | "Steven Cheng[MSFT]" wrote:
    |
    | > Hi Cisco,
    | >
    | > Welcome to .NET newsgroup.
    | > Regarding on the webservice serialization assembly problem, I've
    performed
    | > some tests on my side and here are some of my understanding and
    suggestion:
    | >
    | > 1. When we turn off "generate serialization assembly", the runtime will
    | > dynamically generate the serlization assembly for proxy classes, thus,
    if
    | > we use delay signing, the runtime/CLR will perform the checking on the
    | > strong-name(key token and signed value...), thus, it'll generate
    runtime
    | > error if we haven't use SN -Vr to skip the verification for that
    | > assembly.
    | >
    | > 2. When we turn on "generate serialization assembly", VS 2005 IDE will
    try
    | > using sgen.exe to generate the serizliation assemblies, then the error
    (due
    | > to verifiying assembly strong-name ) will be raised at compile/build
    | > time....
    | >
    | > So in either case, we can use sn -Vr and specify the certain assembly
    (all
    | > just use "*" to skip the verification for all delay signed assemblies)
    to
    | > avoid the problem.
    | >
    | > Hope helps. Thanks,
    | >
    | > Steven Cheng
    | > Microsoft Online Support
    | >
    | > Get Secure! www.microsoft.com/security
    | > (This posting is provided "AS IS", with no warranties, and confers no
    | > rights.)
    | >
    | >
    | >
    | >
    | >
    | > --------------------
    | > | Thread-Topic: Delay Signing Project with WebService Proxy
    | > | thread-index: AcYhJNKkggx3PAvKTZyVheOPPo5SOQ==
    | > | X-WBNR-Posting-Host: 70.241.128.145
    | > | From: "=?Utf-8?B?Y2lzY28=?=" <>
    | > | References: <>
    | > | Subject: RE: Delay Signing Project with WebService Proxy
    | > | Date: Tue, 24 Jan 2006 12:29:06 -0800
    | > | Lines: 40
    | > | Message-ID: <>
    | > | MIME-Version: 1.0
    | > | Content-Type: text/plain;
    | > | charset="Utf-8"
    | > | Content-Transfer-Encoding: 7bit
    | > | X-Newsreader: Microsoft CDO for Windows 2000
    | > | Content-Class: urn:content-classes:message
    | > | Importance: normal
    | > | Priority: normal
    | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
    | > | Xref: TK2MSFTNGXA02.phx.gbl
    | > microsoft.public.dotnet.framework.aspnet.webservices:31472
    | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    | > |
    | > | Ok... i hate this but i found the "generate serialization assembly"
    | > option
    | > | and turned it off. Doh! :)
    | > |
    | > | But i would still like to see if i can still turn this feature on and
    | > build
    | > | with vs 2005?
    | > |
    | > | "cisco" wrote:
    | > |
    | > | >
    | > | > I'm still trying to learn all the changes for 2.0 but i have come
    | > across a
    | > | > problem i can't seem to figure out. I have a soltuion that has at
    least
    | > two
    | > | > projects with a reference to a web service.
    | > | >
    | > | > I want to delay sign my assemblies so that i can then obfuscate
    them
    | > for the
    | > | > final release. The problem i'm having is that when i delay sign
    them
    | > it
    | > | > gives me the error at [1]. If i fully sign them it works fine
    becuse
    | > then the
    | > | > xmlSerializers passes strong name validation.
    | > | >
    | > | > maybe i can run sn -Vr on it?
    | > | >
    | > | > appreciate any help,
    | > | > Cisco
    | > | >
    | > | >
    | > | >
    | > | > [1]
    | > | > Error: Cannot load dynamically generated serialization
    assembly. In
    | > some
    | > | > hosting environments assembly load functionality is restricted,
    | > consider
    | > | > using pre-generated serializer. Please see inner exception for more
    | > | > information.
    | > | > - Could not load file or assembly
    | > | > 'HistoricalRepository.XmlSerializers, Version=0.6.0.0,
    Culture=neutral,
    | > | > PublicKeyToken=9046dbda5d4028d4' or one of its dependencies. Strong
    | > name
    | > | > validation failed. (Exception from HRESULT: 0x8013141A)
    | > | > - Strong name validation failed. (Exception from HRESULT:
    | > 0x8013141A)
    | > | >
    | > | >
    | >
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1892,
    | > 9): error MSB6006: "sgen.exe" exited with code 1.
    | > | > Done building target "GenerateSerializationAssemblies" in project
    | > | > "HistoricalRepository.csproj" -- FAILED.
    | > | >
    | > |
    | >
    | >
    |
     
    Steven Cheng[MSFT], Jan 26, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Josh Harris
    Replies:
    1
    Views:
    6,814
    ericsingo
    Jul 30, 2008
  2. vidy5300
    Replies:
    0
    Views:
    918
    vidy5300
    Jun 7, 2004
  3. Replies:
    0
    Views:
    1,666
  4. Karsten Wutzke
    Replies:
    1
    Views:
    917
    Steven Simpson
    Aug 20, 2007
  5. Aaron

    COM Interop and Delay Signing of Strong Names

    Aaron, Feb 6, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    376
    Aaron
    Feb 6, 2004
Loading...

Share This Page