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()
définir votre application Exécuter en tant qu'administrateur – Rab
Nous fonctionner en tant qu'administrateur –
Vous ne mentionnez pas, mais assurez-vous que le programme est compilé pour x86 et pas n'importe quel CPU. – LarsTech