Binding an IIS website to a second ColdFusion instance - iis

I have a Windows 2008 R2 server, IIS7, Coldfusion 9.0.2. I created a 2nd CF instance, created an IIS website, used the web server configuration tool to bind the IIS website to the CF instance. Restarted IIS & CF windows services. It does not work as expected. It does not look like the IIS website is actually bound to the 2nd CF instance. With both the Windows IIS service and the new CF service running, I am able to hit the website and click around it.I then stop the CF service and the website still works. I would expect the website to not work when the CF Windows service was stopped. Any ideas as to what is going on?
Thanks ~Joe~
Here are the steps I did to create everything
CF admin > instance manager > Add New Instance with create Windows service option
create the website in IIS
remove the windows CF service
create a windows service and configure it to use a separate jvm.config file
restart IIS & CF services
use the web server configuration tool to bind the new CF instance to the new IIS website and checked off to configure web server for CF9 applications

possible reasons are
1) web config tool created a new connector but it points to wrong instance.
2) your website is using the wrong connector
3) the website is inheriting the global connector instead
every time you use the web config tool to enable cf on a site it creates a new connector. this doesn't serve much purpose if you have once instance, so for reference you are better off to just add the handlers manually and use existing connector.
for multiple instance, you only need to use the web config tool ONCE to create the new connector, then just add handlers manually to any site you want to use that connector.
this way you only have as many connectors as you have instances, so it doesn't get confusing.
first we need to check which connector your site is using, so go into iis and check the cfm wildcard handler, and see what connector it points to, it should be different than your other site.
so your first site should for example be using the conenctor in
C:\ColdFusion9\runtime\lib\wsconfig\1
and 2nd site using C:\ColdFusion9\runtime\lib\wsconfig\2
the numbers will differ according to how many times you have used web.config though.
in these connector folders open the file jrun_iis6_wildcard.ini
and look at the line
bootstrap=127.0.0.1:51011
the proxy port should be different for multiple instances.
so on the connector for instance2, it should have a different port than the connector for instance1, if not, if you have any other connectors, then check the rest as well.
If they all have the same port, then they are all pointing to the same instance.
In which case, you simply need to change the port for the conenctor that SHOULD be pointing to instance2.
Generally CF just increments the port for each instance, so if it says 51011 then change it to 51012 and it should be working.
You should also make sure instance 2 is running by connecting to it using the built in web server, if you look in your cfadmin in the instance manager, it will have a link to open the cfadmin for each instance on the native port.

Related

Options for Visual Studio web performance and load test against a remote server

I am new to Visual Studio Web Performance Testing and Load Testing. I am wondering what my options are for testing a remote server? For example, I am planning to deploy a ASP.NET site to Amazon Cloud. Configuration is 2 web front ends, 1 database server behind a load balancer. Can I run a web test/load test connecting to Amazon simply by configuring Visual Studio accordingly? Or do I have to set up a test agent on the web servers and configure that accordingly? I have tested the site locally (my development environment). Can I, instead of pointing locally, point to the url running on Amazon?
I know I can add a computer through LoadTest "Run Settings". Though, I do not think it is as simple as adding the remote server name here.
Yes, you can test against any URL that you can reach from your computer that is running Visual Studio. You simply need to parameterize the host url(s) in your webtest(s). Click the Parameterize Web Servers button in the web test editor toolbar to achieve this. Once parameterized, you can substitute different values by creating the same context parameters in your LoadTest RunSetting. LoadTest context parameters override WebTest context parameters.
Of course, you are still subject to whatever network obstacles and firewall rules that are in your way. For example, you won't be able to hook up to capture Performance Monitor data from the Amazon Cloud servers (or at least I presume that the relevant ports would be blocked).

How can I set up multiple ColdFusion test sites on my local machine using IIS?

