At work, we have multiple branches that we may be working on at any time.
Our solution so far as been to create multiple web-sites but you can only run one web-site at a time. This makes switching between branches more of a pain that in should be.
I just want to go to the URL, mapped in my hosts file, for that branch and it just work.
Our client machines are XP machines with IIS 5.1. Is there any way to make IIS 5.1 run more than one web-site simultaneously?
Yes, it is a restriction and this one website can have only 10 simultanious connections.
Buy a Windows 2003 or 2008 Small Business Edition, it is quite cost-effective in this scenario.
Are virtual directories an option for you? I run multiple versions of the same website this way.
I believe it is a restriction of IIS that you can only run more than one website on server versions of the windows OS.
Oddly enough, this is something I remember Jeff covering ages ago, but I guess it's still relevant if you're on IIS 5.1:
http://www.codinghorror.com/blog/archives/000329.html
One way you could solve this without reinstalling your computer is to create each branch in a virtual subdirectory under you current web-root. Then at the top-level website, create a default.asp(x) the reads Request.ServerVariables["SERVER-NAME"] (should be underscore) and redirects the browser to whatever virtual directory/application you want to access. That way you can create all the "virtual" domains you want in your hosts file.
With Windows XP and IIS 5.1 you cannot run moultiple web sites.
You can however run multiple ASP.NET hosts. You would probably have to write the host your self.
Something like this should get you started:
string FileLoction = "..Path to the branch..";
HttpListenerWrapper lw = (HttpListenerWrapper)ApplicationHost.CreateApplicationHost(
typeof(HttpListenerWrapper), "/", FileLocation);
string[] prefixes = new string[]
{
"http://localhost:8081/",
"http://127.0.0.1:8081/"
};
lw.Configure(prefixes, "/", FileLocation);
lw.Start();
Picking up on Biri's answer rather than choose SBS there is a specific Windows Server Web edition which is the cheapest of all, around $399 and doesn't require CALs.
Otherwise, if it's just for developer machines Vista Ultimate allows multiple IIS sites hosted simultaneously.
Related
I am in a situation where the current web server is a production environment and there is no development environment. It is running Joomla on an IIS Web Server and is an Intranet site with all of the security, IP restrictions, Certificates, and whatever else required to run an enterprise level Intranet site.
I am wondering what I can do to set up a development environment to work within (preferably using some type of version control).
I have full reign over the IIS server, and I have had a co-worker set up a VM clone of the current system to work with, however the security is making it difficult to work with and set up.
I would like to not use Visual Studio as I don't believe I have a license for it; however I can get it if need be. I would like to stick with Notepad++ if at all possible.
Thank you.
If you're wanting to literally take the site content out and be able to edit and work without any of the security restrictions of the production environment, there's a couple of ways you could do it. However, it's going to depend on what DB the system is running with.
Joomla, regardless of what web platform it is running on, is coded in PHP, so you don't have to worry about getting visual studio. You can use Notepad++ as normal.
Option 1 - IIS Clone
If you can take a SQL backup of the database, you build a from-scratch box with IIS. You'd need to add the PHP drivers to IIS to do this. Go to Microsoft's site for more info:
PHP for IIS
Option 2 - Apache Port
You can make an Apache box using WAMP to run, if you're using a Windows machine. PHP is PHP, on any platform, so it should work without modification.
The tricky bit will be the database, depending on your situation. If the database is MySQL, you can import your database backup and be good to go, after changing the config files for the Joomla site.
If the site used MSSQL, it's a little trickier. You'll need to install an MSSQL PHP plugin to get this medthod to work. There's plenty of instructions online on how to do this, it's a case of finding the right one for your implementation.
Since I have began using WebMatrix, I have developed many of my organization's web-interface, intranet sites. I am now up to four, almost five sites running all at once for users to connect to, and I am afraid that opening up that many instances of the entire WebMatrix app may result in a waste of the server's resources.
I have been scouring the Internet for a reference to how to run multiple sites with WebMatrix. I haven't exactly come up empty handed, however, I haven't found a solution I like either (even though sources suggest this is entirely possible).
Even though I do know how to run multiple sites at once with WebMatrix (simply open up another instance of WebMatrix) my first question is: Isn't this more resource intensive (for the server using iis-express) then it needs to be? Is it beneficial to turn these sites on via command line over simply opening up several instances of WebMatrix?
Last Question: I found this article here...:
http://forums.asp.net/t/1677533.aspx/1
...where Mike Brind suggests that this can be done by using command-line to browse to the correct iis-express directory (for me: C:\Program Files (x86)\IIS Express) and using the command:
iisexpress /site:EmptySite1
Where EmptySite1 is the name of the site desired to be ran.
I get this error when trying this:
Command Line switches must be preceded by a '-' or '/'...
Any clue how I can run multiple sites at once from command-line, or if I even need to?
(Sorry I am in no way a command line guru, as I'm sure you can, by now, tell)
I am running Windows Server 2008 R2, if that matters.
Thanks for any help!
Since you are running full blown Windows Server 2008, install regular IIS. It can run multiple websites all at once without having any special command lines. Since it runs as a service, IIS will automatically restart if and when the server is rebooted. The downside is that IIS is a bit more complicated to configure than IIS express.
I want to install multiple Sitecore instances to be hosted under one domain. So the root url of first instance will be http://example.com/instance-1 and so on.
The reason I want to have multiple instances is that, I want to split environments for each site. I know I can play with bindings and publish each instance on other port within same domain. I also know that I can install multiple sites under one instance. But I didn't found solution how to install instance in IIS site subdirectory.
Please if anyone was successful instaling multiple instances as child application or virtual directory, please share the knowledge.
I'm using Sitecore 6.5 and IIS 7.5
Sitecore does not support running in virtual directories.
It must run in its own website.
However, i did come up with a trick, but it is quite advanced and i don't have clear cut examples:
Setup one site that will be your main domain with sub folders (eg.
www.mydomain.com/site-a , www.mydomain.com/site-b
Setup your separate Sitecore instances as separate IIS websites
Give each site its own hostname and add it to your hosts file (so you get http://site-a, http://site-b, etc)
Install the IIS URL Rewrite feature, make sure rewriting of the HTTP_HOST server variable is allowed
Configure rewriting on your main site, so that http://www.mydomain.com/site-a/* is rewritten to http://site-a/*
Create a custom linkprovider that makes sure Sitecore links are being written using the correct domain and folder (so http://site-a/item is written as http://www.mydomain.com/site-a/item)
I'm sure this is possible as i've implemented a similar solution for a site that hosted clones if a site as 'virtual' folders.
I wonder why you have the need to host multiple Sitecore instances on the same domain. Sitecore has good solutions for multi site setup in the same instance. If the solution Ruud provided is not workable for your, check the multi site solution of Tim Ward ( https://github.com/jerrong/Sitecore-Multisite-Manager ) or the shared source module on the Sitecore Marketplace ( http://marketplace.sitecore.net/en/Modules/Multiple_Sites_Manager.aspx )
I am having non uniform results for applications running on two Windows 2003 Servers running IIS. Is there a way to quickly dump IIS configurations to a file for comparison? Are there good tools to compare two IIS servers?
Give Metabase Explorer a shot as part of the IIS 6 resource kit. You can view all the settings for multiple servers and copy/paste the results to an xls and compare there.
You could use Web Deploy (http://www.iis.net/download/WebDeploy) for that, you can point it to the server remotely (assuming you have Administrator credentials) and diff two servers to see what are the differences. You could even sync them if you wanted to so that they look the same.
We are starting with Sharepoint development with a team of three and are currently setting up our development environments. We would like to avoid installing a Server 2008 for each developer, thus a single terminal server has been setup, using Remote Windows to start a VS2008 instance on each developer's machine. Now we would like to separate developers' testing environments (i.e. a different site colletion per developer), but have realized that the assemblies would need to be installed into GAC to show properly on the site. But since there is AFAIK only one GAC, developers wouldn't be able to test their stuff independently.
Is there any way we could create separate testing environments without installing a bunch of 2008 Servers?
So you're all going to remote in an fire up Visual Studio and be compiling stuff and restarting IIS, etc?
You're going to be stamping on each other's toes.
A wiser choice nowadays is to use Hyper-V (or some other virtualisation).
We use Windows Server 2008 on our laptops, and use Hyper-V to run our dev environments. We then have a dev environment (sandbox) each, and these have VS2008, SVN, Nunit, etc.
Our code is tested against each other thanks to CruiseControl on the only shared Hyper-V.
This has been great for us... we distribute the load, we can work on the move, we don't step on each others toes and if we need to do a demo we can switch Hyper-Vs and demo from the demo Hyper-V (branched from the dev one early on so that the environments are known).
Go virtual and don't look back.
PS: I've just seen your comment about one server... just put Hyper-V on that and run 3 instances. That's also what we do ;)
I don't know about installing the server on everything, but this sounds like an ideal task for Virtual Machines rather than physical ones- where I work we using VMWare a whole lot for this kind of work and it does very well.
It's also useful to be able to roll back to a snapshot when it comes to testing installation processes and so on.
No. In addition to the GAC there are all the SharePoint files in the 12 hive, such as features and site templates. It's not worth what you save on server costs.
(Of course if you don't use the GAC, but deploy to the bin folder, and you don't touch anything in the 12 hive, you can give each developer their own web application on the same server. But this approach puts a lot of restrictions on what they can do. It's still not worth it.)
Virtual machines will work, but they can be slow to develop on. For instance, you'll need to restart the application pool for every GAC deploy - which means a pause of maybe 15-60 seconds to reload the application, (depending on the hardware). This will become annoying.
Virtual machines work better for test and production, where you don't restart the application so often.
I recommend a physical server for each developer. This will minimize the code-deploy-test cycle time, and make sure they don't have to worry about stepping on each others toes.
You are on the wrong track with Terminal Services - its just not going to give you any separation.
A lot of people do recommend developing on W003/2008 server directly, and it does simplify some things like remote debugging.
I prefer the more traditional method of using VMWare to run virtual machines. These can be running on a local or remote host. Remote debugging is a little more complex to setup but still possible.
Finally - if possible then deploy to the bin dir rather than the GAC. This will make it much easier to deploy automatically after compilation.
The contributors are right that there are lots of stumbling blocks to multi-developer single server environments.
Number one developers will be trying to attach to the same Web Application process w2ps.exe so creating separate Web Applications on different ports is a must unless you are prepared to share time debugging. How to setup a development environment for sharepoint 2013
The second problem is when you try to collaborate and use shared components/features. Having a desire to work separately is debatable, I believe that the team developers should be collaborating and sharing so combing work is desirable to ensure seamless integration into a single final solution and that no work is duplicated. The multi-developer single server environment works perfectly until you try to collaborate 'One common mistake is to have one “development server” used by all team developers. Unless team members are working on totally unrelated components and never need to do common things such as restart IIS or attach a debugger to an IIS process, this type of environment generally doesn’t work well.' http://technet.microsoft.com/en-us/magazine/dn145990.aspx We made this mistake through lack of experience and knowledge, but once you make it it's possible to work round it.
My first attempt to share features was to copy developer 1's project into developer 2's solution and add a reference to it in developer’s 2's project and add all the features to developer 2's package. Deploying this works fine for developer 2, until as I discovered if developer 1 detaches their solution from the debugger it retracts the solution based on the duplicated solution id from the farm and therefore from each developer's web application. Therefore developer 2 has the rug pulled out from underneath them. Although this is a part solution and seemed to work for a while, it took me a while to work out what was happening and what combinations of dev 1 and 2 deployments make each other’s work and not work.
So I found a better solution. Under the project properties in Visual Studio under SharePoint tab there is a combo box called 'Auto-retract after debugging'. This by default retracts the solution when the developer stops the attached debugger and pulls the features out from underneath the other developers. Unticking this box prevents the retract and leaves each developers individual solutions deployed at farm level and on reattaching to the debugger just replaces the solution with minimal fuss.
In my experience recycling the IIS application pool is so fast other developers don't even notice, but with a larger team than 2 this might become more prevalent, so perhaps someone else could add their experiences. I also guess unless the other develops try to attach at exactly the same time that the recycle is happening it'll be fine, so is a really small chance of having a cross over time, and simply detaching and reattaching will fix this if it is ever experienced.