Create umbraco subdomain for an umbraco site - umbraco

I am using umbraco 7.1.3.
My requirement is to create another sub-domain in main site dynamically as per user request.For example I have implemented umbraco cms for my site "ww.xyz.com" & I am updating content through umbraco login. Now I want to create sub-domains for different clients as per their request... like : "www.xyz.com/client1", "www.xyz.com/client2" and so on...
Now all sub-domain site should have it's own umbraco framework, so client-site (sub-domain owner) can login and update their information respectively.
To achieve this requirement I implemented following steps...
First I register a umbraco website in IIS and configure it, and that worked properly.
Then I register another umbraco website in IIS and configured it, and that also worked properly.
Now to implement sub-domain logic...
I simply copied 2nd website's folder in to first website folder. Then convert that folder to application through IIS.
As per my expectation this should work, As I have already done the same in asp.net and it worked.
But with umbraco I am facing issue like "Invalid key value".
I think the issue is related to some umbraco configuration, but I am not able to figure it out.
Thanks & Regards

A bit of an open door, but since I don't see it mentioned in any of the comments and it's a bit hidden away in Umbraco 8. Have you tried setting the urls in the Cultures and Hostnames section?
Note: you get to this by going to "Content", in the content tree right click on your homepage and now you get several extra options which are normally hidden away with also the very useful Hostname and Cultures option which allows you to support multiple urls.

Related

Umbraco 7.4 URL Redirect Feature

Is there an available URL redirect for Umbraco 7.4? I mean I'm aware that there is a URL Redirect Management Tools in Umbraco 7.5 but we are using the lower version and it doesn't have that. Is there a way to achieve the same result? The scenario is this.
We created an web.com/about-us page. Now this is cached in google search now.
We then decided to change about-us to corporate now the cached version is still pointing to about-us where in fact the new URL now is web.com/corporate
How can I achieve a URL redirect? If someone manually typed or clicked on the cached url like about-us how can Umbraco 7.4 redirects it to the correct site? Would appreciate a step by step process if possible since I'm still new in Umbraco
you can use something like SEO Checker to manage this for you - there are also other plugins available that can do the redirection management.
https://our.umbraco.com/packages/website-utilities/seo-checker
As my first post has been hidden due to lack of detail, which is understandable, I am adding this new answer with more details.
We use UrlTracker for our projects - it is a nuget package that you install and then you can start using it. This can help.
The Url Tracker is used to manage URLs within umbraco and it automatically tracks URL changes, for instance when a node is renamed, this makes sure the old URL will redirect to the new location. Using this; you can also create your own redirects, based on a simple URL or using a Regex pattern. This is especially handy while migrating existing indexed URLs to your new website.
Please check this umbraco package web page for more details. Alternative links can be found below, hope this helps.
https://24days.in/umbraco-cms/2013/sharing-is-caring/
https://www.marceldigital.com/blog/2017/08/5-umbraco-seo-packages-you-need-right-now

Umbraco back office menu doesn't show up

I am trying to install Umbraco 7.5.3 on an empty project but the back office has no items in the menus. It doesn't also load anything in the content tree.
I tried to do a clean installation based on this article but it was the same.
I went with a clean web application, I even select .net 4.5.1 in a try, and in the wizard part, I went with custom installation and in DB part I've entered the SA account.
Ok, I made it work. It sounds a bit strange, but it worked! I don't know why it wasn't on the how to page. and I still don't know what could be wrong :|
I had to set up the site on IIS and then accessing it using the domain address that I created.
So if anyone has the same problem do this:
1- create a new website set the directory to your websites address
(yourdomain.com==> c:...\yourUmbraco project)
2- go to hosts file and add your domain
(C:\Windows\System32\drivers\etc\hosts)
add
127.0.0.1 yourdomain.com
3- give access to your app pool worker (or everyone in your risk :D )
4- access your backoffice using yourdomain.com/umbraco

Sub application in Umbraco

