Link to home
Start Free TrialLog in
Avatar of bman9111
bman9111

asked on

trying to access a vb.net program from another pc

I have a program that sits on a folder that is shared on another pc...when i click on the program I get this error

request for the permission type system.data.oledb.oledbpermission, system.data, version=2.0.0.0, culture=neutral, publickeytoken =.......


what can I do to fix this??
Avatar of graye
graye
Flag of United States of America image

One of the features of the .Net Framework allows users to set “code access permission” for the PC (or individual programs).  By default, the Framework's own security settings will not allow any program to run from a network share that requires "significant" permissions.  Since that application apparently requires some permissions to work properly, the default settings will not allow it run from a network share.  Note: The default settings are sufficient when it is run from a local drive.

To solve the problem, you can either copy the program files to a local drive, or adjust the .Net Framework assembly permissions.

To adjust permissions, you use the .Net Framework 2.0 Configuration control panel applet (on a development PC).  Navigate to "Configure Code Access Security Policy", “Adjust Zone Security”, "Make changes to this computer".  Click on the Local Intranet icon and move the slider up to "Full Trust".

You can also use the .Net Framework 2.0 Configuration control panel applet to create an MSI file that you can use to deploy these changes via a GPO or login batch to the other PCs in your LAN.   Click on the "Configure Code Access Security Policy", "Create Deployment Package".   When the Wizard opens, click on the "Machine" security policy, and select a folder/name of the MSI file that will be created.
Avatar of bman9111
bman9111

ASKER

I tried on both the client and server pc of putting everything up to full trust and no luck... still that error...



Make sure you're adjusting the correct framework version (adjusting permission for v1.1 doesn't do anything for v2.0)

If that doesn't work, then you might have to  post the whole error message for us to look at.
that was the whole error....except for some number....


also I installed .net 2.0 on each client pc and I noticed that there isn't a 2.0 configuration icon on administration tools...

I used the dotnet2.0.exe redistrubution...
.NET Framework Version 2.0 Redistributable Package (x86)
i think you do not have enough permision to use the program or one of its libraries.. ie DLLs..

by the way y r u trying to access it from the server...y just have a version for each client....or try to have an application with two projects one for host and one for client using .NET remoting..


cheeers
TAREK
I still think it's a Code Access Permission issue...

You should use the steps I outlined above to create an MSI deployment package to configure the Code Access Permissions on the client PCs
i would try that but for some reason the 2.0 configuration icon on administration tools...
 isn't showing up only the 1.0 configurations and wizards....very wierd...


I need this to run from the server because it run 10 times faster because the data lies there.... if I place the program on the user pc it takes 5 minutes vs 10 sec. on the server.
using .NET REMOTING will connect the client to the server while all the work will be done at the server side...

http://www.csharphelp.com/archives/archive157.html
the program is calling a dsn but I have that same setup on the client pc
maybe u cannot do it
I am wanting to just click a shortcut of a program that is located on a server.....
>maybe u cannot do it

y?

i think .net remoting is the ideal way to do what you want to do..
suppose several users need to access the same program..it will e a problem..

cheers

all i know is that when installing the net2.0 distribution pack the file Mscorcfg.msc  is not included and i think that is what I need to set the rights to full trust to all the data.dll to work correctly....

maybe it has to do with sharing assemblies.. read this maybe it will help

http://www.datadirect.com/developer/net/faq_deploy/index.ssp
ASKER CERTIFIED SOLUTION
Avatar of SStory
SStory
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That's correct... the Dot Net 2.0 Distrubution doesn't have the control panel applet.   That's why I suggested that you create an MSI package (on a development PC which *does* have the applet) to deploy the "security policy" to the other client PCs (which do not have the applet).