472,983 Members | 2,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

Security violations when running on a network drive

Dom
In my C++ and VB days, it was easy to put a program on a network
drive, and allow each user to shortcut to it. Then, when needed, I
could just update the program on the network drive, and each user
automatically had it the next time they ran it.

Sometimes seems to be happening in CSharp. Now I get the error:

"Request for the permission of type
'System.Data.SqlClient.SqlClientPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=<...>' failed."

Is there a work around here, or is this really a question for an XP
group? I'm reduced to emailing programs to users, but I need to munge
the ".exe" to ".exe_X", and let the users rename it. Some are not
comfortable with this.

Dom

Jun 27 '08 #1
6 1105
On Apr 22, 3:31 pm, Dom <dolivas...@gmail.comwrote:
In my C++ and VB days, it was easy to put a program on a network
drive, and allow each user to shortcut to it. Then, when needed, I
could just update the program on the network drive, and each user
automatically had it the next time they ran it.

Sometimes seems to be happening in CSharp. Now I get the error:

"Request for the permission of type
'System.Data.SqlClient.SqlClientPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=<...>' failed."

Is there a work around here, or is this really a question for an XP
group? I'm reduced to emailing programs to users, but I need to munge
the ".exe" to ".exe_X", and let the users rename it. Some are not
comfortable with this.

Dom
SqlClientPermission probably means that your program doesnt have the
right credentials to access the DB.
Check the connection string..
Jun 27 '08 #2
On Apr 22, 3:50 pm, parez <psaw...@gmail.comwrote:
On Apr 22, 3:31 pm, Dom <dolivas...@gmail.comwrote:
In my C++ and VB days, it was easy to put a program on a network
drive, and allow each user to shortcut to it. Then, when needed, I
could just update the program on the network drive, and each user
automatically had it the next time they ran it.
Sometimes seems to be happening in CSharp. Now I get the error:
"Request for the permission of type
'System.Data.SqlClient.SqlClientPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=<...>' failed."
Is there a work around here, or is this really a question for an XP
group? I'm reduced to emailing programs to users, but I need to munge
the ".exe" to ".exe_X", and let the users rename it. Some are not
comfortable with this.
Dom

SqlClientPermission probably means that your program doesnt have the
right credentials to access the DB.
Check the connection string..
if thats not the probem, that this could fx it..

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\casp ol -q -machine -
addgroup 1 -url file://s:/Applicatoin/Some.exe FullTrust -name "My
App"

Jun 27 '08 #3
Dom
On Apr 22, 3:57*pm, parez <psaw...@gmail.comwrote:
On Apr 22, 3:50 pm, parez <psaw...@gmail.comwrote:


On Apr 22, 3:31 pm, Dom <dolivas...@gmail.comwrote:
In my C++ and VB days, it was easy to put a program on a network
drive, and allow each user to shortcut to it. *Then, when needed, I
could just update the program on the network drive, and each user
automatically had it the next time they ran it.
Sometimes seems to be happening in CSharp. *Now I get the error:
"Request for the permission of type
'System.Data.SqlClient.SqlClientPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=<...>' failed."
Is there a work around here, or is this really a question for an XP
group? *I'm reduced to emailing programs to users, but I need to munge
the ".exe" to ".exe_X", and let the users rename it. *Some are not
comfortable with this.
Dom
SqlClientPermission probably means that your program doesnt have the
right credentials to access the DB.
Check the connection string..

if thats not the probem, that this could fx it..

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\casp ol -q -machine -
addgroup 1 -url file://s:/Applicatoin/Some.exe *FullTrust -name "My
App"- Hide quoted text -

- Show quoted text -
Thanks for the two suggestions. I'd like to see if I can fix it in
the connection string. Here is the one I am using:

"Data Source=<Server>; Initial Catalog=<Database>; User ID=sa;
Password=; Connection Timeout=60"

Am I leaving something important out? The "sa" and no password is
done on my "test server".

Dom

Jun 27 '08 #4
On Apr 22, 3:31*pm, Dom <dolivas...@gmail.comwrote:
In my C++ and VB days, it was easy to put a program on a network
drive, and allow each user to shortcut to it. *Then, when needed, I
could just update the program on the network drive, and each user
automatically had it the next time they ran it.

Sometimes seems to be happening in CSharp. *Now I get the error:

"Request for the permission of type
'System.Data.SqlClient.SqlClientPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=<...>' failed."

