在IIS中配置URL [英] Configure URL in IIS

查看:292
本文介绍了在IIS中配置URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IIS中建立了一个现有的DNN站点,我想链接到另一个文件夹中的另一个ASP.NET应用程序。我想维护以下相同的域URL:

I have an existing DNN site set up in IIS and I want to link to another ASP.NET application in a separate folder. I want to maintain the same domain URL as follows:

http://dnn9.dnndev.me/otherapplication

有人可以指出我正确的方向吗?

Can anyone point me in the right direction?

更新

当前,主要DNN站点已在IIS中设置为自己的站点(不在默认网站下)。 ,具有自己的应用程序池。我尝试将虚拟目录添加到DNN主站点,并指向其他应用程序文件夹。它给出了404。我添加了< location path =。 InheritInChildApplications = false> DNN网站web.config的system.web部分周围。我的主要DNN网站设置为 dnn9.dnndev.me。我想知道本地的 dnn9子域是否引起问题?

Currently, the main DNN site is set up as its own site in IIS (not under Default Web Site)., with its own App Pool. I tried adding a virtual directory to the main DNN site, pointing to the other application folder. It gives a 404. I added <location path="." inheritInChildApplications="false"> around the system.web section of the DNN site web.config. My main DNN site is set up as "dnn9.dnndev.me". I'm wondering if the "dnn9" subdomain on my local is causing an issue?

另一个应用程序作为IIS中的默认网站下的应用程序添加。自己的应用程序池。

The other application is added as an application under Default Web Site in IIS, with its own App Pool.

我刚刚创建了两个测试网站 Test1和 Test2。我将它们都放置在IIS的默认网站节点下,并向Test1添加了一个虚拟目录,指向Test 2,并且该目录有效。因此,此测试方案与我的实际设置之间的主要区别在于DNN是在IIS中设置为独立应用程序,而不是在IIS中的默认网站节点下。

I just created two test websites "Test1" and "Test2". I placed both of these under the "Default Web Site" node in IIS and added a virtual directory to Test1, pointing to Test 2 and it worked. So the main difference between this test scenario and my actual setup is that DNN is set up in IIS as a standalone app, not under the "Default Web Site" node in IIS.

如何使它工作?

推荐答案

我能够使以下情况起作用。

I was able to make the following scenario work.


  1. 在IIS中名为 DNNDEV.ME的网站中运行的DNN,并且为DNNDEV.ME设置了URL绑定。 DNN文件的位置c:\websites\dnndev.me

  2. 使用相同的DNNDEV.ME应用程序池在DNNDEV.ME站点下创建一个新的 APPLICATION。我指出该应用程序的根目录是文件夹c:\websites\newapp\

  3. 修改了DNN web.config文件,以包装< location path =。 InheritInChildApplications = false>在system.webServer节点周围

  4. 通过该功能,我添加了一个名为sample.aspx的文件,其内容为

  1. DNN running in a website in IIS called "DNNDEV.ME" with the URL binding being set for DNNDEV.ME. Location of the DNN files c:\websites\dnndev.me
  2. Created a new "APPLICATION" under the DNNDEV.ME site, using the same DNNDEV.ME application pool. I pointed that application's root to the folder c:\websites\newapp\
  3. Modified the DNN web.config file to wrap <location path="." inheritInChildApplications="false"> around the system.webServer node
  4. With that functioning I added a file called sample.aspx, with the contents being

这是一个测试。

该站点加载正常,DNN继续以及功能。我将 https://www.daniellittle.xyz/example-web-config-files-3-5-and-4-5/#Framework451 仅用于

The site loaded fine, and DNN continued to function as well. I added a sample web.config into the c:\websites\newapp\ folder from https://www.daniellittle.xyz/example-web-config-files-3-5-and-4-5/#Framework451 just to check that out, and the site continued to function as well.

我也将dnn9.dnndev.me添加到了DNNDEV.ME网站上的绑定中,并且它继续正常运作

I added dnn9.dnndev.me to my bindings on the DNNDEV.ME website as well, and it continues to function without problems.

我所做的唯一真正的区别是您所做的测试,您说过,我在IIS中为/ NewApp /创建了APPLICATION,而不是虚拟目录

Only real difference I can see from what I did, and you said you tested, is that I made an APPLICATION not a Virtual Directory in IIS for /NewApp/

这篇关于在IIS中配置URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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