无法加载程序集 [英] Could Not Load Assembly

查看:94
本文介绍了无法加载程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2005和.NET Framework 2.0上的第一个ASP.NET应用程序


应用程序在开发计算机上正确编译和执行。

I然后将其发布到开发机器上的空目录中。然后我将
复制该目录到包含大量目录的远程服务器

,其中一些使用.NET Framework 1.1(1.1和2.0都是

安装在服务器上。


当我打电话给页面时,我收到消息......


分析器错误

描述:解析为
服务此请求所需的资源时发生错误。请查看以下特定的解析错误

详细信息并适当修改源文件。


解析器错误消息:无法加载程序集App_Web_whgweftt。制作

确保在访问页面之前编译它。


来源错误:


第1行:< ;%@ page language =" C#" autoeventwireup = QUOT;真" inherits =" _Default,

App_Web_whgweftt" %>

第2行:

第3行:<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"

" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


源文件:C:\ Domains\tlatla.net\thom\default.aspx行:1

------------------------- -------------------------------------------------- -----

版本信息:Microsoft .NET Framework版本:1.1.4322.2032; ASP.NET

版本:1.1.4322.2032

我不确定错误究竟是什么,或者从哪里来看

加载程序集。


-

- Thom Little - www.tlanet.net - Thom Little Associates,Ltd。

-

My first ASP.NET application on Visual Studio 2005 and .NET Framework 2.0

The application compiles and executes correctly on the development machine.
I then publish it to an empty directory on the development machine. I then
copy that directory to the remote server that contains numerous directories
and some of them are using .NET Framework 1.1 (1.1 and 2.0 are both
installed on the server).

When I call the page I get the message ...

Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: Could not load the assembly ''App_Web_whgweftt''. Make
sure that it is compiled before accessing the page.

Source Error:

Line 1: <%@ page language="C#" autoeventwireup="true" inherits="_Default,
App_Web_whgweftt" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: C:\Domains\tlatla.net\thom\default.aspx Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032

I''m not sure what the error actually is or from where it is expecting to
load the assembly.

--
-- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
--

推荐答案

你的iis中的vdir映射到asp.net 1.1,将其更改为2.0(asp.net选项卡

属性)。


- 布鲁斯(sqlwork.com)

" Thom Little" <第** @ tlanet.net>在消息中写道

news:uz ************** @ TK2MSFTNGP14.phx.gbl ...
your vdir in iis is mapped to asp.net 1.1, change it to 2.0 (asp.net tab
under properties).

-- bruce (sqlwork.com)
"Thom Little" <th**@tlanet.net> wrote in message
news:uz**************@TK2MSFTNGP14.phx.gbl...
我的第一个ASP.NET Visual Studio 2005和.NET Framework 2.0上的应用程序

应用程序在开发
机器上正确编译和执行。然后我将它发布到开发
机器上的空目录中。然后我将该目录复制到包含大量目录的远程服务器,其中一些使用.NET Framework 1.1(1.1
和2.0都安装在服务器上)。
当我调用页面时,我收到消息......

解析器错误
描述:在解析需要的资源时发生错误,以便为此请求提供服务。请查看以下特定的解析错误
详细信息并适当修改源文件。

解析器错误消息:无法加载程序集''App_Web_whgweftt''。确保在访问页面之前编译它。

来源错误:

第1行:<%@ page language =" C#" autoeventwireup = QUOT;真" inherits =" _Default,
App_Web_whgweftt" %>
第2行:
第3行:<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"
" http:// www .w3.org / TR / xhtml1 / DTD / xhtml1-transitional.dtd">

源文件:C:\ Domains \tlatla.net \ thom\default.aspx行: 1

----------------------------------------- ---------------------------------------
版本信息:Microsoft .NET Framework版本:1.1.4322.2032;
ASP.NET版本:1.1.4322.2032

我不确定错误究竟是什么,或者它从哪里开始加载
装配。

-
- Thom Little - www。 tlanet.net - Thom Little Associates,Ltd。
-
My first ASP.NET application on Visual Studio 2005 and .NET Framework 2.0

The application compiles and executes correctly on the development
machine. I then publish it to an empty directory on the development
machine. I then copy that directory to the remote server that contains
numerous directories and some of them are using .NET Framework 1.1 (1.1
and 2.0 are both installed on the server).

When I call the page I get the message ...

Parser Error
Description: An error occurred during the parsing of a resource required
to service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: Could not load the assembly ''App_Web_whgweftt''. Make
sure that it is compiled before accessing the page.

Source Error:

Line 1: <%@ page language="C#" autoeventwireup="true" inherits="_Default,
App_Web_whgweftt" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: C:\Domains\tlatla.net\thom\default.aspx Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032

I''m not sure what the error actually is or from where it is expecting to
load the assembly.

--
-- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
--



我有一个新的2.0网站空间在远程服务器上定义(花了一段时间)和

尝试了两次测试。一个是复制我的已发布目录。

的根源是新的网站空间。另一种是将目录中的所有文件复制到新网站空间的根目录。


来自新网站空间的目录...
'/''应用程序中的
服务器错误。

----------------------- -------------------------------------------------- -------


解析器错误

描述:解析

所需的资源时发生错误服务这个请求。请查看以下特定的解析错误

详细信息并适当修改源文件。


解析器错误消息:无法加载程序集''App_Web_wvnwbatv''。制作

确保在访问页面之前编译它。


来源错误:


第1行:< ;%@ page language =" C#" autoeventwireup = QUOT;真" inherits =" _Default,

App_Web_wvnwbatv" %>

第2行:

第3行:<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"

" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


源文件:/ thom / Default .aspx行:1

------------------------------------- -------------------------------------------

版本信息:Microsoft .NET Framework版本:2.0.50727.42; ASP.NET

版本:2.0.50727.42

从新网站空间的根目录...

'/''中的服务器错误申请。

---------------------------------------- ----------------------------------------


无法找到资源。

描述:HTTP 404.您要查找的资源(或其中一个

依赖项)可能已被删除,名称如下:改变了,或者暂时无法使用
。请查看以下网址,并确保

拼写正确。


请求的网址:/Default.aspx

我没有你的建议就不会有这么远。


显然你只允许在根目录上设置框架版本

(以及所有子目录)或者一个网站空间。我希望能够在逐个目录的基础上设置

,但显然是不允许的。


-

- Thom Little - www.tlanet.net - Thom Little Associates ,有限公司

-


" Bruce Barker" <峰; br ****************** @ safeco.com>在消息中写道

news:uB ************** @ TK2MSFTNGP15.phx.gbl ...
I got a new 2.0 webspace defined on the remote server (it took a while) and
tried two tests. One was to copy my "published directory" to the root of
the new webspace. The other was to copy all the files in the directory to
the root of the new webspace.

From directory in new webspace ...

Server Error in ''/'' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: Could not load the assembly ''App_Web_wvnwbatv''. Make
sure that it is compiled before accessing the page.

Source Error:

Line 1: <%@ page language="C#" autoeventwireup="true" inherits="_Default,
App_Web_wvnwbatv" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: /thom/Default.aspx Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42
From the root of the new webspace ...
Server Error in ''/'' Application.
--------------------------------------------------------------------------------

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure that
it is spelled correctly.

Requested URL: /Default.aspx
I would not have gotten this far without your suggestion.

Apparently you are only allowed to set the Framework version on the root
(and all the subdirectories) or a webspace. I would like to be able to set
it on a directory-by-directory basis but apparently that is not allowed.

--
-- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
--

"Bruce Barker" <br******************@safeco.com> wrote in message
news:uB**************@TK2MSFTNGP15.phx.gbl...
你在iis中的vdir是映射到asp.net 1.1,将其更改为2.0(属性下的asp.net选项卡)。

- bruce(sqlwork.com)
your vdir in iis is mapped to asp.net 1.1, change it to 2.0 (asp.net tab
under properties).

-- bruce (sqlwork.com)



Hi Thom,


对于ASP.NET Web应用程序,它是基于应用程序虚拟目录。

所以每个Web应用程序需要部署到某个IIS Virtual

目录(标记为应用程序......)。 IIS根目录下的正常物理目录

站点是不够的,它是一个普通的虚拟目录,但没有配置为

应用程序....所以我建议你先使用IIS的经理(inetmgr.exe)要创建一个新的虚拟目录并将其配置为应用程序,你可以通过以下方式将
更改为应用程序虚拟目录的虚拟目录:


1.在IIS管理器控制台中,选择该虚拟目录的节点,然后右键单击

属性菜单。

(你可以选择你形成的虚拟目录,包含

你的应用程序的文件....)


2.在目录"或虚拟目录或虚拟目录。面板,检查应用程序

名称输入字段以查看是否已启用,如果没有,请单击右侧的创建

按钮将其创建为应用程序虚拟目录.....


将虚拟目录创建为应用程序虚拟目录后,该虚拟目录中的

ASP.NET应用程序将作为单独的

应用程序运行............

另外,请注意ASP.NET应用程序将始终从machine.config继承

配置设置到IIS站点的根目录web.config到

自己的web.config ....所以请确保如果你需要运行asp.net

1.1和asp.net 2.0 web应用程序,你需要创建两个网站

(仅适用于服务器操作系统,如Windows 2003服务器)和一个配置

for asp.net 1.1和另一个配置为asp .net 2.0 ....


以下是关于IIS6 ASP.NET应用程序部署的technet参考:


#部署ASP的概述.NET应用程序(IIS 6.0)
http ://www.microsoft.com/technet/pro.../Library/IIS/6

4ac3577-7746-4fbd-a5e6-e50bdecf7a24.mspx


希望有所帮助。如果有什么不清楚的地方,请随时在这里发布。


谢谢,


Steven Cheng

Microsoft在线支持


安全! www.microsoft.com/security

(此帖子按原样提供,不作任何保证,并且不授予

权利。)



-------- ------------

|来自:Thom Little < th ** @ tlanet.net>

|参考文献:< uz ************** @ TK2MSFTNGP14.phx.gbl>

< uB ************* *@TK2MSFTNGP15.phx.gbl>

|主题:Re:无法加载程序集

|日期:2005年12月14日星期三00:37:44 -0500

|行数:67

| X-Priority:3

| X-MSMail-Priority:正常

| X-Newsreader:Microsoft Outlook Express 6.00.2900.2670

| X-MimeOLE:由Microsoft MimeOLE制作V6.00.2900.2670

| X-RFC2646:格式=流动;回复

|消息ID:< #K ************** @ TK2MSFTNGP12.phx.gbl>

|新闻组:microsoft.public.dotnet.framework.aspnet

| NNTP-Posting-Host:65.99.185.176

|路径:TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl

|外翻:TK2MSFTNGXA02.phx.gbl

microsoft.public.dotnet.framework.aspnet:364681

| X-Tomcat-NG:microsoft.public.dotnet.framework.aspnet

|

|我在远程服务器上定义了一个新的2.0网站空间(花了一段时间)



|尝试了两次测试。一个是复制我的已发布目录。到了
|的根源新的网站空间。另一种是将目录中的所有文件复制到

|新网站空间的根源。

|

|从新网站空间的目录...

|

| /应用程序中的服务器错误。

|

----------------------- -------------------------------------------------- ---

----

|

|分析器错误

|说明:解析所需资源时发生错误



|服务这个请求。请查看以下特定的解析错误

|详细说明并适当修改源文件。

|

|分析器错误消息:无法加载程序集App_Web_wvnwbatv。

生成

|确保在访问页面之前编译它。

|

|来源错误:

|

|第1行:<%@ page language =" C#" autoeventwireup =" true"

inherits =" _Default,

| App_Web_wvnwbatv" %>

|第2行:

|第3行:<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"

| http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

|

|源文件:/thom/Default.aspx行:1

|

|

|

--- -------------------------------------------------- -----------------------

----

|版本信息:Microsoft .NET Framework版本:2.0.50727.42;

ASP.NET

|版本:2.0.50727.42

|

|

|从新网站空间的根源...

|

|

| /应用程序中的服务器错误。

|

----------------------- -------------------------------------------------- ---

----

|

|无法找到资源。

|描述:HTTP 404.您正在寻找的资源(或其中一个

|依赖项)可能已被删除,名称已更改,或者是

|暂时不可用。请查看以下网址,并确保



|拼写正确。

|

|请求的URL:/Default.aspx

|

|

|没有你的建议我就不会这么做了。

|

|显然,您只能在根目录上设置Framework版本

| (以及所有子目录)或网站空间。我希望能够设置

|它是在逐个目录的基础上,但显然是不允许的。

|

| -

| - Thom Little - www.tlanet.net - Thom Little Associates,Ltd。

| -

|

| 布鲁斯巴克 <峰; br ****************** @ safeco.com>在消息中写道

|新闻:uB ************** @ TK2MSFTNGP15.phx.gbl ...

| >您在iis中的vdir映射到asp.net 1.1,将其更改为2.0(asp.net

tab

|>属性)。

| >

| > - 布鲁斯(sqlwork.com)

|

|

|

Hi Thom,

As for ASP.NET web application it is application virtual directory based.
So each web application need to be deployed into a certain IIS Virtual
Directory (mark as application...). A normal physical dir under IIS root
site is not enough, it is a normal virtual directory, but not configured as
application.... So I suggest you first use IIS''s manager (inetmgr.exe) to
create a new virtual directory and configure it as application, you can
change a virutal dir to an application virtual dir through:

1. In IIS manager console, select that virtual dir''s node and right click
properties menu.
(you can just select the virtual directory you created formly that contains
your application''s file....)

2. In the "Directory" or "Virtual Directory" panel, check the "Application
Name" entry field to see whether it is enabled, if not, click the "Create"
button on the right side to create it as an application virtual dir.....

After you create the virtual directory as an application virtual dir, the
ASP.NET application in that virutal dir will run as a single alone
application.....

In addition, notice that ASP.NET application will always inherit
configuration setting from machine.config to IIS site''s root web.config to
its own web.config.... So be sure that if you need to run both asp.net
1.1 and asp.net 2.0 web application, you''ll need to create two websites
(only available for server OS like windows 2003 server) and one configured
for asp.net 1.1 and another configured for asp.net 2.0 ....

Here are the technet reference about IIS6 ASP.NET application deployment:

#Overview of Deploying ASP.NET Applications (IIS 6.0)
http://www.microsoft.com/technet/pro.../Library/IIS/6
4ac3577-7746-4fbd-a5e6-e50bdecf7a24.mspx

Hope helps. If there''re anything unclear, please feel free to post here.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Thom Little" <th**@tlanet.net>
| References: <uz**************@TK2MSFTNGP14.phx.gbl>
<uB**************@TK2MSFTNGP15.phx.gbl>
| Subject: Re: Could Not Load Assembly
| Date: Wed, 14 Dec 2005 00:37:44 -0500
| Lines: 67
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| X-RFC2646: Format=Flowed; Response
| Message-ID: <#K**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 65.99.185.176
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:364681
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I got a new 2.0 webspace defined on the remote server (it took a while)
and
| tried two tests. One was to copy my "published directory" to the root of
| the new webspace. The other was to copy all the files in the directory to
| the root of the new webspace.
|
| From directory in new webspace ...
|
| Server Error in ''/'' Application.
|
----------------------------------------------------------------------------
----
|
| Parser Error
| Description: An error occurred during the parsing of a resource required
to
| service this request. Please review the following specific parse error
| details and modify your source file appropriately.
|
| Parser Error Message: Could not load the assembly ''App_Web_wvnwbatv''.
Make
| sure that it is compiled before accessing the page.
|
| Source Error:
|
| Line 1: <%@ page language="C#" autoeventwireup="true"
inherits="_Default,
| App_Web_wvnwbatv" %>
| Line 2:
| Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| Source File: /thom/Default.aspx Line: 1
|
|
|
----------------------------------------------------------------------------
----
| Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
| Version:2.0.50727.42
|
|
| From the root of the new webspace ...
|
|
| Server Error in ''/'' Application.
|
----------------------------------------------------------------------------
----
|
| The resource cannot be found.
| Description: HTTP 404. The resource you are looking for (or one of its
| dependencies) could have been removed, had its name changed, or is
| temporarily unavailable. Please review the following URL and make sure
that
| it is spelled correctly.
|
| Requested URL: /Default.aspx
|
|
| I would not have gotten this far without your suggestion.
|
| Apparently you are only allowed to set the Framework version on the root
| (and all the subdirectories) or a webspace. I would like to be able to
set
| it on a directory-by-directory basis but apparently that is not allowed.
|
| --
| -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
| --
|
| "Bruce Barker" <br******************@safeco.com> wrote in message
| news:uB**************@TK2MSFTNGP15.phx.gbl...
| > your vdir in iis is mapped to asp.net 1.1, change it to 2.0 (asp.net
tab
| > under properties).
| >
| > -- bruce (sqlwork.com)
|
|
|

这篇关于无法加载程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