Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem accessing SQL Server from network share after reinstalling SQL Server
    primarykey
    data
    text
    <p>I have a problem, that is really driving me crazy.</p> <p>First of all I must admit, that most of the work was done by a coworker, who isn't available anymore.</p> <p>Before reinstalling the MSSQL Server rig, the whole thing looked like that:</p> <ul> <li>Someone has developed a little .Net c# program which connects to the SQL Server, that is located on a different network share. Everything worked</li> </ul> <p>We had to reinstall the server (Windows + SQL Server) and since that moment, if the program is run from that network share, I get the following error:</p> <blockquote> <p>"Unhandled Exception: System.Security.SecurityException: Request for the permissi on of type 'System.Data.SqlClient.SqlClientPermission, System.Data, ......"</p> </blockquote> <p>If I run the programm locally from the computer where the shares are located, it works - so I guess all security issues where set right at the SQL Server. But there has to be a problem, because it worked correct before the reinstall.</p> <p>Does this make any sense to someone? Or any ideas how to fix that?</p> <p>Edit: Posted error message below. The program is called by a batch script.</p> <pre><code>C:\Projekte\Tool&gt;\\server\c$\Projekte\Tool\ToolRea der.exe Unhandled Exception: System.Security.SecurityException: Request for the permissi on of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0. 0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMa rk&amp; 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 o uterConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionU ser user) at System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe() at System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode() at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider .Execute(Expression query) at System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable&lt;T&gt;.Get Enumerator() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at System.Data.Linq.Table`1.DeleteAllOnSubmit[TSubEntity](IEnumerable`1 entit ies) at ToolReader.DataAccessLayer.ToolInfoDAO.deleteAllEntries( ) at ToolReader.ToolReader.Main(String[] args) The action that failed was: Demand The type of the first permission that failed was: System.Data.SqlClient.SqlClientPermission The first permission that failed was: &lt;IPermission class="System.Data.SqlClient.SqlClientPermission, System.Data, Vers ion=2.0.0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089" version="1" AllowBlankPassword="False"&gt; &lt;add ConnectionString="Data Source=sqlserver\SQLEXPRESS;Initial Catalog=ToolDB;Integrated Security=True" KeyRestrictions="" KeyRestrictionBehavior="AllowOnly"/&gt; &lt;/IPermission&gt; The demand was for: &lt;PermissionSet class="System.Security.PermissionSet" version="1"&gt; &lt;IPermission class="System.Data.SqlClient.SqlClientPermission, System.Data, Vers ion=2.0.0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089" version="1" AllowBlankPassword="False"&gt; &lt;add ConnectionString="Data Source=sqlserver\SQLEXPRESS;Initial Catalog=ToolDB;Integrated Security=True" KeyRestrictions="" KeyRestrictionBehavior="AllowOnly"/&gt; &lt;/IPermission&gt; &lt;/PermissionSet&gt; The granted set of the failing assembly was: &lt;PermissionSet class="System.Security.PermissionSet" version="1"&gt; &lt;IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089" version="1" Read="USERNAME"/&gt; &lt;IPermission class="System.Security.Permissions.FileDialogPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089" version="1" Unrestricted="true"/&gt; &lt;IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Vers ion=2.0.0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089" version="1" Read="\\server\C$\Projekte\Tool\" PathDiscovery="\\server\C$\Projekte\Tool\"/&gt; &lt;IPermission class="System.Security.Permissions.IsolatedStorageFilePermission, m scorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089" version="1" Allowed="AssemblyIsolationByUser" UserQuota="9223372036854775807" Expiry="9223372036854775807" Permanent="True"/&gt; &lt;IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089" version="1" Flags="ReflectionEmit"/&gt; &lt;IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Ve rsion=2.0.0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089" version="1" Flags="Assertion, Execution, BindingRedirects"/&gt; &lt;IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089" version="1" Unrestricted="true"/&gt; &lt;IPermission class="System.Security.Permissions.UrlIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089" version="1" Url="file://server/c$/Projekte/Tool/ToolReader.exe"/&gt; &lt;IPermission class="System.Security.Permissions.ZoneIdentityPermission, mscorlib , Version=2.0.0.0, Culture=neutral, PublicKeyToken=a76a5c5b1932e089" version="1" Zone="Intranet"/&gt; &lt;IPermission class="System.Net.DnsPermission, System, Version=2.0.0.0, Culture=n eutral, PublicKeyToken=a76a5c5b1932e089" version="1" Unrestricted="true"/&gt; &lt;IPermission class="System.Drawing.Printing.PrintingPermission, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" version="1" Level="DefaultPrinting"/&gt; &lt;/PermissionSet&gt; The assembly or AppDomain that failed was: ToolReader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null The method that caused the failure was: Void deleteAllEntries() The Zone of the assembly that failed was: Intranet The Url of the assembly that failed was: file://server/c$/Projekte/Tool/ToolReader.exe </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload