如何正确设置 IIS6 应用程序池

发布于 2024-07-09 01:50:56 字数 389 浏览 5 评论 0原文

我真的被这个解析器错误消息困住了,它告诉我“无法加载程序集'App_Web_amlohswi'。请确保在访问页面之前对其进行编译。”我已经环顾四周检查了几个小时这里有不同的帖子和谷歌搜索信息。 我发现我需要设置一个运行 .NET 2.x 的新应用程序池。

(顺便说一句,我的应用程序正在 .NET 3.5 中开发,有没有办法将其设置为使用 3.5 而不是 2.x< /code>?)

有人能给我一个很好的解释,说明如何正确设置它以及(可选)为什么有必要吗?

我比较习惯用PHP开发所以习惯编辑src>>> 上传>> 成功!

谢谢!

I am really stuck with this Parser Error Message telling me "Could not load the assembly 'App_Web_amlohswi'. Make sure that it is compiled before accessing the page." I have been looking around for a few hours checking different posts here and googling information. I have found out that I need to set up a new Application Pool that runs .NET 2.x.

(On a side note, my app is being developed in .NET 3.5, is there a way to set it up to use 3.5 instead of 2.x?)

Can someone provide me with a good explaination on how to set this up properly and (optionally) why is it necessary?

I am more used to developing in PHP so I am used to edit src >> upload >> success!

Thanks!

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

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

发布评论

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

评论(3

输什么也不输骨气 2024-07-16 01:50:56

只要系统上安装了该版本的 .NET,ASP.NET 3.5 站点就可以在 2.0 应用程序池中运行。

您可能必须正确设置 web.config。 当您创建新项目时,Visual Studio 应该为您执行此操作。

您还应该确保不要将 1.1 和 2.0 应用程序合并在同一个应用程序池中。 尝试将其放入单独的应用程序池中,看看是否有帮助。

ASP.NET 3.5 sites run in 2.0 app pools as long as that version of .NET is installed on the system.

You may have to set up web.config properly. Visual Studio should do this for you when you create a new project.

You should also make sure you don't combine 1.1 and 2.0 applications in the same app pool. Try putting it in a separate app pool and see that helps.

任性一次 2024-07-16 01:50:56

由于@Trull 为您提供了“如何”的链接,我将附上原因。

.Net 3.5 仅基于 .Net 2.0 库构建,因此您无需针对 3.5 进行设置。 .Net 2.0 和 .Net 1.1/1.0 共享一些相同的名称空间和类,因此您需要选择要在应用程序中使用哪一组库。 由于您的应用程序使用 .Net 2.0 中的库,因此您需要设置应用程序池来为您的应用程序加载这些库,而不是 .Net 1.1 库。 即使您仅将应用程序配置为使用(基本).Net 2.0 库,您还需要在 Web 服务器上安装 .Net 3.5。

这基本上相当于 PHP 的不同版本。 您希望使用 PHP 5(并利用 PHP 5 中的构造)编写的应用程序能够与 PHP4 解释器一起使用。 在您的应用程序运行之前,您需要升级到最新的解释器(或者至少选择较新的解释器,如果两者都安装了)。 .Net 也是如此——您需要选择正确的版本,即您的代码在运行之前期望引用的版本。

Since @Trull provided you with a link to the "how", I'll chime in with the why.

.Net 3.5 just builds on the base .Net 2.0 libraries so you don't need to set it up for 3.5. .Net 2.0 and .Net 1.1/1.0 share some of the same name spaces and classes and therefore you need to choose which set of libraries you want to use with your application. Since your application uses the libraries from .Net 2.0, you need your app pool set up to load these libraries for your application rather than the .Net 1.1 libraries. You will also need .Net 3.5 installed on the web server, even though you only configure the app to use the (base) .Net 2.0 libraries.

This would basically be the equivalent of different versions of PHP. You would expect an application written using PHP 5 (and taking advantage of constructs in PHP 5) to work with a PHP4 interpreter. You'd need to upgrade to the newest interpreter (or at least choose the newer one if both are installed) before your app would work. It's the same with .Net -- you need to choose the right version, the version that your code expects to reference before it will work.

沫雨熙 2024-07-16 01:50:56

这里是如何在 IIS 中使用 3.5 的。 汉斯勒曼万岁!

Here is how you use 3.5 in IIS. All hail Hansleman!

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