Developer2007
Oct 13th, 2008, 08:59 PM
Need help from the guru's out there,
I am trying to run a .net application from a network drive, the application starts up fine but as soon as the application accesses SQL Server for data I get the following error.
System.Exception: System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.PermissionSet.Demand()
at System.Data.Common.DbConnectionOptions.DemandPermission()
at System.Data.SqlClient.SqlConnection.PermissionDemand()
at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
......etc
The application works fine on my local computer and also runs fine when running directly from the machine hosting the network share folder. The only time it won't work is if I try to run the app accross the network (Shortcut to exe file stored on mapped drive) and try to access the database.
I'm currently running SQL Server 2005 on sbs server 2003, visual studio 2008, vb.net framework 2.0
I have tried the following links and multiple other links but still no success. Also tried the "Caspol.exe" links. but with no success.
http://weblogs.sqlteam.com/jhermiz/archive/2007/08/14/60284.aspx
If someone has solved this problem before please help.
Thanks in advance.
I am trying to run a .net application from a network drive, the application starts up fine but as soon as the application accesses SQL Server for data I get the following error.
System.Exception: System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.PermissionSet.Demand()
at System.Data.Common.DbConnectionOptions.DemandPermission()
at System.Data.SqlClient.SqlConnection.PermissionDemand()
at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
......etc
The application works fine on my local computer and also runs fine when running directly from the machine hosting the network share folder. The only time it won't work is if I try to run the app accross the network (Shortcut to exe file stored on mapped drive) and try to access the database.
I'm currently running SQL Server 2005 on sbs server 2003, visual studio 2008, vb.net framework 2.0
I have tried the following links and multiple other links but still no success. Also tried the "Caspol.exe" links. but with no success.
http://weblogs.sqlteam.com/jhermiz/archive/2007/08/14/60284.aspx
If someone has solved this problem before please help.
Thanks in advance.