Solved

trying to access a vb.net program from another pc

Posted on 2006-06-28
16
288 Views
Last Modified: 2013-11-14
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
Comment
Question by:bman9111
  • 7
  • 4
  • 4
  • +1
16 Comments
 
LVL 41

Expert Comment

by:graye
ID: 17004971
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
 
LVL 8

Author Comment

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



0
 
LVL 41

Expert Comment

by:graye
ID: 17006134
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
 
LVL 8

Author Comment

by:bman9111
ID: 17006466
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
 
LVL 8

Author Comment

by:bman9111
ID: 17006470
.NET Framework Version 2.0 Redistributable Package (x86)
0
 
LVL 5

Expert Comment

by:t_itanium
ID: 17007026
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
 
LVL 41

Expert Comment

by:graye
ID: 17008586
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
 
LVL 8

Author Comment

by:bman9111
ID: 17008743
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 5

Expert Comment

by:t_itanium
ID: 17008796
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
 
LVL 8

Author Comment

by:bman9111
ID: 17008827
the program is calling a dsn but I have that same setup on the client pc
maybe u cannot do it
0
 
LVL 8

Author Comment

by:bman9111
ID: 17008859
I am wanting to just click a shortcut of a program that is located on a server.....
0
 
LVL 5

Expert Comment

by:t_itanium
ID: 17008874
>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
 
LVL 8

Author Comment

by:bman9111
ID: 17008968
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
 
LVL 5

Expert Comment

by:t_itanium
ID: 17009032
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
 
LVL 25

Accepted Solution

by:
SStory earned 500 total points
ID: 17012547
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
 
LVL 41

Expert Comment

by:graye
ID: 17013327
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now