Currently I have a website built with Umbraco 4.9.
What are the options to have a sub application (pure MVC 4 preferably) running under Umbraco infrastructure?
The idea is to have a custom app with custom database and custom logic. The only integration points would be:
common user base (authentication)
access to Umbraco's dictionaries from custom app
share same session, that is if user is navigating through pages in
custom app his session should not expire for website
have custom app
under same domain (www.mysite.com for website and www.mysite.com/app
for app)
Thanks in advance
I'm not too familiar with v4.0.9, but I imagine its somewhat similar to 4.7. If that's the case, you should be fine to place your sub application inside the folder structure of your existing umrbaco instance. In IIS, you will need to convert the subfolder into an application. Within the web.config of your umbraco instance, you will need to add the path to your sub app in the umbracoReservedPaths app setting.
I'm not sure how session would here. I believe the asp.net membership should work fine. By adding references to the Umbraco dll's in your mvc project you should be able to access the Umbraco dictionaries fine.

integrating YAF.NET in my MVC3 Razor Solution

I would like to know if there is a way to integrate YAF.NET to my MVC3 Application?
I dont want YAF to be inside my page like using my masterpage or stuff like that, I just want it to be in a subfolder like /forum and if a user clicks the "forum" link he will be redirected to the forum.
In the future I also would like to use a login system for my page, so I have to think about membership provider. I know that there is a way to make YAF use your basic asp.net membership provider but will yaf work with mvc 3 in that way? Since yaf isn't a .NET 4 application I wonder how I could migrate the membership provider?
If there isn't a solution for the membership stuff, I should be able to just link from my page to YAF?
EDIT:
My solution ->
1)I added a subdomain and config both of mine domains to use an A-Record which points to the Server where IIS is running.
2)I added 2 Websites. The first one is my Main Website with my MVC3 Application and the second one is the YAF.NET Forum.
3) I edited the binding settings of both of the websites (IIS Manager -> Sites -> yoursite -> Binding) and removed the IP binding insteed i added a HTTP header. For mainsite = mydomain.com and for the forum forum.mydomain.com
For the first part, you can just install YAF in a virtual directory on your website like www.mywebsite.com/forums/ and let it run standalone there.
Create a new Virtual Directory in the folder you like. (/forums)
Set permissions, .NET settings etc accordingly and install YAF there.
For the second, what you could do is use from your MVC app, directly read YAF's database of users (wherever it is) and use it to authenticate your users.
The Latest build of YAF is on ASP.net 3.5, you could try getting the source and building it for .NET4, although this would not be necessary since you said you don't want to mash your app with it but run it side-by-side and have them interop. (There also is some UserControl feature for CMS's you might want to check that out)
On the features page it says YAF supports asp.net memberships and roles, so you shouldn't have a problem there either.

Best practices for deploying an MVC application on IIS7

I'm not a web admin, and I'm new to IIS. So, I'm looking for advice.
My MVC application (e.g. fooapp) is the default application for my site (e.g. foo.bar). I used IIS Manager to add the site to IIS7. When I import the application, IIS Manager wants to put it in it's own directory (/foo), and tells me I shouldn't put it in the base (site) directory. This means that to get to my default MVC view, I have to enter the URL http://foo.bar/fooapp/. Needless to say, I want to get there via http://foo.bar/
I see 2 possible solutions:
Add a default page to the site directory that redirects to the MVC app.
Ignore the IIS admonition and load the app into the site directory.
My IIS7 knowledge is limited. I have played around with some options (such as HTTP Redirect). Since nothing changed, I obviously don't understand what I'm doing.
Anyway, if there are some considered "best practices" and/or other suggestions, please let me know.
Tbh, I'm not sure why the IIS manager is trying to convince you to add it as a sub app.. Maybe you just didn't do it right >_>
I've got a couple servers running with IIS7/7.5 and they have apps running in the root of the website.. No problem there :)
You might want to create a new website in IIS (right click on websites, choose "Add Web Site"), point the "Physical Path" directly to the folder your website's stored in, and set the Host name to whatever host you use (foo.bar ? :) )
This should work just fine )
In terms of deployment, if you use VS2010 I'd really recomment looking at Web Deploy.. It's a new addon written for IIS7, and allows one-click publish to IIS directly from VS2010. I'm using it on my site and it works flawlessly :)
Check out Scott Hansellman's talk about it, or check it out in the IIS website

Resources