我正在使用visual web developer express,当我在localhost上构建网站时,一切都很好。但是当我尝试在服务器上部署它时,会出现许多错误,例如:
line 18:
Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.
This error can be caused by a virtual directory not being configured
as an application in IIS.
Source Error:
Line 16: <customErrors mode="Off"/>
Line 17:
Line 18: <profile enabled="true">
Line 19: <!--<anonymousIdentification enabled="true"/-->
Line 20: <properties>
当我取消这部分时,我在第3行得到错误:
Parser Error Message: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 1: <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
Line 2:
Line 3: <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
Line 4:
Line 5: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Source File: /zimmer/MasterPage.master Line: 3
Assembly Load Trace: The following information can be helpful to determine why the assembly 'AjaxControlToolkit' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
我该如何解决这个问题?
答案 0 :(得分:0)
在发布设置中确保您要复制项目文件夹中的所有文件,而不是网站所需的最低要求。我有同样的问题,并修复了它。