2016-02-18 2 views
6

Просто установлен VS2015 бок о бок с VS2010 ...Не удалось загрузить файл или сборку stdole

Применение в выпуске был построен с использованием VS2010 (набор для использования .NET 4.0) (не мигрировали в VS2015) работал отлично на мой машины, поставить его на сервере и упал в куче ... stdole был вопрос ...

в ошибках Windows Logs> Приложение было исключение:

Exception information: 
Exception type: ConfigurationErrorsException 
Exception message: Could not load file or assembly 'stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) 
    at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) 
    at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() 
    at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) 
    at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) 
    at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() 
    at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) 
    at System.Web.Compilation.BuildManager.ExecutePreAppStart() 
    at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) 

Could not load file or assembly 'stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) 
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at  System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) 
    at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) 
    at System.Reflection.Assembly.Load(String assemblyString) 
    at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) 

Could not load file or assembly 'stdole' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) 

Stack trace: at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) 
    at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() 
    at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) 
    at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) 
    at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() 
    at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) 
    at System.Web.Compilation.BuildManager.ExecutePreAppStart() 
    at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) 

Посмотрел ссылку stdole, и это было для GAC и версии: 2.0.0.0

Битва ничего не изменилась.

Откуда возникает эта ошибка?

+0

вы можете попытаться удалить ссылку и посмотреть, работает ли приложение – Thorarins

+0

@Thorarins Это не работает без ссылки. –

+0

какие вмешательства вы используете? это Excel och Word? – Thorarins

ответ

5

Только в случае, если кто-то встречает этот вопрос так же, как я сделал ...

Вот как я решил проблему:

Удаляется существующую ссылку на stdole, а затем добавил ссылку> Расширения> было четыре записи для stdole! один со значком офиса, один с значком VS, один с винтом (значок установки), а другой без значка (все четыре были точно такими же номерами версий и т. д.) ...

Добавлена ​​ссылка на страницу с VS значок и развернут на сервере ... все идет хорошо (сглазить)

0

Возможно, вам захочется выяснить, почему была изменена библиотека stdole (или одна из ее зависимостей).

Запустите команду sn -Vr * в командной строке, чтобы отключить проверку целостности на вашем локальном компьютере.

+0

Действительно, я подозреваю, что установка VS2015 бок о бок с VS2010 и связанные с ними .Net-структуры вызвали эту проблему. –

1

Добавить ссылку в свой проект на «stdole.dll», который можно найти в нескольких разных местах

  • Ваш GAC (сборка C: \ Windows \)
  • C: \ Program Files (x86) \ Common Files \ Microsoft Shared \ MSEnv \ PublicAssembli es

Перестроить, переделать и все должно быть хорошо.

Смежные вопросы