|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Cannot run program from network driveThe following program module (written in VS.NET 2002) runs fine from local drive. Dim sqlCnn As New SqlClient.SqlConnection() Dim sqlDaDB01 As New SqlClient.SqlDataAdapter() Dim sqlCmd As New SqlClient.SqlCommand() Dim intTemp As Integer sqlCnn.ConnectionString = "data source=SERVERA;initial catalog=DatabaseA;integrated security=SSPI;persist security info=False" sqlCnn.Open() sqlCmd.CommandText = "exec test1" sqlCmd.CommandType = CommandType.Text sqlCmd.Connection = sqlCnn sqlCmd.CommandTimeout = 1800 Console.Write("Update in progress. Please wait......") intTemp = sqlCmd.ExecuteNonQuery() sqlCnn.Close() MsgBox("Job finished", MsgBoxStyle.Information, "...") However, when I put it into a network drive, an error show up:- "An unhandled exception of type 'System.Security.SecurityException' occurred in Unknown Module. Additional information: Request failed." Is there anybody know how to fix this problem? Thanks a lot! It might not be recommended but you can set the permission set of the
localintranet_zone to "full trust" on machine level. 1. On your local development machine open the property window of Start -> Adminstrative Tools -> Microsoft .NET Framework 1.1 Configuration -> Runtime Security Policy -> Machine -> Code Groups -> All_code -> localintranet_zone 2. Go to tab "Permission set" 3. Set the permission set to fulltrust Gabriel Lozano-Morán Show quoteHide quote "Bendix" <Ben***@discussions.microsoft.com> wrote in message news:E0C3AFA0-7DE9-4D8B-BF10-C96E2F4688B1@microsoft.com... > Hi All, > > The following program module (written in VS.NET 2002) runs fine from local > drive. > > Dim sqlCnn As New SqlClient.SqlConnection() > Dim sqlDaDB01 As New SqlClient.SqlDataAdapter() > Dim sqlCmd As New SqlClient.SqlCommand() > Dim intTemp As Integer > > sqlCnn.ConnectionString = "data source=SERVERA;initial > catalog=DatabaseA;integrated security=SSPI;persist security info=False" > sqlCnn.Open() > sqlCmd.CommandText = "exec test1" > sqlCmd.CommandType = CommandType.Text > sqlCmd.Connection = sqlCnn > sqlCmd.CommandTimeout = 1800 > Console.Write("Update in progress. Please wait......") > intTemp = sqlCmd.ExecuteNonQuery() > sqlCnn.Close() > MsgBox("Job finished", MsgBoxStyle.Information, "...") > > > However, when I put it into a network drive, an error show up:- > > "An unhandled exception of type 'System.Security.SecurityException' > occurred > in Unknown Module. > Additional information: Request failed." > > > Is there anybody know how to fix this problem? Thanks a lot! > April 6, 2005
You are right. Doing that isn't recommended. What would be better is to strong name the assembly and then create a code group under LocalIntranet_Zone that gives FullTrust to assemblies with that strong name. What are the details of the Security Exception? I believe I could solve your permission problem, if I had the details? Joseph MCAD Show quoteHide quote "Gabriel Lozano-Morán" wrote: > It might not be recommended but you can set the permission set of the > localintranet_zone to "full trust" on machine level. > > 1. On your local development machine open the property window of Start -> > Adminstrative Tools -> Microsoft .NET Framework 1.1 Configuration -> Runtime > Security Policy -> Machine -> Code Groups -> All_code -> localintranet_zone > > 2. Go to tab "Permission set" > > 3. Set the permission set to fulltrust > > Gabriel Lozano-Morán > > "Bendix" <Ben***@discussions.microsoft.com> wrote in message > news:E0C3AFA0-7DE9-4D8B-BF10-C96E2F4688B1@microsoft.com... > > Hi All, > > > > The following program module (written in VS.NET 2002) runs fine from local > > drive. > > > > Dim sqlCnn As New SqlClient.SqlConnection() > > Dim sqlDaDB01 As New SqlClient.SqlDataAdapter() > > Dim sqlCmd As New SqlClient.SqlCommand() > > Dim intTemp As Integer > > > > sqlCnn.ConnectionString = "data source=SERVERA;initial > > catalog=DatabaseA;integrated security=SSPI;persist security info=False" > > sqlCnn.Open() > > sqlCmd.CommandText = "exec test1" > > sqlCmd.CommandType = CommandType.Text > > sqlCmd.Connection = sqlCnn > > sqlCmd.CommandTimeout = 1800 > > Console.Write("Update in progress. Please wait......") > > intTemp = sqlCmd.ExecuteNonQuery() > > sqlCnn.Close() > > MsgBox("Job finished", MsgBoxStyle.Information, "...") > > > > > > However, when I put it into a network drive, an error show up:- > > > > "An unhandled exception of type 'System.Security.SecurityException' > > occurred > > in Unknown Module. > > Additional information: Request failed." > > > > > > Is there anybody know how to fix this problem? Thanks a lot! > > > > > I tried the not recommended solution, but it only work for that specific
computer. What if I want to run the program from a lot of workstations? Bendix Show quoteHide quote "Joseph MCAD" wrote: > > April 6, 2005 > > You are right. Doing that isn't recommended. What would be better is to > strong name the assembly and then create a code group under > LocalIntranet_Zone that gives FullTrust to assemblies with that strong name. > What are the details of the Security Exception? I believe I could solve your > permission problem, if I had the details? > > > Joseph MCAD > April 8, 2005
To make this work for all computers, just add this code group under the Enterprise --> All_Code group. Do the exact same thing and let the assembly have FullTrust, but check the box that states Policy levels below this level will not be evaluated and check This policy level will only have the permissions from the permission set associated with this code group. This will allow the assembly to have fulltrust throughout the domain. Hope this helps! Joseph MCAD Show quoteHide quote "Bendix" <Ben***@discussions.microsoft.com> wrote in message news:46772C63-25DF-4353-BC39-CF9E049BDF4A@microsoft.com... >I tried the not recommended solution, but it only work for that specific > computer. What if I want to run the program from a lot of workstations? > > Bendix > > "Joseph MCAD" wrote: > >> >> April 6, 2005 >> >> You are right. Doing that isn't recommended. What would be better is >> to >> strong name the assembly and then create a code group under >> LocalIntranet_Zone that gives FullTrust to assemblies with that strong >> name. >> What are the details of the Security Exception? I believe I could solve >> your >> permission problem, if I had the details? >> >> >> Joseph MCAD >> > "Joseph MCAD" <anonym***@microsoft.discussions.com> wrote in message This will include applications run from the internet, so it's not news:%23JPQQDpPFHA.1884@TK2MSFTNGP15.phx.gbl... > April 8, 2005 > > To make this work for all computers, just add this code group under the > Enterprise --> All_Code group. necessarily a great idea even if a strong name membership condition will also be used. One can add a local intranet zone group under All_Code at the enterprise level configured identically to the group that is included by default at the machine level. The new strong name group should be placed under such a group in order if the goal is to trust assemblies signed with the relevant key iff they are run from within the intranet. > Do the exact same thing and let the assembly No, it will not. Despite its name, the enterprise policy resides on the > have FullTrust, but check the box that states Policy levels below this > level > will not be evaluated and check This policy level will only have the > permissions from the permission set associated with this code group. This > will allow the assembly to have fulltrust throughout the domain. local client machine, and changes are not automatically propagated over a domain. Changes to the enterprise policy must be deployed to the respective client machines (exactly as if they were changes to the machine-level configuration). On a Windows domain, one fairly common means of deploying such policy changes is as an MSI (created via .NET Configuration MMC) distributed as a GPO. Show quoteHide quote > Hope this > helps! > > Joseph MCAD > > > > "Bendix" <Ben***@discussions.microsoft.com> wrote in message > news:46772C63-25DF-4353-BC39-CF9E049BDF4A@microsoft.com... >>I tried the not recommended solution, but it only work for that specific >> computer. What if I want to run the program from a lot of workstations? >> >> Bendix >> >> "Joseph MCAD" wrote: >> >>> >>> April 6, 2005 >>> >>> You are right. Doing that isn't recommended. What would be better is >>> to >>> strong name the assembly and then create a code group under >>> LocalIntranet_Zone that gives FullTrust to assemblies with that strong >>> name. >>> What are the details of the Security Exception? I believe I could solve >>> your >>> permission problem, if I had the details? >>> >>> >>> Joseph MCAD >>> >> > >
Cannot Run Application on Windows Server 2003
Changing folder security RE: Designtime licenses, I just don't get it Custom principles and DnsPermission.Demand() User's Privileges ?cannot be instantiated under a partially trusted security policy (AllowPartiallyTrustedCallersAttri Forms authentication to enter a static website Change in ASP.Net authentication between Win2000 and Win2003 revoke Windows authentication credentials for a session Act as user a different user |
|||||||||||||||||||||||