I have a presentation web farm with four load-balanced servers. I have one web application with two website domains that represent that application. Rather than constantly push to two different folder locations, I figured I can push to one location and have a virtual directory on each website point to the single folder on the webserver.
Here is the setup:
The load balancer is CoyotePoint. The web framework is asp.net 3.5. IIS 6 (slowing moving to 7).
I'm concerned about performance in a production environment. Are there any ramifications to having two websites with virtual directories pointing to the same directory on disk? Should I also be worried about application pools?
I think I found what I was looking for. It's called CentralizedWebFarmManagement for IIS. Specifically, I think the Shared-configuration, and Web Deployment Tools for Web Farm is exactly what I need!
It depends on what this application is doing. If you're doing anything at all fancy with System.IO you're going to run into issues.
There are other ways to make the pushing of files easier. I highly recommend creating a quick bat file with a few robocopy commands in it.
Related
lets say I have two ASP MVC applications.
ProjectXXX
ProjectYYY - this is fork of ProjectXXX.
Both projects have same structure (project/assembly name), but it differs on some functionality (it will be deployed for other countries).
For testing purposes we deploy both applications on one server.
ProjectXXX - has own IIS pool
ProjectYYY - has own IIS pool
Problem
When I removed some functionality from assembly of ProjectXXX and run ProjectYYY it throws TypeLoadException : Could not load type 'Project.Namespace.IMyInterface' from assembly 'Project.Namespace'
It looks like ProjectYYY uses DLL from ProjectXXX (IIS (asp.net?) loads dll once, because it "thinks" assemblies are the same?)
How to force IIS not to cache those assemblies and load the proper one for both apps?
EDIT / SOLUTION:
I have found, that my application uses MEF composition. As for now I have changed how it searches for assemblies and problem looks like gone :)
if you create separate IIS Site for each, it should do the trick, as for each site a separate w3wp process is run. Having said that, you can't share same ip and port for 2 sites so if you need that, you'll have to play around with redirecting, url rewriting on IIS.
. .
We have a growing need where web resources (files, documents, images, etc.) need to be shared between different web environments.
I'm looking into setting up symlinks to support this, but I don't know how to set it up. (Or would it be better to set up virtual directories? Part of my question is, what are current best practices to set this up?)
For example purposes, assume:
The environment is running on an IIS7 platform, and MUST be in a Windows environment.
The shared files need to be maintained using TFS.
The web sites occupy different sites on the same IIS instance and reside on the same physical server.
The sites are multple web platforms -- for example, one site is ASP.NET, while another is running classic ASP.
All sites are under the same corporate umbrella, which is why resources need to be shared.
All sites pull data from the same SQL Server database instance.
How would I set up a symlink to support this? Or, for that matter, are symlinks the best way to go about this?
Thanks in advance!
Edit: Addendum to the above example: my classic ASP environment can also include ASP.NET virtual subfolders. For example, I can have my domain www.somedomain.com running in classic ASP, but have a subdirectory (www.somedomain.com/dotnetapp) running as an ASP.NET application. The virtual directory used by the ASP.NET must be able to access the same file resources as the classic ASP environment.
On Windows virtual directories are more the standard way to do this. It also allows you to use IIS' virtual directory features and Windows/IIS rights management.
One of our clients has a Java EE application. We would like to develop a new project using ASP.NET/C# by hosting the application as a sub directory under this Java EE project.
My questions are:
Will the .NET application run smoothly?
Do I need to keep anything in mind before I make a promise to the client?
The way you strucure your projects do not affect the behavior of your applications at all.
However in the end, each of the compiled and not compiled resources need to be configured propoerly to their proper Web Server, you shouldn't have any problem at all.
IIS has its own directory and Tomcat(or whatever you are using) will have its own directory.
Just let him understand that there is no sense on sharing the projects in a single root folder if the projects are not going to be related at all.
The only way to make them interact is by means of services and queues that you can orchestrate in any of both technologies.
UPDATE
let's suppose that:
you are using default of both web servers: your IIS need your applications to be copied to c:\inetpub folder whereas tomcat uses the $CATALINA_BASE system variable to locate their own folder. That won't be a problem at all.
Now, let's suppose that your client chose the same exact folder to be the root of your websites in tomcat and iis, (very bad maintenance decision by the way)
you could also separate both environments by having two folders : JAVA and DOTNET
Now let's suppose your client won't accept any logic suggestion, and you have to merge java files and aspx files, technically there won't be any issue because each web server will handle requests for very different issues, however, if you are also using the same resources, let's say a picture used in both pages, you will have locked-files issues, your iis can only respond for its own behavior and tomcat will only respond with its own behavior.
So in summary, technically speaking it could work, performance will be hit on your hard drive, it all depends on the request loads of each app, but overall it is a bad infrastructure design.
hope it helps,
We need to deploy our asp.net web site in web farm which consists of 16 web servers. Whenever we need to roll out a new release it is very time consuming and tedious as we need to deploy it first on the DR environment (16 web servers) and then on to Live environment (16 web servers).
Currently we prepare the msi on our build server and copy it on all the front end web servers which involves first FTPing the msi to a common location on hosting network and then copying from the common location to each server.
After thet we backup the existing website and then run the installer one by one on each machine.
After installing the new version we replace the web.config file with the older one as it is encrypted and hardly contains any new thing in it as part of new release. This saves us from encrypting the web.config file again.
Could somebody please suggest a better way of doing this deployement as it is really turning out to be time consuming. Previously this model was ok for us as we had only 4 web servers but not it is no longer a sutable option.
Thanks..
Take a look at the Web Farm Framework. It will handle the replication of your application across your entire farm.
Another option is to use the "Shared Configuration" option in IIS7 as well as a DFS share to replicate all of your files and metabase configuration. This just won't handle registry changes or the GAC.
How to deploy an asp.net webApp to multiple servers?
Deploy Web Applications Using the Copy Web Tool
also check thread
What method do you use to deploy ASP.Net applications to the wild?
It depends how many servers you're talking about.
For less than about 4 or 5 servers, I just zip the application, copy to each server, unzip into a new folder, and tell IIS to look at the new folder, using IIS Manager. In a load-balanced environment, it also means taking all servers except one offline, and then updating them one at a time, and bringing them back online afterwards.
For more servers than that, I prefer to use Windows Deployment Services (WDS).