Is there a work around here, or is this really a question for an XP
group? *I'm reduced to emailing programs to users, but I need to munge
the ".exe" to ".exe_X", and let the users rename it. *Some are not
comfortable with this.

Dom
Hi,

If you give full trust to the local network your problems might be
solved.

One question though, does this error happen always or just some times?
Jun 27 '08 #5
Dom
On Apr 22, 4:15*pm, "Ignacio Machin ( .NET/ C# MVP )"
<ignacio.mac...@gmail.comwrote:
On Apr 22, 3:31*pm, Dom <dolivas...@gmail.comwrote:


In my C++ and VB days, it was easy to put a program on a network
drive, and allow each user to shortcut to it. *Then, when needed, I
could just update the program on the network drive, and each user
automatically had it the next time they ran it.
Sometimes seems to be happening in CSharp. *Now I get the error:
"Request for the permission of type
'System.Data.SqlClient.SqlClientPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=<...>' failed."
Is there a work around here, or is this really a question for an XP
group? *I'm reduced to emailing programs to users, but I need to munge
the ".exe" to ".exe_X", and let the users rename it. *Some are not
comfortable with this.
Dom

Hi,

If you give full trust to the local network your problems might be
solved.

One question though, does this error happen always or just some times?- Hide quoted text -

- Show quoted text -
Always, at least for the program in question. Of course, if I write a
program that does not access the server, this error won't occur, and I
assume no other error will either.

Dom
Jun 27 '08 #6
On Apr 22, 4:36*pm, Dom <dolivas...@gmail.comwrote:
On Apr 22, 4:15*pm, "Ignacio Machin ( .NET/ C# MVP )"

<ignacio.mac...@gmail.comwrote:
On Apr 22, 3:31*pm, Dom <dolivas...@gmail.comwrote:
In my C++ and VB days, it was easy to put a program on a network
drive, and allow each user to shortcut to it. *Then, when needed, I
could just update the program on the network drive, and each user
automatically had it the next time they ran it.
Sometimes seems to be happening in CSharp. *Now I get the error:
"Request for the permission of type
'System.Data.SqlClient.SqlClientPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=<...>' failed."
Is there a work around here, or is this really a question for an XP
group? *I'm reduced to emailing programs to users, but I need to munge
the ".exe" to ".exe_X", and let the users rename it. *Some are not
comfortable with this.
Dom
Hi,
If you give full trust to the local network your problems might be
solved.
One question though, does this error happen always or just some times?- Hide quoted text -
- Show quoted text -

Always, at least for the program in question. *Of course, if I write a
program that does not access the server, this error won't occur, and I
assume no other error will either.

Dom- Hide quoted text -

- Show quoted text -
Give the local network full trust and see what happen
Jun 27 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Lindgren | last post by:
Hello! When I am trying to run my .NET application from a network drive a System.Security.SecurityException exception is thrown. Why is that? How do I prevent it? Thanks! /David.
6
by: Kristian | last post by:
Hi All. This test code: using System.Net.Sockets; using System.Net; using System; class mail{ public static void Main(){
6
by: Eran Kampf | last post by:
I am trying to dynamically create directories in my ASP.NET application (I am using Server.MapPath("/")+"test" as the folder) and I am getting a DirectoryNotFoundException saying "Could not find a...
2
by: Steven | last post by:
I have developed an application using VB.NET, it works fine in my local drive. However, security exception is flowed when I try to run the release program under a network drive. I have signed the...
3
by: CsharpGuy | last post by:
I have an asp.net (C#) web form that needs to run an exe off of a network drive and when i load the page i'm getting the following error message: The application attempted to perform an operation...
10
by: Richard MSL | last post by:
I am having problems working with .net security. I have been attempting to use the Microsoft .Net Framework 2.0 Configuration tool (version 2.0.50727.42), but it won't work for me. I have a simple...
6
by: alex | last post by:
Hi, this always works: private ConsoleToTextbox myConsole; Console.SetOut(myConsole); But now (a few weeks later i started this project again) i get a non handeld security exception from...
2
by: Kathy | last post by:
One of my customers is running an Access 2003 application. They have the Macro Security Level set to Low. When the .mde app is executed directly from the C: drive on their server, they get into...
7
by: GMiller | last post by:
I am fairly new to .NET programming so this may be a simplistic question. I wrote a C# application that reads and writes files. If the program resides on a local drive everything is fine. If...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.