You can run Umbraco in a virtual directory in 4.5.x, I've worked on a site with it.
You've always been able to run other apps in a virtual directory under Umbraco, you just have to ensure that the web.config in the 'sub applications' remove the Umbraco HttpModules.
I've got it up and running however I'm experiencing a problem when rendering media items. Do you know if there is any other setting that needs amending?
Basically when I insert an image into the Rich Text Editor it saves the file in the correct folder e.g. "/virtualdirectory/media/1/image.gif". However as soon as I click 'Save and publish' and then view the webpage the path changes to "/media/1/image.gif" when rendered which doesn't exist.
Ok, looks like a few people have reported it but it hasn't been fixed yet. I wouldn't mind having a go at fixing it myself. Can you please point me in the direction of where to download the source for 4.5.2?
For those reading this thread, this bug is actually not fixed in Juno, at least not in the 4.6 beta based on my test yesterday. As with 4.5.2 release, you can insert an image just fine, the preview is there, the HTML shows the virtual directory, and when you publish, the virtual directory is removed from the path, and the image breaks.
It is a known issue; just wish it would get fixed, as it appears (so far, anyway) to be the main stumbling block to actually using Umbraco in a virtual directory.
I did set the umbracoMediaPath key in the web.config. After looking at the soure code I realized that you need to actually delete the file you uploaded in the Media section and re-upload the file, as that is how it saves. Its a huge pain, but good to know if you have a new site.
Once I added the key, deleted my old media file, and re-created it, I noticed that it pointed to the directory I specified. So if you're running in the virtual directory "/myvirdir/" then your umbracoMediaPath key value needs to be "/myvirdir/media"
Keep in mind that if you ever move to the root directory, or change virtual directories, you'll need to either re-create the media items or run some SQL to fix the path directly in the cmsContentXml table in the database.
Is it possible to get the media path to a location directly on disk, rather than a location somewhere within the website? For example a location on your computer's C drive "C:\MyMediaFolder\".
You won't be able to do that unless you edit the Umbraco source and also create some sort of control to get private files and stream them via a public interface. If the media files are on a private section on the server, then they won't be accessible to the public.
Virtual Directories 4.5.2
Hi,
Please can somebody confirm that Virtual Directories work succesfully in 4.5.2?
I've searched and seen a couple of posts saying of things not working correctly but nobody saying all is working fine.
The reason I ask is I'm just about to start a commercial project that will use virtual directories (if possible) so need to know which route to take.
Thanks
Ben
You can run Umbraco in a virtual directory in 4.5.x, I've worked on a site with it.
You've always been able to run other apps in a virtual directory under Umbraco, you just have to ensure that the web.config in the 'sub applications' remove the Umbraco HttpModules.
Thanks for the reply slace.
I've got it up and running however I'm experiencing a problem when rendering media items. Do you know if there is any other setting that needs amending?
Basically when I insert an image into the Rich Text Editor it saves the file in the correct folder e.g. "/virtualdirectory/media/1/image.gif". However as soon as I click 'Save and publish' and then view the webpage the path changes to "/media/1/image.gif" when rendered which doesn't exist.
Is this a bug?
Looks like this is a known issue: http://umbraco.codeplex.com/workitem/29196
Ok, looks like a few people have reported it but it hasn't been fixed yet. I wouldn't mind having a go at fixing it myself. Can you please point me in the direction of where to download the source for 4.5.2?
Thanks.
http://umbraco.codeplex.com/SourceControl/list/changesets
$/branches/4.1 is the latest source (ie - what'll become 4.6)
Ben, did you ever fix this yourself, or manage to find a way to work around it?
I'm pretty sure the bug is fixed in Juno
Cool. I'll check it out.
For those reading this thread, this bug is actually not fixed in Juno, at least not in the 4.6 beta based on my test yesterday. As with 4.5.2 release, you can insert an image just fine, the preview is there, the HTML shows the virtual directory, and when you publish, the virtual directory is removed from the path, and the image breaks.
It is a known issue; just wish it would get fixed, as it appears (so far, anyway) to be the main stumbling block to actually using Umbraco in a virtual directory.
It's also worth noting that using the umbracoMediaPath setting as suggested here http://our.umbraco.org/wiki/reference/webconfig/additional-umbraco-specific-appsettings doesn't seem to have any effect on this whatever. In fact, it doesn't appear to do anything at all; perhaps I'm not doing it correctly.
I've also experienced the umbracoMediaPath setting not doing anything. Anyone else experienced this?
I did set the umbracoMediaPath key in the web.config. After looking at the soure code I realized that you need to actually delete the file you uploaded in the Media section and re-upload the file, as that is how it saves. Its a huge pain, but good to know if you have a new site.
Once I added the key, deleted my old media file, and re-created it, I noticed that it pointed to the directory I specified. So if you're running in the virtual directory "/myvirdir/" then your umbracoMediaPath key value needs to be "/myvirdir/media"
Keep in mind that if you ever move to the root directory, or change virtual directories, you'll need to either re-create the media items or run some SQL to fix the path directly in the cmsContentXml table in the database.
Is it possible to get the media path to a location directly on disk, rather than a location somewhere within the website? For example a location on your computer's C drive "C:\MyMediaFolder\".
@mots
You won't be able to do that unless you edit the Umbraco source and also create some sort of control to get private files and stream them via a public interface. If the media files are on a private section on the server, then they won't be accessible to the public.
is working on a reply...