部署预编译网站:发现不明确的匹配错误

发布于 2024-09-30 23:30:52 字数 536 浏览 0 评论 0原文

我正在尝试部署一个在 Visual Studio 2010、.NET 4 中制作的网站(网站项目)。我选择了在 VS 中发布,并选择了预编译网站。然后我将结果复制到 ftp 上,并收到此错误:

描述:解析服务此请求所需的资源时发生错误。请查看以下特定解析错误详细信息并适当修改您的源文件。

解析器错误消息:发现不明确的匹配。

源错误:

Line 1:  <%@ control inherits="ASPNetPortal.Welcome, App_Web_bsx3gdjs" language="c#" %>
Line 2:  <%@ Register TagPrefix="uc1" TagName="Footer" Src="Footer.ascx" %>
Line 3:  <style type="text/css">    

Source File: /DesktopModules/Welcome.ascx    Line: 1 

该网站在本地主机(在 VS 中)上运行良好。我能做些什么?

I'm trying to deploy a website (website project) made in Visual Studio 2010, .NET 4. I've selected publish in VS, and left precompiled website selected. Then I copied the result on the ftp, and got this 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: Ambiguous match found.

Source Error:

Line 1:  <%@ control inherits="ASPNetPortal.Welcome, App_Web_bsx3gdjs" language="c#" %>
Line 2:  <%@ Register TagPrefix="uc1" TagName="Footer" Src="Footer.ascx" %>
Line 3:  <style type="text/css">    

Source File: /DesktopModules/Welcome.ascx    Line: 1 

The site works fine on localhost (in VS). What can I do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拒绝两难 2024-10-07 23:30:52

检查是否有两个字段仅大小写不同 (1)。

(1) - http://www.onpreinit.com/2009/09 /ambiguous-match-found_30.html

Check to see if you have two fields that differ only in casing (1).

(1) - http://www.onpreinit.com/2009/09/ambiguous-match-found_30.html

猫腻 2024-10-07 23:30:52

我回答有点晚了,但我也遇到了同样的问题。如果您只有一个网站,则无需编译 dll - 只需使用原始代码文件。如果您需要 dll,则必须使用网络应用程序而不是网站

请参阅此处了解如何转换您的网站网络应用程序。一旦你这样做了,你就会在 VS 中得到所有这些编译错误,并可以解决它们。

您看到的特定错误是因为作为 Web 应用程序,代码对于您在文件后面的代码中命名部分类的内容更加具体。为了解决该特定错误,每个错误都必须以不同的方式命名。

I'm a bit late for answering, but I just had this same problem. If you only have a website, you don't need to compile the dlls - just use the raw code files. If you want dlls, you have to use a web application instead of a web site.

See here about how to convert your website to a web application. Once you do that, you'll get all those compile errors right in VS, and can resolve them.

The particular error you see is because as a web application, the code is more particular about what you name the partial classes in the code behind files. Every one has to be named differently in order to resolve that particular error.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文