Server Error in '/CustomerManagement' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'NameSpace' or one of its dependencies. The system cannot find the file specified.
Source Error:
...
----------------------------------------
“Source Error”的提示根据不准,往往被它“忽悠”,去提示的那行,其实跟它没关系。
在网上查了一下,有的会提示这个错误,跟ASPNET用户权限有关,设置一下%systemroot%下temp目录的权限,加上ASPNET可访问可写的权限。
但我遇到的不是这个问题。
我报错的页面属于一个子站点,这个子站点被设置为一个Web应用程序根目录了。
用主子站点来把多个项目分开开发的时候,这种结构下的子站点,如果需要从主站点进开始访问页面,是不能将子站点设置为应用程序的,在IIS里去掉这个属性就可以了,即把它当一个主站点的目录。