Copied to clipboard

Flag this post as spam?

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


  • Prisha 16 posts 86 karma points
    Jun 17, 2017 @ 08:26
    Prisha
    0

    Issue with using Umbraco in Sub-folder / Virtual Directory?

    Hi Friendly Community,

    I am using Umbraco in virtual directory in IIS and when I save partial view macro I get error, also application name is appended(indicated with the red box). I don't get this problem when I use IISexpress. Screen shoot of issue: enter image description here

    So far I read this and this and read this but none of them really describe the problem I am facing. Please help me !!!!

  • Gary 1 post 71 karma points
    Apr 04, 2018 @ 06:53
    Gary
    0

    hi all, i also get above issue. any help please?

  • Eugene 1 post 71 karma points
    Apr 19, 2018 @ 02:18
    Eugene
    0

    I have the same issue. There is no slash between the virtual directory name and partial view folder name. Does anyone know how to fix this ?

    An error occured File '/UmbracoTest774StandardPageComponents/MyProduct.cshtml' is outside this filesystem's root.

  • Bernz 2 posts 72 karma points
    Oct 03, 2018 @ 08:50
    Bernz
    0

    Any solution with this problem is so much appreciated. Same problem here. Thanks for any response.

  • Bernz 2 posts 72 karma points
    Oct 08, 2018 @ 11:34
    Bernz
    0

    After some front-end debugging, I come up with some workaround, though it's untidy I think.

    I modified "save" function in "\Umbraco\Js\umbraco.resources.js" to:

      save: function (codeFile) {
                            codeFile.virtualPath = "~/Views/MacroPartials/" + codeFile.id; 
                                 return umbRequestHelper.resourcePromise($http.post(umbRequestHelper.getApiUrl('codeFileApiBaseUrl', 'PostSave'), codeFile), 'Failed to save data for code file ' + codeFile.virtualPath);
         },
    

    I added line:

    codeFile.virtualPath = "~/Views/MacroPartials/" + codeFile.id; 
    

    Perhaps there's something wrong with back-end parsing of macro partialview file fullPath in server-side. Not sure though.

    Hope this helps. :)

  • andrew van vlack 3 posts 95 karma points
    Apr 27, 2019 @ 11:33
    andrew van vlack
    0

    I fixed this in an Umbraco 7.14 installation by making the following change:

    Running in a Virtual Directory IIS:

    codeFile.virtualPath = codeFile.virtualPath.replace("/virtualdirectory", "");

Please Sign in or register to post replies

Write your reply to:

Draft