I am currently setting up a development machine at my company and I would like to be able to set up a few local sites on this one machine for testing. In order to do so, I am running the following software:
ColdFusion Server 10 (Developer's Edition)
IIS
Everything is installed and I am able to run the default site (from localhost) but I can't figure out, nor can I find how I can set up other sites on this system. I have the files for each site on the local machine. Ideally, I would like to be able to call up each site using a subdomain, such as (http://site1.domain.com, http://site2.domain.com, http://site3.domain.com) where each one points to a separate file base on the local machine.
Can anyone point me in the right direction?
Create the sites in IIS for each site, pointing to its respective web root. Then run the web server configuration tool to hook up the connectors for the sites.
You can find that under {ColdFusion root}/cfusion/runtime/bin/wsconfig.exe (on windows - not sure of the file extension on non-windows machines)
From there you can run the connector for each individual site or you can set it to run the connector for every site.

Creating Web-Site and Web Application in IIS

Till date, I was thinking that we always create/host web-site in IIS.
But I was going through powershell tutorial today which says it is different to create web-site and a web application.
This is the tutorial link (check different section on creating web site and application) -
http://learn.iis.net/page.aspx/433/powershell-snap-in-creating-web-sites-web-applications-virtual-directories-and-application-pools/
Can please guide what is the difference between the two.
Any example will be really helpful.
Thank you!
A web site in IIS is the top level under Sites. The default one that is normally automatically created for you when installing IIS is named "Default Web Site".
This is the "root" that runs on port 80.
Under that, you can create virtual directories, which is basically sub-levels under the root web site, or you can create separate web applications that lives as separate applications under the root level.
A web application must live under a web site.
It is possible to create other web sites that can either be set up to run on other ports (i.e. 81), or to be named with a different host name which enables multiple sites to run on same port number. If named with a different host name, this name must be registered in a DNS server somewere to point to the IP address for your server. A workaround is also to to add it as an entry in the hosts file on the client computer that should access it.
This is example on how it looks in IIS Manager:
I have a script I use when creating a website and AppPool in IIS 7+, .net4, Integrated pipeline and thought you might find it useful.
Use it as so:
CreateSite.ps1 [WebsiteName] [AppPoolName] [Port] [Path]
If you are reinstalling the site, you will need to Stop it first. That is done as so:
StopSite.ps1 [WebsiteName] [AppPoolName]
you can grab the scripts from my gist
Update I have added/extended the scripts and put them in their own Github repository
Here is my CreateWebsite PowerShell script: http://www.zerrouki.com/create-website/

IIS 7.x - Alias creation restart AppDomain

We are working on IIS 7.x - we have site named www.lms.com (example). we have SAAS model based system and sell it to multiple client.
e.g. C1, C2 & C3 are client and they all have same source code but they have following URL
Client C1 has URL http://C1.lms.com
Client C2 has URL http://C2.lms.com
When we create Client in the System we create aliasing entry in the IIS Programatically through our Application. Note, we have already "*" alias entry in the IIS already done.
When we add new Alias our Application Domain Restarts (though same Application if we run on the IIS 6.0 - works without any issue or AppDomain restart).
Please suggest how to allow alias entry on IIS 7.x without restarting IIS OR AppDomain.
Any help on the same appreciated.
I've seen this before and there doesn't appear to be a way around it. I'm guessing this is because you're adding a new endpoint which the app domain needs to be hooked into at some deeper level and it only does this at App Domain initialisation time.
The work around may be to have separate sites for each SAAS site and point them all at the same web folder.
This is probably preferable because you'll have more fine grained control over each SAAS site's resources and you can stop one site without it affecting the others.

How to configure Web role on Azure Compute Emulator to work like local IIS (static URL)

So, the question is how to configure Web role on Azure Compute Emulator to work like on local IIS? By this I mean, that, the web role have the fixed url (like you can in project properties set the "Use Local IIS Web server" and set the fixed url)?
How to set Azure Compute Emulator to work on static url or at least at static port?
Is is really annoying that everytime I start the web role I have different url (port)!
The answer is that you cannot run it on a static port, but it should run on the first available port in its port range (starting at 80 and incrementing until it finds a free port). If it increments with every "debug" session starting, then it's because the previous emulator didnt teardown completely before you started a new one.
There are some ideas how to fix this issue here:
http://social.msdn.microsoft.com/Forums/en/windowsazuredevelopment/thread/ae2df7e0-5005-4bcd-8b69-bb53323eb589
Check out this solution from Michael Collier [a fellow Windows Azure MVP]

Resources