显示 ASP.Net MSChart / 文件问题

发布于 2024-10-08 00:26:27 字数 1412 浏览 9 评论 0原文

我已将 MSChart 添加到网页,并且还使用从 4GuysFromRolla。两者都可以在我的开发计算机上运行,​​但是当我将它们移动到我的托管站点时,就会出现问题。

对于 MSChart 页面,尽管包含页面源代码,但图表并未显示:

src="/ClubInformationTracking/ChartImg.axd?i=chart_3d90c53b0f844807a2491a1d79a636a1_0.png&g=75fecf0f14cf4121b623691d383263aa" alt="" style="height:300px;width:700px;border-width:0px;" />

当我尝试打开调查页面时,我得到以下信息: 解析器错误消息:无法加载文件或程序集“sstchur.web.survey”或其依赖项之一。系统找不到指定的文件。

源错误:

<%@ Register TagPrefix = "sstchur" Namespace = "sstchur.web.survey" Assembly = "sstchur.web.survey" %>
<%@ Page Language = "C#" %>

程序集加载跟踪:以下信息有助于确定无法加载程序集 sstchur.web.survey 的原因。

WRN:程序集绑定日志记录已关闭。 要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) 设置为 1。

注意: 会产生一些相关的性能损失具有程序集绑定失败日志记录。 要关闭此功能,请删除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。

托管站点使用的是 4.0 版本,调查所需的 dll 位于 BIN 目录中。

当我将文件移动到托管站点时,当我引用来自以下位置的文件时,我必须更改每个实例:

“~/FileName”

我已经

“FileName”

尝试了可以​​为涉及更改的 MSChart 找到的所有“修复”到 web.config 文件,但由于与调查页面相关的错误消息,我猜测这就是问题所在。

有什么建议吗?

I’ve add MSChart to a webpage and I’m also using a Survey page I got from 4GuysFromRolla. Both work on my development machine but when I move them to my hosting site there are issues.

With MSChart page the chart is not displayed although it’s included the Page Source code:

src="/ClubInformationTracking/ChartImg.axd?i=chart_3d90c53b0f844807a2491a1d79a636a1_0.png&g=75fecf0f14cf4121b623691d383263aa" alt="" style="height:300px;width:700px;border-width:0px;" />

And when I try to open the Survey page I get this:
Parser Error Message: Could not load file or assembly 'sstchur.web.survey' or one of its dependencies. The system cannot find the file specified.

Source Error:

<%@ Register TagPrefix = "sstchur" Namespace = "sstchur.web.survey" Assembly = "sstchur.web.survey" %>
<%@ Page Language = "C#" %>

Assembly Load Trace: The following information can be helpful to determine why the assembly sstchur.web.survey 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].

The Hosting site is using Version 4.0 and the dll needed for the survey is in the BIN directory.

When I moved my files to the hosting site I had to change every instance when I referred to a file from:

“~/FileName”

To

“FileName”

I’ve tried all of the “fixes” I could find for the MSChart that involved changes to the web.config file but because of the error messages associated with the Survey page I’m guessing this is the issue.

Any suggestions?

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

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

发布评论

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

评论(2

咋地 2024-10-15 00:26:27

/Bin 文件夹位于子目录中。

根/公共/ClubInformationTracking/BIN

The /Bin folder is in a subdirectory.

Root/public/ClubInformationTracking/BIN

↙温凉少女 2024-10-15 00:26:27

ASP.NET 仅在应用程序的根 /bin 文件夹中查找 DLL。如果您刚刚自己添加了 ClubInformationTracking 文件夹,并且没有通过网络托管提供商的控制面板将其配置为 IIS 应用程序或虚拟目录,那么这就是问题所在,如下所示ASP.NET 正在 /Bin(或者可能是 /public/Bin,具体取决于设置方式)中查找任何 DLL。

这里有两种可能的补救措施:

  • Bin 文件夹(及其内容)从 ClubInformationTracking 子文件夹移动到 public 并查看是否可以作品。如果没有,请尝试将其移至 root

  • 从 Web 托管提供商的控制面板中,将 ClubInformationTracking 文件夹设为虚拟目录或 IIS 应用程序。如果您不清楚如何执行此操作,请联系您的 Web 托管提供商的支持人员。

谢谢,祝编程愉快!

ASP.NET only looks for DLLs in the application's root /bin folder. If you just added the ClubInformationTracking folder yourself and did not configure it to be an IIS application or virtual directory via the web hosting provider's control panel, then that is the problem, as ASP.NET is looking for any DLLs in /Bin (or, perhaps, /public/Bin, depending on how things are setup).

There are two possible remedies here:

  • Move the Bin folder (and its contents) from the ClubInformationTracking subfolder into public and see if that works. If not, try moving it to root

  • From the web hosting provider's control panel, make the ClubInformationTracking folder a virtual directory or IIS application. If you're unclear on how do to this, contact your web hosting provider's support.

Thanks, and happy programming!

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