Solved

trying to access a vb.net program from another pc

Posted on 2006-06-28
16
287 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
for loop with Set 4 46
Sorting in Excel with Group Headers if the Exist 2 70
array220 challenge 8 48
topping3 challenge 14 52
This article will show, step by step, how to integrate R code into a R Sweave document
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

747 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

8 Experts available now in Live!

Get 1:1 Help Now