Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / January 2006

Tip: Looking for answers? Try searching our database.

Delay Signing Project with WebService Proxy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cisco - 24 Jan 2006 20:17 GMT
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 - 24 Jan 2006 20:29 GMT
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?

>  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
[quoted text clipped - 24 lines]
> Done building target "GenerateSerializationAssemblies" in project
> "HistoricalRepository.csproj" -- FAILED.
Steven Cheng[MSFT] - 25 Jan 2006 09:36 GMT
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

Signature

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==
[quoted text clipped - 18 lines]
| 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
|
[quoted text clipped - 29 lines]
| >       - 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 - 26 Jan 2006 01:54 GMT
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.

> Hi Cisco,
>
[quoted text clipped - 100 lines]
> | > Done building target "GenerateSerializationAssemblies" in project
> | > "HistoricalRepository.csproj" -- FAILED.
Steven Cheng[MSFT] - 26 Jan 2006 06:07 GMT
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

Signature

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=?=" <cisco@noemail.noemail>
| References:  <7D74BA15-D63F-4C23-908B-782E6CD51150@microsoft.com>
<2998CB12-057D-4AA1-9502-CE039F8E689B@microsoft.com>
<f3jIULZIGHA.3680@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Delay Signing Project with WebService Proxy
| Date: Wed, 25 Jan 2006 17:54:01 -0800
[quoted text clipped - 13 lines]
| 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
|
[quoted text clipped - 106 lines]
| > 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.