create new portal in dnn on localhost - iis-7

Am having a play around with DotNetNuke 7, trying to get to grips with the basics. Have installed it succesfuly on my local machine following the tutorial online which instucts to create the a website in IIS called www.dnndev.me. This worked fine but am having difficulty creating a second protal.
Have tried every didffierent way I can find online or think of and still can't view the new portal in my browser. Can someone please provide a clear step by step instruction of how they create and view their additional portals.
Thanks

In DNN you can create two different types of Portals, Parent and Child.
A Parent Portal is a portal that has either its own Binding (domain) in IIS (ex: dnndev.me) or a Virtual Directory/Application in IIS (ex: dnndev.me/Portal2)
A Child Portal in DotNetNuke doesn't require IIS changes, DNN basically creates a folder (ex:dnndev.me/Child) and redirects the user around based on the portal alias.
To create a new parent portal in IIS, if working locally with IIS6 or greater, you need to add a BINDING for the portal. Using the DNNDEV.ME domain, which points to 127.0.0.1, you could create a new portal that uses a subdomain like parent.dnndev.me. To do this, in IIS add the binding for parent.dnndev.me and then when creating the Portal from the Host/Site Manage page use parent.dnndev.me as the alias/url for the portal.
The key to the whole process is adding the binding in IIS.
If you want to create an application/virtual directory, Add the application in IIS and point the application to the root of your DNN files (c:\websites\dnndev.me)

Related

MVC mobile site as subdomain in Webforms site

I have an existing webforms project, and I want to add my new MVC4 (mobile-focussed) site to it, as a subdomain. I also want it to be able to access the session variables from the webforms site. The idea is that the user logs in on the webforms site, sets a session variable and gets redirected to the mobile site (on the subdomain).
Initially I have added my MVC site to the webforms site, by making changes to the web.config, global.asax (for routing etc.), Controllers, Views and other folders at root level. This allows me to access the session variables. However because the webforms site is well-established (old) there are implications to changing the web.config (least of all re-testing). Hence the need for a subdomain.
Is it as easy as dropping my MVC site's folder into the Webforms root, so it has its own web.config, and changing the global.asax to route to it (and then creating a subdomain)? Will I still be able to access the session variables in the subdomain?
You can create a new project for the MVC mobile, configure the domain binding in IIS in something like that m.mydomain.com.
In the web.config of the two you define the same main domain:
<httpCookies domain=".mydomain.com"/>
Here start the difficoult task, you need to play attention to share the same machineKey in the two projects and probably you need to add an HttpModule depending on the selected session scenario.
Take a look on this article that can help you on some guidance.
To share the session, I implemented this from Microsoft. It is a HttpModule.
http://support.microsoft.com/kb/2527105
There was some additional work to do - I felt this article assumes you know a little about IIS. For example I had to manually add the module using IIS Manager.
I managed to get it to work in IIS7 by manually adding the Module using IIS Manager.
(Open IIS Manager -> select the application -> click modules (top right) -> add the SharedSessionModule by clicking 'Add managed module'.
Name: SharedSessionModule
Type: <namespace>.SharedSessionModule
(a dialog box said it could not find the assembly but at runtime it was fine)
Then Restart IIS.
The problem I then had was "session state is not available in this context" when serving up non-page items like images, .pdfs etc. Before I solved this, I have been asked to use my initial method (side-by-side) so I have not found how to change this BUT there are many suggestions on SO and other sites.

Difference between creating my asp.net MVC web application ,under the IIS Default web site, or create it as a new web site

I have published my asp.net MVC web application under the “Default web site” inside IIS. I actually added two versions of my web application:-
one directly under the default website and it can be accessed by typing http://servername
one under presaging path , and can be accessed by typing http://servername/prestaging
so I got confused on which approach it is recommend to add my asp.net web application, and what is the difference between adding my web application under the default web site, or creating a whole new web site ?
Thanks
This has more to do with organization within your company's IIS structure than right and wrong. If the site you built truly is the only site on the server, putting it on the Default site is not looked down upon.
But if the application is a sub application of the default site, the latter approach is the more appropriate approach if you only get to access the site from the //servername URL.
If you have a separate domain, myapp.servername.com, you can install it into the default iis site and add a binding or you could create a whole separate web site.
Has more to do with your structure than right or wrong.
Edit
To answer your comment, creating the site under the default web site will make the URL in most cases be: 'http://myservername/MyApp'. Creating your own application would require (in most cases) a separate binding address, 'http://myapp.myservername.com' It is really only affecting the URL you place in your browser and nothing else. More complicated setups are possible, but for most cases, these are your two options.

Two web applications on a single domain

A client has a business application installed on their local server, with a database of their customers. I have to implement an application (web or win) which will query the database and send mails to customers based on certain rules.
However, one of the requirements is that a mail should have a link allowing their customers to confirm or cancel certain appointments, and the problem is that my client wants to have these links having the same domain as their web site, which is already hosted somewhere else.
The way I see it, the only way to do this is for them to allow me to access their existing site, and add the necessary functionality there directly, but they are no too happy about it.
Is it possible to add a separate application to that same hosting provider, which would sit in the same domain?
Or do you have a better idea?
You could use subdomains or use a subdirectory and make it an application in IIS.
1) Subdomain
Add a new website in IIS and add binding to a subdomain. So lets say their main website is www.company.com you will add binding yourwebapplication.company.com
2) in IIS select the website, right click and choose: Add Application
The website does not have to be fysically in a subfolder, it can be anywhere as long as you have the rights set correctly.
You can use an IIS Virtual Directory for this.
Create a Virtual Directory (IIS 7)

ASP.NET webapplication deployment - with domain / server name access

I have deployed my ASP.NET web application on IIS (windows 2008 server). I have created a virtual directory (named TestApp) and all the users on local area network are accessing it with the following URL.
http://"SERVERNAME"/TestApp/Default.aspx
My client wants that, it should be accessed as following URL
http://"SERVERNAME"/Default.aspx
There is single application deployed on the server.
Could you let me know how can i implement this thing??
Instead of adding a virtual directory on the existing site, you need to add a new web site
Create a Web Site (IIS 7)
In fact, it's fairly simple.
Remove your current app, including all files and settings in IIS (i.e.: delete everything).
Run the deploy wizard again, BUT be carefull of the path that it's given to your application: by default, you should see "http://SERVERNAME/TestApp/". Remove "TestApp". The wizard will show you a warning message, just continue.
Finish the wizard as usual, and voila!
I did this 2 or 3 times yet.

Orchard CMS - Can i Copy the website contents to another site? (First Time Publish)

I've setup Orchard on cms.mysite.com
I didn't set it up on www.mysite.com, because during the stages of when i configure my site for the first time, i don't want it being seen via www.mysite.com
I'm planning to follow these steps:
Configure my site via cms.mysite.com
Create another IIS website, running ASP.NET 4 on www.mysite.com
When the site's ready, copy the website contents (file sytem) to www.mysite.com
Remove cms.mysite.com
All future changes to the site (e.g by editors/authors) will be done on the main site (www.mysite.com)
This should work right - since all the content is stored in the database?
Or am i doing this the wrong way?
Yes, that should work perfectly fine.
But remember to change the base URL setting (in Dashboard --> Settings --> General) to the new URL.
And also make sure that the IIS App Pool (under which the new app runs) user account has read/write access to App_Data folder in the Orchard root.

Resources