Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

trying to access a vb.net program from another pc

Posted on 2006-06-28
16
Medium Priority
?
296 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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
 
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 2000 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

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.

Question has a verified solution.

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

What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

636 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