问题描述
我正在尝试在托管子文件夹中运行一个小型ASP.NET项目.我的域名是www.gorangligorin.com,但是我想在www.gorangligorin.com/testmvc中运行我的应用程序.ASP.NET MVC在顶层运行时没有问题,但在子文件夹中没有问题.
I'm trying to run a little ASP.NET project in a subfolder of my hosting.My domain is www.gorangligorin.com, but i want to run my app in www.gorangligorin.com/testmvc. ASP.NET MVC runs with no problems on the top level, but not in subfolders.
服务器这样说(第58行显示为红色):
The server says this (line 58 is colored red):
Line 56: ASP.NET to identify an incoming user.
Line 57: -->
Line 58: <authentication mode="Forms">
Line 59: <forms loginUrl="~/Account/LogOn" timeout="2880" />
Line 60: </authentication>
如何使该ASP.NET MVC网站正常工作?它不是托管在我的计算机上,因此我无权访问IIS配置.
What can I do to make this ASP.NET MVC website work? This isn't hosted on my computer, so I don't have access to IIS configirations.
推荐答案
您是否在IIS中为此目录创建了ASP.NET应用程序?否则,ASP.NET会认为服务器的根目录是应用程序的根目录,而不是子目录中的根目录.
Did you create a ASP.NET Application in IIS for this directory? Otherwise ASP.NET thinks the root of your server is the root of your application, not the one in the subdirectory.
这篇关于如何在子文件夹中托管ASP.NET MVC站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!