Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional C# 2008 ISBN: 978-0-470-19137-8
This is the forum to discuss the Wrox book Professional C# 2008 by Christian Nagel, Bill Evjen, Jay Glynn, Morgan Skinner, Karli Watson; ISBN: 9780470191378
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C# 2008 ISBN: 978-0-470-19137-8 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 11th, 2011, 11:25 AM
Registered User
Join Date: Apr 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default CH 17 - Assemblies


I'm just learning C# --

I'm studying : chapter 17 - Assemblies -- "Configuring .NET Applications"

Here is my : "Client.exe.config" file

<codeBaseversion=""href="http://localhost/fff/" />
<assemblyIdentityname="SharedDemo"publicKeyToken="1e7437a336992c02" />
<publisherPolicyapply="yes" />
<bindingRedirectoldVersion=""newVersion="" />
<codeBaseversion=""href="" />
I want to get : the : SharedDemo.dll :

from my local web :

with this "codebase" element

<codeBaseversion=""href="" />

When I run "Client.exe" , always error : FileNotFoundException, can't load module...., something like that .

My question is :

How must be make "the web" , so that the component is found ??

Thanks a lot in advance

  #2 (permalink)  
Old May 17th, 2011, 09:20 PM
Registered User
Join Date: Apr 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default I will reply myself

I had problems undersanting the last two sections : "Configuring .NET applications" and "Versioning" .

Using the samples : "SharedDemo" and "Client", produce many errors: "file not found", "bad image file", etc, etc

Problem 1: "SharedDemo" access to file : "Quotes.txt" : that produce error: "file not found"\
This must be resolved getting appropiate permissions.

Problem 2: using key file ".pfx" produces error :
ALINK: error AL1019: Metadata failure while creating assembly -- Bad Version of provider

Surfing webs : I found this, from MIcrosoft:
Assembly Linker does not support PFX Cryptographic Keys - AL1019 -- date: 2/24/2010

so: with : "AL.exe" : must be used a : ".snk" file , not a ".pfx" file !!

Finally, thinking that : it's better to resolve and understand : "one problem at a time" :
I simplify creating :

1. a project : "myDLL" : that just return a string, and
2. a project : "myDLLtest" : that consumes it
3. an : "aplication configuration file" : "myDLLtest.exe.config"
4. a : "publisher policy assembly file"

I run : "myDLLtest.exe", using different combinations of : assemblies and "configuration files"

Then : all began to work and be understood

And now I know : --How to use element : "<codebase>"--

1. It can be used in : "application configuration files"
2. It can be used in : "publisher policy files" :
creating : the "publisher policy assembly file" : with : "AL.exe" : with a : ".snk" key file
( in HELP I read that : "... <codebase> only can be used in : "machine configuration files" and "publisher policy files" :
this is not true " )
3. this works fine : <codeBase version="" href="file:///L:/tmp/" />
4. this works fine : <codeBase version="" href="" />
4. this works fine : <codeBase version="" href="" />
5. but : in any case : the "web" : can't be : a "virtual directory" :
"myDLL.dll" : must be in : "C:\inetpub\wwwroot\ : or : in some subdirectory below.

I hope this may be useful.
I'll appreciate any correction, sugestion, or question.


Last edited by equintana71; May 17th, 2011 at 10:03 PM.. Reason: update

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 17 extended credit mikeashields@hotmail.com BOOK: ASP.NET 4 24-Hour Trainer 2 January 31st, 2012 08:05 AM
Add Class grayed out - Ch. 17 dvdstwrd BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5 0 August 15th, 2009 01:41 PM
error in ch 17 on running both fils no17 Beginning PHP 0 May 10th, 2008 02:15 AM
Ch 17 - Sender Object not working? deanC4 BOOK: Beginning ASP.NET 2.0 and Databases 1 April 18th, 2007 01:25 PM
IStateManager.TrackViewState() Ch 17 EdKroket BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 0 January 25th, 2007 07:10 AM

All times are GMT -4. The time now is 05:34 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.