Using a local copy of a Shared Assembly

  • Thread starter Thread starter JahMic
  • Start date Start date
J

JahMic

Here is my situation:

I have a client who wants to run a .NET binary from one of his web
scripts (not asp). Furthermore, it is on a shared virtual hosting
environment (yes, it's at least Windows), so we have FTP access and
that is about it. So, no nice installer, etc, just FTP.

In our localhost testing, this works fine. But on the actual server,
the key operation fails because it can't find the needed assembly.
It's usually in the GAC, and I am trying to get it use a local copy
with no luck thus far.

I tried to make an app.config to specify this local copy with no luck,
but admittedly, I know little about this process.

Any suggestions more then welcome.

Thanks, J
 
* JahMic wrote, On 10-9-2009 13:52:
Here is my situation:

I have a client who wants to run a .NET binary from one of his web
scripts (not asp). Furthermore, it is on a shared virtual hosting
environment (yes, it's at least Windows), so we have FTP access and
that is about it. So, no nice installer, etc, just FTP.

In our localhost testing, this works fine. But on the actual server,
the key operation fails because it can't find the needed assembly.
It's usually in the GAC, and I am trying to get it use a local copy
with no luck thus far.

I tried to make an app.config to specify this local copy with no luck,
but admittedly, I know little about this process.

Any suggestions more then welcome.

Thanks, J

Have a look at the following article. I think you should be looking at
the <codebase> element.

http://msdn.microsoft.com/en-us/library/4191fzwb.aspx
 
* JahMic wrote, On 10-9-2009 13:52:











Have a look at the following article. I think you should be looking at
the <codebase> element.

http://msdn.microsoft.com/en-us/library/4191fzwb.aspx

--
Jesse Houwing
jesse.houwing at sogeti.nl- Hide quoted text -

- Show quoted text -


Thanks for the info. I'm getting closer, but I now getting the
following error:

Could not load file or assembly 'vjslib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified.;

Here is my App.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="vjslib"
publicKeyToken="b03f5f7f11d50a3a"
culture="neutral"/>
<codeBase version="2.0.0.0"
href="http://www.XXXXXXX.com/vjslib.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

I have verified that the dll exists as I can download through my
browser.

Any more suggestions?

Thanks, J
 
* JahMic wrote, On 12-9-2009 13:10:
Thanks for the info. I'm getting closer, but I now getting the
following error:

Could not load file or assembly 'vjslib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified.;

Here is my App.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="vjslib"
publicKeyToken="b03f5f7f11d50a3a"
culture="neutral"/>
<codeBase version="2.0.0.0"
href="http://www.XXXXXXX.com/vjslib.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

I have verified that the dll exists as I can download through my
browser.

Any more suggestions?

Thanks, J

If the location isn't trusted it won't work. I believe you can specify a
local path as well. Which would be more usable.
 
* JahMic wrote, On 12-9-2009 13:10:










If the location isn't trusted it won't work. I believe you can specify a
local path as well. Which would be more usable.



Thanks for the followup. I have changed my app.config to the
following:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="D:\Hosting\4700604\html\bin"/>
</assemblyBinding>
</runtime>
</configuration>

And now get the following error message:

Could not load file or assembly 'vjslib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. An attempt was made to load a program with an incorrect
format.;

Do I need to specify some sort of indicator file?

All suggestions appreciated,

Thanks, J
 
* JahMic wrote, On 13-9-2009 15:50:
Thanks for the followup. I have changed my app.config to the
following:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="D:\Hosting\4700604\html\bin"/>
</assemblyBinding>
</runtime>
</configuration>

And now get the following error message:

Could not load file or assembly 'vjslib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. An attempt was made to load a program with an incorrect
format.;

Do I need to specify some sort of indicator file?

All suggestions appreciated,

Thanks, J

Visual J# (which is the package you're using) needs to be installed
though the redistributable package.

http://msdn.microsoft.com/en-us/vjsharp/bb188598.aspx

You should ask your hosting party to install one of these. I'm not sure
you'll be able to get it to work without it's dependencies.
 
Back
Top