如何从根目录重定向到Web服务器中的文件夹

编程入门 行业动态 更新时间:2024-10-19 23:39:10
本文介绍了如何从根目录重定向到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="localhost/coronaportal/Security/ApplicantSignIn1.aspx?applicationType=" /> <add key="CoronaPortalSignInPage" value="localhost/coronaportal/Security/SignIn.aspx" /> <add key="CoronaPortalTimeTablePage" value="localhost/coronaportal/Conona Schools_ Trust Council_ApplicantTestScores/TimeTable1.aspx" /> <add key="CoronaPortalResultsPage" value="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="www.shodsystems/coronaportal/Security/ApplicantSignIn1.aspx?applicationType=" /> <add key="CoronaPortalSignInPage" value="www.shodsystems/coronaportal/Security/SignIn.aspx" /> <add key="CoronaPortalTimeTablePage" value="www.shodsystems/coronaportal/Conona Schools_ Trust Council_ApplicantTestScores/TimeTable1.aspx" /> <add key="CoronaPortalResultsPage" value="www.shodsystemscoronaportal/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服务器中的文件夹

本文发布于:2023-11-01 02:10:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1547944.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:根目录   文件夹   重定向   器中   Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!