简体   繁体   English

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

[英]Deploy ASP.NET application in the same web site as Sharepoint

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. 我正在尝试将Bugtracker.NET工具( http://ifdefined.com/bugtrackernet.html )(一个普通的ASP.NET 2.0应用程序)部署到已安装了Sharepoint的IIS的默认网站中。 The OS is Windows Server 2008 R2, IIS 7.5 and Sharepoint Services 3.0. 操作系统是Windows Server 2008 R2,IIS 7.5和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. 问题是,当我执行应用程序时,我得到一个NullReferenceException,因为HttpContext.Current.Session为null,我认为这可能是由于网站配置有问题,因为应用程序在网站中运行完美没有安装Sharepoint。

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. 我已经知道Sharepoint使用句柄,模块等自定义网站,网站中的所有应用程序都会继承,修改其行为。 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. 我已经给ASP.NET应用程序完全信任级别,启用了匿名身份验证和InProc会话状态,但我仍然得到HttpContext.Current.Session为null。 Even changing the app pool from Wss3AppPool to DefaultAppPool does not succeed. 即使将应用程序池从Wss3AppPool更改为DefaultAppPool也不会成功。

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 JoséAntonioArroba

You need to look into Managed Paths and excluding the path to your bugtrackernet app. 您需要查看托管路径并排除bugtracker网络应用程序的路径。

However why do you HAVE to use the default web application? 但是,为什么你必须使用默认的Web应用程序?

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. 为什么不保持简单的生活,并在单独的主机头或子域上设置新的IIS Web应用程序,并在那里托管您的应用程序。

eg 例如

http://bugtracker.yourdomain/ HTTP://bugtracker.yourdomain/

or just 要不就

http://bugtracker/ HTTP://错误追踪系统/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM