如何从根目录重定向到Web服务器中的文件夹 [英] how to redirect from root directory to a folder in a web server

查看:292
本文介绍了如何从根目录重定向到Web服务器中的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



i有两个不同的应用程序,一个是在服务器根目录上运行的网站项目,第二个是文件夹中的Web应用程序项目,两个项目都有他们的配置文件,我把链接放在网站项目的配置文件中



i我试图将用户从网站项目重定向到Web应用程序项目,每当我使用它:



hello everyone,

i have two different applications, one is a website project running on the the server root, the second is a web application project in a folder, both projects have their configuration files, and i am putting the link in the configuration file of the website project

i am trying to redirect users from the website project to the web application project, whenever i use this:

<add key="CoronaPortalAddress" value="http://localhost/coronaportal/Security/ApplicantSignIn1.aspx?applicationType=" />
<add key="CoronaPortalSignInPage" value="http://localhost/coronaportal/Security/SignIn.aspx" />
<add key="CoronaPortalTimeTablePage" value="http://localhost/coronaportal/Conona Schools_ Trust Council_ApplicantTestScores/TimeTable1.aspx" />
<add key="CoronaPortalResultsPage" value="http://localhost/coronaportal/ParentReportLogin.aspx" />





用户将被重定向,但在网址上它将显示localhost,因此我将其更改为:





users will be redirected, though on the url it will showing localhost, so i change it to:

<add key="CoronaPortalAddress" value="http://www.shodsystems.com/coronaportal/Security/ApplicantSignIn1.aspx?applicationType=" />
<add key="CoronaPortalSignInPage" value="http://www.shodsystems.com/coronaportal/Security/SignIn.aspx" />
<add key="CoronaPortalTimeTablePage" value="http://www.shodsystems.com/coronaportal/Conona Schools_ Trust Council_ApplicantTestScores/TimeTable1.aspx" />
<add key="CoronaPortalResultsPage" value="http://www.shodsystems.comcoronaportal/ParentReportLogin.aspx" />



现在它抛出错误:



使用在应用程序级别之外注册为allowDefinition ='MachineToApplication'的部分是错误的。这个错误可能是因为虚拟目录没有被配置为IIS中的应用程序

i试图谷歌这个,但无法修复它,任何帮助都将不胜感激。


now it throwing error:

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS
i tried to google this, but couldnt fix it, any assistance would be appreciated.

推荐答案

在IIS中,右键单击包含Web应用程序的文件夹并选择转换为应用程序 - 但我建议您将项目在根文件夹中移动到另一个子文件夹,然后右键 - 单击IIS中的两个文件夹中的每一个,然后选择转换为应用程序。然后,您将拥有两个独立运行的Web应用程序。 (并从web.configs中删除所有不必要的密钥)
In IIS, right-click the folder with the web-application in and choose "Convert to application" - but I'd suggest you move your project in the root folder to another subfolder, then right-click each of the two folders in IIS and select "Convert to application". You will then have two separate web applications running independently. (And remove all the unnecessary keys from your web.configs)


这篇关于如何从根目录重定向到Web服务器中的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