Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Haider 1 post 21 karma points
    May 21, 2015 @ 09:40
    Haider
    0

    Setting up Umbraco as a subsite inside another Website (Virtual Directory converted to application) in IIS

    Hi 

    I have configured an umbraco website in IIS successfully and is working fine. Now, i have a requirement to add this Umbraco Website to be inside a virtual directory converted to application in another parent website. But there is an issue with the paths configuration. Media folder and all the JS get requests are being sent to root/media and root/umbraco which is invalid since the actual paths are now root/virtualdirectory/media and root/virtualdirectory/umbraco. When umbraco dashboard is opened it shows empty screen on Logging in and then redirects to login page after some time. There are some 404 errors in console which i reckon are the reason of the issue and are being produced due to wrong paths setting.

    Kindly tell me how am i supposed to set these path values since i am not able to find anything in Web.config and UmbracoSettings.config.

    Any help in this regard would be highly appreciated.

  • Joseph A 2 posts 72 karma points
    Oct 27, 2015 @ 20:18
    Joseph A
    0

    Hi Haider, BTW did you got any solution for this issue. I am stuck at the same.

    Thanks.

  • Comment author was deleted

    Oct 27, 2015 @ 20:32

    Which version are you running (v latest so 7.3 ?)? Might be that it isn't supported currently, if so you can add that to the but tracker at http://issues.umbraco.org/

  • bengan 26 posts 90 karma points
    Mar 02, 2016 @ 14:55
    bengan
    0

    Hi there,

    I have a similar problem with the currently latest version 7.4.1. In IIS we have a website like

    http://mywebsite.com

    Beneath this website we created a virtual application with the Umbraco installation like

    http://mywebsite.com/myumbracosite

    Unfortunately it seems, that Umbraco refers to the root directory of http://mywebsite.com as its Umbraco root instead of the directory of the virtual application where Umbraco is installed. This results in URLs generated by Umbraco like

    • /myumbracosite/css/default.css
    • /myumbracosite/scripts/default.js
    • /myumbracosite/media/1001/myimage.jpg
    • /myumbracosite (as URL for the root page)

    visible in the backend instead of

    • /css/default.css
    • /scripts/default.js
    • /media/1001/myimage.jpg
    • / (as URL for the root page)

    Is there a way to configure Umbraco to accept the root directory of the IIS-virtual directory /myumbracosite as its Umbraco root directory?

    Thanks and best regards, Ben

  • Pat Mancini 8 posts 72 karma points
    Apr 14, 2016 @ 06:38
    Pat Mancini
    0

    Hi did you get a solution to this? we have the same problem with v 7.2.8

  • Afrizal Chen 3 posts 72 karma points
    Jun 02, 2016 @ 08:24
    Afrizal Chen
    0

    Using 7.4.3.. having the same issue

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jun 02, 2016 @ 08:51
    Ismail Mayat
    0

    Afrizal,

    Watch out for plugins like le blender if you are using virtual directories that will play up. Also your scheduled tasks internal publish / un publish task will start to log errors that will need updating as well.

    Regards

    Ismail

  • Prashant 8 posts 78 karma points
    Aug 22, 2016 @ 15:52
    Prashant
    0

    Hi Guys,

    I am stuck with resembling issue.

    I have configured an umbraco 7.3.1 website in IIS successfully and is working fine. Now, i have a requirement to add this Umbraco 7.3.1 Website to be inside a virtual directory converted to application in another parent website (Umbraco 7.3.1). But there is an issue while running that 7.3.1 site as subsite. When i tried to access this site as for example like, Umbraco7.3.1site/Umbraco7.3.1Subsite. We are getting the follwing error.

    enter image description here

    Please provide your solutions for it, i have wasted almost a week over it.

    My route for the 7.3.1 site is: "D:\delete me\UmbNewInstances\Parent" Route for the 7.3.1 subsite is: "D:\delete me\UmbNewInstances\Child"

    Let me know if someone wants any input from my side.

  • Luke Hook 45 posts 175 karma points c-trib
    Jul 24, 2019 @ 14:12
    Luke Hook
    0

    I hate to be that guy but did you get any solutions to this?

  • Gabe 1 post 71 karma points
    Feb 01, 2017 @ 17:56
    Gabe
    0

    I also had umbraco (v7.5.8) running as a virtual application and had the same issue as above:

    http://mywebsite.com/myumbracosite

    The solution in my case was to add the tilde symbol '~' on static href tags.

    For example:

    Change
    <link rel="stylesheet" href="/css/style.css">
    To
    <link rel="stylesheet" href="~/css/style.css">
    
    Change
    <a href="/forms">Forms</a>
    To
    <a href="~/forms">Forms</a>
    
  • Renee Haas 18 posts 109 karma points
    Jul 24, 2019 @ 14:32
    Renee Haas
    0

    Its been a long time but I did get this working. The biggest thing that solved problems for me was making sure that the child site did not inherit web.config information from the parent website. In the parent web.config file I wrapped several sections with

    <location path="." inheritInChildApplications="false">
    

    Which included umbracoConfiguration appSettings and system.web sections. In addition I had a lot of issues with the media and I believe I solved that by adding a web.config file in the media folder with this simple code

        <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <system.webServer>
        <handlers>
          <clear />
          <add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
        </handlers>
      </system.webServer>
    </configuration> 
    

    This should help you get further along in making this happen.

  • Renee Haas 18 posts 109 karma points
    Jul 24, 2019 @ 14:44
    Renee Haas
    0

    Its been a long time but I did get this working. The biggest thing that solved problems for me was making sure that the child site did not inherit web.config information from the parent website. In the parent web.config file I wrapped several sections with

    <location path="." inheritInChildApplications="false">
    

    Which included umbracoConfiguration appSettings and system.web sections. In addition I had a lot of issues with the media and I believe I solved that by adding a web.config file in the media folder with this simple code

        <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <system.webServer>
        <handlers>
          <clear />
          <add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
        </handlers>
      </system.webServer>
    </configuration> 
    

    This should help you get further along in making this happen.

    I also wanted to add a note from a file perspective and IIS. Create the sites in their own file structure as you would any two independent sites. Do not create the child sites within the file structure of the parent site. Then in IIS you can setup a reference to the child site from the parent site as an application.

Please Sign in or register to post replies

Write your reply to:

Draft