I created a dll file using VB.NET and VS 2003.
The dll exists on a main web server and it is referenced and used by various applications (windows forms app, web app etc)
Everything works fine for Web apps, but I have a problem when Windows Form App is trying to call this dll. I believe that Windows forms app is calling/accessing the dll using COM.
Windows Form app runs on client PCs and everything works fine as long as I have only 1 .NET framework on those client PCs. ( .NET Framework 1.1). Also, to set necessary permissions to run fine, I had to add a permission under Runtime Security Policies -->Machine--> Code Groups --> LocalIntranet_Zone and gave it a full trust for each PC. ANyway, it runs fine.
Here is my problem now:
For few client PCs, I had to install some other software that requires .NET framework 2.0.
Since the additional framework got installed, my Window App on those clients stopped to succesfully call that dll.
The error I get is:
Error: OLE Dispatch Exception: Request for the permission of type 'System.Data.SqlClient.Sql
ClientPerm
ission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c56193
4e089' failed.
I guess somehow those PCs selected Framework 2.0 to be default, so my permissions set for 1.1 are ignored.
How to strictly set usage of 1.1 framework only?
I think of 2 ways to solve this, but need your help:
1. Is there a was to set some code in dll to force it to use framework 1.1 stricktly? If yes, what is that code?
2. If above is not possible, how I can access framework 2.0 settings on client PC to try to set same/similar permissions. Hoping that will work :)
If you have a better solution, please let me know.
Thank you in advance.
Start Free Trial