Configure URL in IIS

谁都会走 提交于 2019-12-08 09:19:37

问题


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?

UPDATE

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?

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

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.

How can I get this to work?


回答1:


I was able to make the following scenario work.

  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

    This is a test.

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.

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

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/



来源:https://stackoverflow.com/questions/52651065/configure-url-in-iis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!