在与 Sharepoint 相同的网站中部署 ASP.NET 应用程序

发布于 2024-09-09 10:55:37 字数 675 浏览 1 评论 0原文

我正在尝试部署 Bugtracker.NET 工具 (http://ifdefine.com/bugtrackernet.html ),这是一个普通的 ASP.NET 2.0 应用程序,进入已安装 Sharepoint 的 IIS 的默认网站。操作系统是Windows Server 2008 R2、IIS 7.5和Sharepoint Services 3.0。

问题是,当我执行应用程序时,我收到 NullReferenceException,因为 HttpContext.Current.Session 为 null,我认为这可能是由于网站配置问题造成的,因为应用程序在网站中运行完美未安装 Sharepoint。

我已经知道 Sharepoint 使用句柄、模块等自定义网站,网站中的所有应用程序都会继承并修改其行为。我已经给予 ASP.NET 应用程序完全信任级别,启用了匿名身份验证和 InProc 会话状态,但我仍然发现 HttpContext.Current.Session 为 null。即使将应用程序池从 Wss3AppPool 更改为 DefaultAppPool 也不会成功。

也许有人可以告诉我需要在网站中调整哪些设置才能避免这种异常。

非常感谢。

何塞·安东尼奥·阿罗巴

I am trying to deploy the Bugtracker.NET tool (http://ifdefined.com/bugtrackernet.html), which is a normal ASP.NET 2.0 application, into the default web site of an IIS which already has Sharepoint installed in it. The OS is Windows Server 2008 R2, IIS 7.5 and Sharepoint Services 3.0.

The question is that when I execute the application, I get a NullReferenceException because HttpContext.Current.Session is null, and I think that this could be due to a problem with the configuration of the web site, as the application runs perfect in web sites with no Sharepoint installed.

I already know that Sharepoint customizes the web site with handles, modules and so on, that all applications in the web site inherit, modifying their behavior. I have already given to the ASP.NET application Full trust level, enabled Anonymous authentication and InProc session state, but I am still getting that HttpContext.Current.Session is null. Even changing the app pool from Wss3AppPool to DefaultAppPool does not succeed.

Maybe someone could tell me which settings do I need to tweak in the web site in order to avoid this exception.

Many thanks in advance.

José Antonio Arroba

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

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

发布评论

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

评论(1

来世叙缘 2024-09-16 10:55:37

您需要查看托管路径并排除bugtrackernet 应用程序的路径。

但是为什么你必须使用默认的网络应用程序呢?

为什么不让您的生活变得简单并在单独的主机标头或子域上设置新的 IIS Web 应用程序并在那里托管您的应用程序。

例如

http://bugtracker.yourdomain/

或只是

http://bugtracker/

You need to look into Managed Paths and excluding the path to your bugtrackernet app.

However why do you HAVE to use the default web application?

Why not keep your life simple and setup a new IIS web application on a separate host header or subdomain and host your app there.

e.g.

http://bugtracker.yourdomain/

or just

http://bugtracker/

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