![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
When i run the client.exe program i am getting following exception: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'ServiceClass, Version=0.0.0.0, Cult ure=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. File name: 'ServiceClass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' at Client.Main(String[] Args) |
#3
| |||
| |||
|
|
scsharma wrote: When i run the client.exe program i am getting following exception: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'ServiceClass, Version=0.0.0.0, Cult ure=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. File name: 'ServiceClass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' at Client.Main(String[] Args) So the client program cannot load your Service assembly which, I assume defines the Remoted Component. Since the assembly isn't in the Global Assembly Cache (no PublicKeyToken), unless you have entries in App.Config to tell it otherwise, the application expects to find this assembly in the same directory as the application. HTH, Phill W. |
#4
| |||
| |||
|
|
But thats was not mentioned in the document. |
|
I assumed that once i tell my client program that my remote components are hosted in IIS everything should be good to go. |
|
can you please advice how i can tell the .config file to not look for assembly in GAC |
#5
| |||
| |||
|
|
scsharma wrote: But thats was not mentioned in the document. Now there's a surprise ... ;-) I assumed that once i tell my client program that my remote components are hosted in IIS everything should be good to go. I've not used IIS as a host, I prefer using my own Service but the client-side stuff shouldn't be /very/ different, if at all. can you please advice how i can tell the .config file to not look for assembly in GAC You can't. The Framework will search the GAC for an assembly and, if it finds it, will use it from there - IIRC, it's more efficient loading things this way around. However, since your assembly /isn't/ in the GAC, you can identify where it lives by using dependentAssembly and CodeBase entries in App.Config, something like ?xml version="1.0" encoding="utf-8" ? configuration runtime assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" dependentAssembly assemblyIdentity name="X.Y.Z.Class" publicKeyToken="1234567890123456" culture="neutral" / codeBase version="1.0.0.0" href="..\Dir1\X.Y.Z.dll" / /dependentAssembly /assemblyBinding /runtime /configuration HTH, Phill W. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |