2012-06-12 2 views
1

un groupe de nos nouveaux utilisateurs a obtenu de nouveaux PC Windows 7 et je ne sais pas pourquoi je reçois l'erreur ci-dessous lorsque l'application commence. Nous exécutons l'application en tant qu'administrateur et obtenons toujours l'exception levée. Merci! Toute aide est appréciée! Les utilisateurs sont également administrateurs de leur propre PC.'System.Data.SqlClient.SqlConnection' a jeté une exception Windows 7

The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. 
System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\\OMAIN\AppData\Local\Apps\2.0\7LMDR8E0.X2T\60X0DGVM.VVW\asce..tion_6bf0e6a67bb42923_0001.0000_1a6b34a6368d30ed\Creation.exe' or one of its dependencies. Access is denied. 
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) 
    at System.Reflection.Assembly.LoadFrom(String assemblyFile) 
    at System.Runtime.Hosting.ManifestRunner.get_EntryAssembly() 
    at System.AppDomainManager.get_EntryAssembly() 
    at System.Reflection.Assembly.GetEntryAssembly() 
    at System.Data.ProviderBase.DbConnectionPoolCounters.GetAssemblyName() 
    at System.Data.ProviderBase.DbConnectionPoolCounters.GetInstanceName() 
    at System.Data.ProviderBase.DbConnectionPoolCounters..ctor(String categoryName, String categoryHelp) 
    at System.Data.SqlClient.SqlPerformanceCounters..ctor() 
    at System.Data.SqlClient.SqlPerformanceCounters..cctor() 
    --- End of inner exception stack trace --- 
    at System.Data.SqlClient.SqlConnectionFactory..cctor() 
    --- End of inner exception stack trace --- 
    at System.Data.SqlClient.SqlConnection..cctor()
+0

définir votre application Exécuter en tant qu'administrateur – Rab

+0

Nous fonctionner en tant qu'administrateur –

+0

Vous ne mentionnez pas, mais assurez-vous que le programme est compilé pour x86 et pas n'importe quel CPU. – LarsTech

Répondre

1

Trouver le fichier mentionné dans l'exception "creation.exe" et exécuter dependency walker dessus. Il peut montrer un assembly manquant ou dll qui n'est pas sur les nouvelles machines.

0

Si le service est accessible à partir du navigateur, vérifiez la configuration du comportement de point de terminaison côté client comme:

<endpointBehaviors> 
    <behavior name="clientEndpoint"> 
     <dataContractSerializer maxItemsInObjectGraph="2147483647" /> 
     <clientCredentials> 
      <windows allowedImpersonationLevel="Delegation"/> 
     </clientCredentials> 
    </behavior> 
</endpointBehaviors> 
Questions connexes