MVC应用程序端点身份验证子域所必需的

时间:2013-08-28 21:54:50

标签: asp.net-mvc-3 authentication windows-server-2008-r2

我在c#.net上运行了MVC3 Windows Server 2008 R2 Datacenter个应用程序。

如果我将应用程序部署为主站点下的应用程序(即www.mysite.com/crm),它可以完美运行。

如果我将应用程序作为子域部署到主站点(即crm.mysite.com),它似乎按预期工作,但一个端点(crm.mysite.com/reports/view)除外。该路径返回以下身份验证通知:

Authentication Required
The server http://crm.mysite.com:80 requires a username and password.

我不知道该端点有什么特别之处,正如我所提到的,它在主站点下部署时没有问题。

这会导致什么?如何删除/阻止它?

我甚至不知道提供哪些代码来帮助诊断问题。如果您想查看与此问题相关的任何部分的代码部分,请与我们联系。

更新

我不会将路径移动到任何一种情况的应用程序文件,它们都使用相同的应用程序池。唯一的区别是用户如何通过IIS访问文件。

UPDATE2

如果我验证用户,我收到此错误:

Server Error in '/Reports' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

为什么它会认为资源显然不存在?

1 个答案:

答案 0 :(得分:0)

如果您在主站点上进行身份验证,则它不会自动将身份验证传递到子域。您必须开发一种机制来处理这种情况,例如SSO(单点登录)。

另一个潜在问题是目录/应用程序的权限(例如c:\inetpub\wwwroot\crm.mysite.com