• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

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??
0
bman9111
Asked:
bman9111
  • 7
  • 4
  • 4
  • +1
1 Solution
 
grayeCommented:
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.
0
 
bman9111Author Commented:
I tried on both the client and server pc of putting everything up to full trust and no luck... still that error...



0
 
grayeCommented:
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.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
bman9111Author Commented:
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...
0
 
bman9111Author Commented:
.NET Framework Version 2.0 Redistributable Package (x86)
0
 
t_itaniumCommented:
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
0
 
grayeCommented:
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
0
 
bman9111Author Commented:
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.
0
 
t_itaniumCommented:
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
0
 
bman9111Author Commented:
the program is calling a dsn but I have that same setup on the client pc
maybe u cannot do it
0
 
bman9111Author Commented:
I am wanting to just click a shortcut of a program that is located on a server.....
0
 
t_itaniumCommented:
>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

0
 
bman9111Author Commented:
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....

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

http://www.datadirect.com/developer/net/faq_deploy/index.ssp
0
 
SStoryCommented:
It is definitely a code acess security issue as previously stated. I have experienced this problem before as well.
What are you trying to accomplish?  (One location for the code?)  If so, in 2005, the best thing to do is publish the program to a certain location on the server let the client get it from there--it will always check that location for any updates, and all will work fine without these CAS problems.

I also haven't played with it much, but I've heard there is some tool in 2005 to help explore CAS implications in code.

HTH,

Shane
0
 
grayeCommented:
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).
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 7
  • 4
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now