Setting up and running umbraco under a specified path
Hi, I have been asked
to develop an instance of umbraco under a specific path.
My company has a main website developed with the MVC
framework and only a certain area of the website will be controlled by Umbraco
In the MVC application it will be specified in the
global.asax
routes.IgnoreRoute("c/*");
This will tell the MVC application
to ignore c/ as this will be controlled by umbraco. I have umbraco installed as a
default website under IIS7. So it currently is
Are you running Umbraco in a virtual directory? That's what we did in the hybrid application I worked on and I don't think we had to set up a route for Umbraco at all.
I belive in 4.5.x it should be possible to install Umbraco in a virtual directory, so you should just need to setup /c/ as a virtual directory in IIS and install it there.
Give if a go, and if you have any dificuilties, by all means post any issues you are having.
But I have been informed that virtual directories will not work.
The problem with setting up a virtual directory for umbraco is the the mvc application will not be able to share the master pages. When setting up the virtual directory it will be like having another application
It might be possible to merge the Umbraco folders in with the MVC web project and in Umbraco, create one root node called "c" and just create everything under that. You'd probably also want to update your web.config to tell umbraco to ignor the other URLs (not sure how you could do this dynamically), but could work.
That is correct yes, so your structure would probably be:
Content - Home - c - Page1 - Page 2
Effectivley, they are sat on top of each other, but both answer to different URLs.
Thinking about it, you'd also have to merge the web.config files together.
One thing to note is that Umbraco does have requirements on the folder structure, so any master page you wan't to use as a template must be in the MasterPages folder, but I can't see it being a problem, if those master pages used a master page outside of this folder.
Why would I have to merge the web config file. I am slightly worried that there would be a conflict as the MVC application could interpret settings meant for Umbraco and vice versa.
Is it because of inheritance, the MVC application will pick up the web config file anyway ?
You'd need to merge the web.configs because both apps are effetivley running from the root of the site (just answering to different URLs), so, like they say in Highlander, there can be only one =)
I have used umbraco before but it was just to do a simple static website. Could you recommend any template websites I could install which are more rich e.g. use .net user controls. Just to let me see what is possible. Also I have to implement shared content modules which will be used through out the website...I am aware of the content picker ...probably got the name wrong, where I can pick data from a repository
Setting up and running umbraco under a specified path
Hi, I have been asked to develop an instance of umbraco under a specific path.
My company has a main website developed with the MVC framework and only a certain area of the website will be controlled by Umbraco
In the MVC application it will be specified in the global.asax
routes.IgnoreRoute("c/*");
This will tell the MVC application to ignore c/ as this will be controlled by umbraco. I have umbraco installed as a default website under IIS7. So it currently is
http://localhost/getting-started.aspx
But in order for it to work with the mvc application I need to turn it to
http://www.local.test.com/c/getting-started.aspx
I hope this makes sense and I appreciate any assistance :o)
BTW I am using Umbraco 4.5 and running windows 7/ IIS 7
Are you running Umbraco in a virtual directory? That's what we did in the hybrid application I worked on and I don't think we had to set up a route for Umbraco at all.
Hi Laura,
I belive in 4.5.x it should be possible to install Umbraco in a virtual directory, so you should just need to setup /c/ as a virtual directory in IIS and install it there.
Give if a go, and if you have any dificuilties, by all means post any issues you are having.
Matt
Thank you Matt for your response.
Is there a step by step guide for doing this.
I am not use to windows 7 or IIS 7. I have already had to install umbraco 5 times already :o(
Hi Laura,
You might want to check this page on the iis.net website for a little bit of background
http://learn.iis.net/page.aspx/150/understanding-sites-applications-and-virtual-directories-on-iis-7/
Then maybe something like this for a guide to setting one up
http://technet.microsoft.com/en-us/library/cc771804(WS.10).aspx
Many thanks
Matt
I was about to start jumping for joy!
But I have been informed that virtual directories will not work.
The problem with setting up a virtual directory for umbraco is the the mvc application will not be able to share the master pages. When setting up the virtual directory it will be like having another application
Is there another way that is feasible?
Hi Laura,
It might be possible to merge the Umbraco folders in with the MVC web project and in Umbraco, create one root node called "c" and just create everything under that. You'd probably also want to update your web.config to tell umbraco to ignor the other URLs (not sure how you could do this dynamically), but could work.
Matt
Ok let me get this straight Matt
Sorry if I am stating the obvious
So I can install umbraco and include that folder within the MVC project?
I imagine I would have to include some code in the web config file in both umbraco folders to ignore the MVC page?
When you say create one root node called c .... is that within the content section of umbraco ?
Many thanks
Laura
Hi Laura,
That is correct yes, so your structure would probably be:
Content
- Home
- c
- Page1
- Page 2
Effectivley, they are sat on top of each other, but both answer to different URLs.
Thinking about it, you'd also have to merge the web.config files together.
One thing to note is that Umbraco does have requirements on the folder structure, so any master page you wan't to use as a template must be in the MasterPages folder, but I can't see it being a problem, if those master pages used a master page outside of this folder.
Hope this helps to clarify a bit more.
Matt
Thank you Matt
Why would I have to merge the web config file. I am slightly worried that there would be a conflict as the MVC application could interpret settings meant for Umbraco and vice versa.
Is it because of inheritance, the MVC application will pick up the web config file anyway ?
Hi Laura,
You'd need to merge the web.configs because both apps are effetivley running from the root of the site (just answering to different URLs), so, like they say in Highlander, there can be only one =)
Matt
Matt
As you seem like a seasoned umbraco pro :o)
I have used umbraco before but it was just to do a simple static website. Could you recommend any template websites I could install which are more rich e.g. use .net user controls. Just to let me see what is possible. Also I have to implement shared content modules which will be used through out the website...I am aware of the content picker ...probably got the name wrong, where I can pick data from a repository
Many thanks again
Laura
Hi Laura,
There are a number of excellent start kit packages available in the package respository here:
http://our.umbraco.org/projects/starter-kits
One of the best being Warren Buckleys Creative Website Starter kit
http://our.umbraco.org/projects/starter-kits/creative-website-starter-(cws)
If you look through these, you won't go far wrong, and if you have any problems, by all means ask.
Many thanks
Matt
is working on a reply...