根据服务器部署 32 位或 64 位 ELMAH 以及网站

发布于 2024-09-24 01:40:15 字数 218 浏览 0 评论 0原文

我目前正在构建一个 ASP MVC 2 站点,并且正在考虑将 ELMAH 挂接到我的错误日志记录中,但是我不确定如何处理不同的构建环境。

我的开发机器和当前的测试服务器都是32位的,生产服务器是64位的。我可以将 MVC 站点设置为在 x86 和 x64 中部署,没有任何问题,但是有什么方法可以让它在各自的服务器上使用 32 位和 64 位 ELMAH 二进制文件,而不需要在构建之间更改引用的 DLL?

I am currently building an ASP MVC 2 site and I am looking at hooking ELMAH in for my error logging however I'm not sure how to handle the different build environments.

Both my development machine and current test server are 32-Bit and the production server is 64-bit. I can set the MVC site to deploy in x86 and x64 without any problems but is there any way I can get it to use the 32bit and 64bit ELMAH binaries on their respective servers without needing to change the referenced DLL between builds?

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

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

发布评论

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

评论(2

噩梦成真你也成魔 2024-10-01 01:40:15

这两个版本之间的差异是由 SQLite 造成的,因为它使用非托管代码。如果您不使用 SQLite 提供程序,也没关系,您可以在两种环境中使用相同的版本。如果您使用 SQLite,那么我不知道如何执行此操作,但我收集大多数人会在生产中使用 SQL Server,因此不会真正遇到此问题。

希望有帮助。

The difference between the two editions is due to SQLite since it uses unmanaged code. If you are not using the SQLite provider, it doesn't matter and you can use the same version in both environments. If you are using SQLite then I am not sure how to do this, but I gather most people will use SQL Server in production so won't really run into this issue.

Hope that helps.

莫言歌 2024-10-01 01:40:15

我遇到了同样的问题,并且不使用 SQLite 不足以使其工作。我尝试删除 SQLite 的所有配置。

我注意到 SQLite dll 是与我的项目一起发布的,因此我将其从包含 Elmah dll 的文件夹中删除。现在我的应用程序可以在 32 位和 64 位下运行。

I had the same problem, and not using SQLite was not enough to make it work. I tried removing all configuration for SQLite.

I noticed that the SQLite dll was published with my project, so i removed it from the folder containing the Elmah dll. Now my application works in both 32-bit and 64-bit.

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