The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by jimhaley]

Fergal,
Great book. I'm really enjoying reading your book and the examples are very
helpful.

My question is... In section 2.7, you discuss the downloading of assemblies.
I'm using Microsoft IIS on an xp pro platform. Everything works fine until I
change the codeBase version attribute from 1.0.0.0 to 2.0.0.0 (I also changed
the deploy virtual directory to point to directory person2000). When I
attempt to run the same program, I get a CLR Debugging Services error. Do you
have any suggestions on what my problem might be?

Thanks
import-bot (20211) [Avatar] Offline
#2
Re: any known problems downloading assemblies on IIS
[Originally posted by fgrimes]

Hi Jim,

>> I'm really enjoying reading your book
>> and the examples are very helpful.

Glad you like it.

>> I get a CLR Debugging Services error

Can you give me the error message/number?

Regards,
Fergal
import-bot (20211) [Avatar] Offline
#3
Re: any known problems downloading assemblies on IIS
[Originally posted by jimhaley]

Fergal,

Thanks for the quick response.

Here are the steps that I’ve taken…

1) Everything works fine when I use the person1000person.cs file with the
AssemblyVersion = 1.0.0.0 and
the people.exe.config codeBase version = 1.0.0.0. The program downloads the
appropriate person.dll file and outputs the correct information. I confirm
that the appropriate file has been downloaded to the cache using the gacutil
–ldl command.

2) I clear the cache using the gacutil –cdl command.

3) I change the AssemblyVersion parameter within the person1000person.cs file
to 2.0.0.0 and recompile the file. I intentionally do not change the
people.exe.config file to reflect this change in the codeBase parameter. When
I execute the program I get the results I would expect – A warning about the
mismatch of the assembly Major Version.

4) I change the codeBase parameter in the people.exe.config file to match the
person.cs file AssemblyVersion. I get an error with the following Assembly
Binding Log Viewer results…

*** Assembly Binder Log Entry (4/3/2002 @ 1:12:15 PM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:
C:WINDOWSMicrosoft.NETFrameworkv1.0.3705fusion.dll
Running under executable C:JimHaleymicrosoftc#demopeople.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: DisplayName = person, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=095c4167635d900c
(Fully-specified)
LOG: Appbase = C:JimHaleymicrosoftc#demo
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : people, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null.
===

LOG: Processing DEVPATH.
LOG: DEVPATH is not set. Falling through to regular bind.
LOG: Attempting application configuration file download.
LOG: Download of application configuration file was attempted from
file:///C:/JimHaley/microsoft/c#/demo/people.exe.config.
LOG: Found application configuration file
(C:JimHaleymicrosoftc#demopeople.exe.config).
LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:WINDOWSMicrosoft.NETFrameworkv1.0.3705configmachine.config.
LOG: Post-policy reference: person, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=095c4167635d900c
LOG: Cache Lookup was unsuccessful.
LOG: Attempting download of new URL
file:///C:/JimHaley/microsoft/c#/demo/person.DLL.
LOG: Attempting download of new URL
file:///C:/JimHaley/microsoft/c#/demo/person/person.DLL.
LOG: Attempting download of new URL
file:///C:/JimHaley/microsoft/c#/demo/person.EXE.
LOG: Attempting download of new URL
file:///C:/JimHaley/microsoft/c#/demo/person/person.EXE.
LOG: All probing URLs attempted and failed.

Do you have any suggestions on what I might be doing wrong? I appreciate your
help.

Thanks!
import-bot (20211) [Avatar] Offline
#4
Re: any known problems downloading assemblies on IIS
[Originally posted by fgrimes]

Hi Jim,

It's difficult to diagnose a problem like this at long distance since I don't
have your config files, and we don't share settings, etc. I note that the
assembly binder log shows that the application configuration file was found OK
in step 4.

As you describe them, steps 1 and 4 are identical scenarios, albeit with
different DLL versions. So both should work identically. (Right? Or are you
testing something new in step 4? Or am I missing something?)

So try creating and compiling two separate clients and and using codeBase to
point them to their respective DLLs, as follows:

- http://localhost/deploy1000/person.dll
- http://localhost/deploy2000/person.dll

(Create two IIS virtuals dirs.) Remember to first clear the download cache,
also perhaps restart IIS, etc.

Sorry I can't put my finger directly on the problem.

Regards,
Fergal