Deploying DotNetNuke and separate ASP.NET Application together - Possible Issues? - asp.net

I am making this in a proactive attempt to head off any potential problems which could arise from this. The situation is that we are developing an ASP.NET application for a client which will handle the online ordering from their customers. This application is going to be using the same database that their current WinForms application uses (no real issue here).
At the same time we are developing a new front-end website for them using DotNetNuke. The DotNetNuke app will simply be linking to the ASP.NET application for the customers to submit their orders (no need for them to communicate back and forth, etc.)
The plan is to host both applications on the same box at the client location. What I am looking for are potential problems or setup tips which would prevent possible conflict between the two apps (web.config conflicts, etc.) Is there a problem with having both hosted on the same location, how should IIS be set up, etc.?
If there are any external resources also available which could address this, please feel free to link them as well.

Option 1: Make all the apps separate virtual directories off of the root website. Then have the root document redirect you to the proper subdirectory for the default application for that website(DNN).
Option 2: (DotNetNuke in root, other site in subdirectory) There will be many issues with web.config inheritance if the new application is not built with DotNetNuke, but you can get around these by blocking inheritance of the root web.config. Basically you add the following to your root web.config(DNN) file.
<location path="." inheritInChildApplications="false">
<system.web></system.web>
</location>
Option 3: As Scott said, create seperate sites with differnt subdomains and link them together. You can setup a redirect so whatever.com/order sends a user to order.whatever.com.

Just an FYI, if you use
inheritInChildApplications in DNN 4.7-4.9.2 (haven't verified 5.0) you will run into ScriptManager errors, previous versions of DNN don't have the problem.

We host a DNN site for our corporate site on the same Windows 2003 server with a bunch of other sites (.NET 2.0, SugarCRM, and even some WordPress instances with PHP extensions in IIS). These sites are 'separate' websites, and not subwebs of the default site. It's a real melting pot, and it works well. We did create some separate app pools for the PHP, .NET 2.0, and .NET 3.0/5 sites to ensure that they did not foul each other.

Related

Is it secure to put all of your ASP.NET web apps under the same website in IIS (e.g. Default Website)? (more inside)

I am going to need to host multiple websites in IIS, but will not have separate URLs setup in DNS for each one. Because of this, I will not be able to use the Aias/CNAME functionality in IIS to redirect traffic to individual Websites in IIS.
Would it be secure enough to publish all of my web apps to the same Website in IIS?
Example: under Default Website, there is a folder for each individual web app:
-Default Website
--[folder for webapp1]
--[folder for webapp2]
--[folder for webapp3]
URLs used to access each web app:
www.mydomain.com/webapp1
www.mydomain.com/webapp2
www.mydomain.com/webapp3
Is this sort of setup secure or a good idea (best practices)? It seems like a simple solution to the problem of not having a separate domain name in DNS for every web app (website).
What do you think?
I don't see any issue with that approach, in a way it does simplify things quite a bit actually.
Sites being secure is not going to be affected by this. Of course each application would be under it's own pool, it's always a great idea to run like this.
This being said, your main website is going to run under it's own application pool and if there is a problem with it all your applications will be affected. That's the one thing I would pay extra attention to so you might want to not actually use that top level app pool for anything.

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.

Sharing web.config fies between sites

Not being a server admin I was wondering, can two ASP.NET websites on the same server sharing a common database use identical web.config files? I am developing a separately-branded companion website for a company with multiple business groups. Both sites have their own URLs but are hosted on the same server and will both communicate with the same database. Since the one site is already setup and running I was hoping I could save time and reuse the web.config in the new site. Will this cause any conflicts with the RSA key and its related cyphervalues?
Thank you in advance.
The answer is NO. Each website must have it's own web.config in the root folder (at a minimum).

About using ASP.NET security and Membership in web applications

I have 3 questions about using ASP.NET security and Membership in web applications
Do people outside localhost have any means of accessing the ASP.NET security control panel?
What is the best way to edit security? Is it by opening the website through VS2010 and editing security, or there is another way or some control panel I can use?
I can't edit security while the folder is in wwwroot, so I have to cut it into desktop, edit its security the put it back in wwwroot folder. I don't think this is an acceptable way at all, any better ideas?
The Web Site Administration Tool (WSAT) is the default means to manage a ASP.NET site out of the box. If you want a deployable solution that can be integrated into your website you should look at the MyWSAT project on CodePlex. It provides all the features of WSAT.
1: No you cannot access the WSAT tool outside of localhost and it has to be used in conjunction with VS. (Note: I have seen people trying that but somehow it isn't easy.
2: You can use modules already created by others as one mentioned by Zack. Similar one is here. Or you can use Membership/Roles API to write your own pages do this work.
3: Not sure what is going on with your wwwroot issue. May be it could be some permission issue. Are you getting any error?

How to manage IIS from web page

I have the need to add Host Headers to an existing web site in IIS. I want to be able to add this host header via a Web page, ASPX page. Also, I want to able to create a new web site from file.
Sample code?
How to do I manage security issues, what issues should I be concerned about?
How many host headers can a single web site have?
I am using the ASP.Net membership provider on the site.
Server is running IIS7 and Windows 2008 Server.
WMI is the best way to create website from your pages, I have used it and had referred http://blogs.msdn.com/ramesh_r/archive/2004/03/24/95109.aspx link.
This is really a cool link to understand/ learn WMI programming.
You can download WMI code generator from http://www.microsoft.com/downloads/details.aspx?FamilyID=2cc30a64-ea15-4661-8da4-55bbc145c30e&displaylang=en
IIS 7 Has a managed code API which should allow you to do what you need.
Take a look at the API documentation from Microsoft, here: http://msdn.microsoft.com/en-gb/library/aa347649.aspx
This blog may be useful, too.

Resources