|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problems with code access security policyI 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 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. Show quoteHide quote "Grober Myttelson" <grottekvar***@hotmail.com> wrote in message news:%23O3kJcl3GHA.600@TK2MSFTNGP05.phx.gbl... >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 > It's working, thank you, splendid article that explains things in a mode
that is sufficient for me. Regards /Grober Show quoteHide quote "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> skrev i meddelandet news:EFD4C182-B9B4-40F1-891F-F16BBD122E39@microsoft.com... > 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. > > > "Grober Myttelson" <grottekvar***@hotmail.com> wrote in message > news:%23O3kJcl3GHA.600@TK2MSFTNGP05.phx.gbl... >>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 >> >
Using remoting features inside a .NET applet loaded in a tag object
Configuration Tool missing Registry Permission Attributes .NET 2.0: SetAccessControl wipe out inherited ACEs deserialize and "medium trust" remote registry access issue on Vista RC1 EnvironmentPermission ASN1 unexpected end of data Runtime Security Policy Question Events over remoting and security problem, related/not related, I don't know |
|||||||||||||||||||||||