Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / September 2006

Tip: Looking for answers? Try searching our database.

Problems with code access security policy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Grober Myttelson - 22 Sep 2006 15:54 GMT
I have made a small app that resides on a server share. It needs to draw
some data from a SQL Server database that resides on yet another server. And
the app should be possible to run from client computers.

When we run it from clients we get the following error: "Request for the
permission of type System.Data.SqlClient.SqlClientPermission, System.Data,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed".

I have tried to change the code access security policy on the SQL Server
server by using Microsoft .NET Framework 1.1 Configuration - Increase
Assembly Trust and added the path \\AppServerName\c$\AppFolder\App.exe but I
still get the error when running the app from a client.

What more can I do?

Regards
/Grober
Nicole Calinoiu - 23 Sep 2006 14:04 GMT
Changing the CAS policy on the server won't help.  Your application is being
prevented from connecting to the database because of CAS policy on the
client machines, not on the server.  To address this, you will need to
modify the CAS policy on the client machines to grant the necessary
SqlClientPermission to your assembly.  See
http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx for details.

>I have made a small app that resides on a server share. It needs to draw
>some data from a SQL Server database that resides on yet another server.
[quoted text clipped - 14 lines]
> Regards
> /Grober
Grober Myttelson - 27 Sep 2006 15:48 GMT
It's working, thank you, splendid article that explains things in a mode
that is sufficient for me.

Regards
/Grober

> Changing the CAS policy on the server won't help.  Your application is
> being prevented from connecting to the database because of CAS policy on
[quoted text clipped - 21 lines]
>> Regards
>> /Grober

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.