Exception from HRESULT: 0x800736B1,Could not load file or as
今天发布Web项目,结果运行出错,错误信息如下: [COMException (0x800736b1): 由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 (Exception from HRESULT: 0x800736B1)] [FileLoadException: Could not load file or assem
今天发布Web项目,结果运行出错,错误信息如下:
[COMException (0x800736b1): 由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 (Exception from HRESULT: 0x800736B1)]
[FileLoadException: Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. 由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 (Exception from HRESULT: 0x800736B1)]
在网上搜索了半天,有不少人遇到这个问题,可惜没人解决……
只好自己想法处理,因为上周这个虚拟目录还能正常访问,并发现,别的虚拟目录都能正常访问
只有这个虚拟目录因为刚刚更新,不能打开任何页面,所以肯定是这个目录下有问题,而不是服务器问题
首先怀疑是Web.config问题,删除Web.config,问题依旧
接着怀疑是bin目录,进入bin目录,发现一个奇怪的dll文件:Microsoft.SqlServer.BatchParser.dll
删除之,OK,项目能正常运行了,
可是为什么会多出这个Microsoft.SqlServer.BatchParser.dll文件呢?而且每次生成,都会添加这个文件!!!
查看源代码引用,发现是项目里不知道什么时候添加了:
Microsoft.VisualStudio.TeamSystem.Data.UnitTesting
和
Microsoft.VisualStudio.QualityTools.UnitTestFramework
2个引用,
再查源代码历史记录,找到添加这2个引用的同事,他说他给项目添加新项时,误操作,点了添加数据库单元测试,后来删除了那个单元测试,可是没想到引用还在……
至此,原因也找到了,解决方法,删除那2个引用,还有一个自动生成的Databaseset.cs文件
再生成,没有问题了…………

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



In Java, when multiple threads operate a collection object at the same time, a ConcurrentModificationException exception may occur. This exception usually occurs when traversing the collection when modifying or deleting elements. This will cause the state of the collection to be inconsistent, thus throwing abnormal. This article will delve into the causes and solutions to this exception. 1. Causes of Exception Normally, ConcurrentModificationException exception

In PHP development, you may encounter errors such as "PHPFatalerror:Uncaughtexception'PDOException'". This is an exception caused by an error when PHP operates the database. If this error is not handled in time, it will cause program interruption or unexpected errors. So how to solve this problem? Here are some common solutions. 1. Check the database parameters. First, we need to check the parameters passed when connecting to the database.

How to deal with UnsupportedEncodingException in Java? In Java programming, you may encounter UnsupportedEncodingException. This exception is usually caused by incorrect encoding conversion or an unsupported encoding. In this article, we will introduce the causes of UnsupportedEncodingException exception and how to deal with it. What is UnsupportedE

Hello, the following is an article within 1500 words, titled: Youcan'tspecifytargettable'table_name'forupdateinFROMclause-How to solve the MySQL error: Unable to update the target table in the FROM clause, specific code examples are needed. During the development of MySQL database, we sometimes encounter the following error message: Youcan'tspecify

What are the common causes of ConcurrentModificationException in Java? When traversing a collection using an iterator in the Java collection framework, a ConcurrentModificationException exception is sometimes thrown, which is one of the common Java exceptions. So, what is the reason for this exception? First, we need to understand that the iterators provided by the Java collection framework are stateful. That is, when traversing

In Java programming, array is an important data structure. Arrays can store multiple values in a single variable, and more importantly each value can be accessed using an index. But while working with arrays, some exceptions may occur, one of them is ArrayStoreException. This article will discuss common causes of ArrayStoreException exceptions. 1. Type mismatch The element type must be specified when the array is created. When we try to store incompatible data types into an array, it throws

In Java development, we often use arrays to store a series of data because of the convenience and performance advantages of arrays. However, in the process of using arrays, some exceptions will occur, and one of the common exceptions is ArrayStoreException. This exception is thrown when we store incompatible data types in the array. This article will introduce what an ArrayStoreException is, why it occurs, and how to solve it. 1. Arr

The Exception class and the Error class are both subclasses of the java.lang.Throwable class. We can handle runtime exceptions, but not errors. Exceptions are objects that represent logical errors that occur at runtime, causing the JVM to enter an "ambiguous" state. Objects automatically created by the JVM to represent these runtime errors are called exceptions. Error is a subclass of the Throwable class that indicates serious problems that reasonable applications should not try to catch. Most of these errors are anomalies. If an exception occurs, we can use try and catch blocks to handle it. If an error occurs that we cannot handle, the program will terminate. There are two types of exceptions, one is CheckedExce
