Why is Railo in conjunction with IIS performing slowly? - iis-7

I have ColdFusion installed in my machine.
Just now I have downloaded and installed Railo.
I have stopped the ColdFusion application server.
I have created a simple app and mapped with IIS.
Railo is taking huge amount of time to run a single .cfm file.
So can anyone please suggest how Railo With IIS should be configured so that it will run faster?
It works fine with Tomcat, but I want to use it with IIS.

IIS is trying to connect to ColdFusion before Railo
, but as you've stopped the CF service it's just waiting for the timeout.
You should remove/disable the ColdFusion connector.

The Handler Mappings can be defined at different levels in IIS; server level or website(s) level. If they are defined at the server level then each website will inherit those properties and chances are your Railo website has them too.
If they are defined at the server level you should be able to remove them under your Railo's website level without affecting any other sites. But be careful to remove the correct one(s) because Railo needs to have mappings for it to work as well. See this page for what it should look like for Railo with IIS.
For the existing Handler Mappings tied to your Adobe install, click on the website for your Railo install. Double-click the Handler Mappings icon. The Adobe install creates four mappings.
cfcHandler - path is *.cfc
cfmHandler - path is *.cfm
cfmlHandler - path is *.cfml
JWildCardHandler - path is *
The Adobe ISAPI DLL assigned for the first three handlers is something like C:\JRun4\lib\wsconfig\jrun_iis6.dll (depending on your install). For the JWildCardHandler handler the executable is something like C:\JRun4\lib\wsconfig\1\jrun_iis6_wildcard.dll. Check to see how yours are assigned. The Railo installation may have overwritten some or all of these.
According to the page that I linked above Railo only creates handlers for *.cfm and *.cfc and they should point to the Railo ISAPI DLL. You should remove any of the Adobe handlers that still exist under your Railo website. I am guessing that the JWildCardHandler is the culprit here and it is trying to pass your requests to the Adobe install.
NOTE: If you remove the handlers in this way, under the Railo website, the changes will be written to the web.config file in the root of your Railo website. If you make a backup of this file before making changes then you can always revert back to what you had.

Go into the web site properties, handlers
select coldfusion handler
delete it

Related

How does /reports redirect to the SQL server reporting page

I'm working on creating a report page for an ASP.NET project, the url to that page is
'localhost/reports'
But for some reason, the SQL Server reporting page is turned on and now there is a url conflict.
So my url now redirects me to the following url:
'localhost/Reports/Pages/Folder.aspx'
It seems the behavior of '/reports' is overwritten by the SQL Report Service site. I would like to know how to turn on/off the db service(report browsing) site manually or by DDL change
You can turn of the entire reporting service in the SQL Server Configuration Manager or you can go to the Reporting Services Configuration Manager and change the Report Manager URL to point to a different location. The default is /Reports.
If you look under "Internet Information Services (IIS) Management", I usually just search for it from start menu, you will see an app pool for reporting services/SSRS with a Reports entry under it. You will probably also see an entry under Default Website. Unfortunately different versions of IIS manager will look different. If you find the "Reports" entry under the Websites/Sites entry, and right click you may have a Properties or Manage Virtual Directory option. Basically IIS handles routing requests to different web applications. So each web application that wants to handle a certain base URL must be configured here. Often times this is done without your knowledge through a deployment or install process, but for more complex setups you might modify IIS directly.
Basically you have a situation where your app and SSRS both have a path in IIS that responds to /reports/. As JodyT answered, the correct solution is to modify the Reporting Manager URL(which likely in turn modifies IIS). I wouldn't be surprised if you had to reboot or run IISReset to get this change picked up. It's hard to say sometimes, but hopefully not.
Change Configuration for SSRS.
Follow these Step:
Open Reporting Services Configuration Manager
Click on Reporting Manager URL
In virtual Directory Change Folder Name 'Reports' to 'Reports2'
Click Apply
Now Check website

How to copy iis property settings from one server to another

I just needed to copy the Default Website Property settings everytime a new test server is to be set up. It is tedious to compare and do that manually everytime and there is a chance of mistakes.
I know we can use the Web Deployment Tool to sync websites between a local and remote IIS server. But all I need is copying the iis settings and not the websites in it.
If I use the Web Deployment Tool it copies even my website files which are on the Default Web Site (No Virtual Directory).
I see you've tagged your question with IIS5. I've used the metabase import export tool before with some success, although it is targetted for IIS6 so I don't know if it would work for you. Perhaps worth looking at though:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/637e4ec0-d9ef-4115-935b-47087870e01a.mspx?mfr=true

ASP.NET gone FUBAR on a production machine

Today we tried to put an ASP.NET application I helped to develop on yet another production machine. But this time we got a very weird error.
First of all, from all the ASP.NET pages, only Login.aspx was working. The rest just show a blank screen when they should have redirected to Login.aspx. The HTTP response is 200, but no content.
Even worse - when I try to enter the address of some inexistent ASPX page, I also get HTTP 200! Or, when I enter gibberish in some existing ASPX page code (which should have been accessible without login) I also get HTTP 200.
If I enter the name of some inexistent resource (like asdasd.jpg), I get the expected 404.
The redirect to login page is written manually in Global.asax. That's because the application has to use some alternate methods of authentication as well, so I can't just use Forms Authentication. I would suspect that Global.asax is failing, if not for the working Login page.
Noteworthy facts are also that this machine is both a Domain Controller and has SharePoint installed on it. Although the website in question is listed in SharePoint's exception list.
I would check the following:
Is the application within a virtual application or its own site and not just a virtual directory?
Does the application have it's own App Pool? If it does not then is the app pool shared by apps in a different .net version.
Is the .net version of the application the correct one? 1.1 or 2.0?
Do the files in the file system have the correct permissions to be accessed via IIS?
Have you performed an IIS Reset?
Create a stand alone test.aspx page within your folder that just displays the date/time and check it works.
Make this single test.aspx page perform an exception (eg. divide by zero) and see what the outcome is.
More information required.
What Op Sys?
What mode IIS running under?
What version of .Net?
What version of SharePoint?
(Why are you using your DC as a web host?)
Does it work on the other production machines you've deployed to?
If so what is different between this machine and the working ones?
Did you deploy the same way?
Are you sure your hitting the right machine?
Are you sure your hitting the right web site?
What ISAPI components are installed globally and for the web site?
Is .aspx mapped to the ASP.Net ISAPI filter?
Do you have any HTTP Modules or HTTP Handlers configured?
Can you change the global aspx to write out some messages so you can be sure the piece of code you interested in is reaching?
Anything coming up on the IIS log or the event logs?
Addition:
What version of .Net?
By the sounds of it the .jpg request is being dealt with by IIS directly which is why you get the 404, but the .aspx request is being dealt with by something else which except for you login page, is always returning 200.
Assuming .aspx is wired correctly to .Net the the order of processing is based on ISAPI filters (high to low then global before site), then the ASP.Net ISAPI Extension (sorry I said this was a filter earlier but it's actually an extension). Then we get into the ASP.Net pipeline based on your .Net configs, and calls the HTTP Application (which includes your global.asax code), any HTTP Modules followed finally by a HTTP Handler. Your ASP.Net web forms are just fancy HTTP Handlers.
However, the request can be responded to and terminated from any point.
Since your code works on other machines though, I'm tempted to point a finger at SharePoint if it isn't installed on the working machines. Is this SharePoint 2007? That is also an ASP.Net application (I don't think 2003 was).

Re-publishing an ASP.NET Web Application While Site is Live

I am trying to get a grasp on how to handle updates to a live, functioning ASP.NET (2.0 or greater) Application while there are users on the site.
For example, suppose SO is an ASP.NET Web Application project. The project code compiles down to the single .DLL in the BIN folder. Now, there are constantly users on SO, so what would happen to users' actions/sessions if you would use the Visual Studio .NET "Publish" feature (or just FTP everything again manually) while they are using the site?
Would creating an ASP.NET Web Site, instead, alleviate any problems that may or may not exist with the scenario above? I am beginning to develop a web site as a user-driven Web Application, and I want to make sure that my inexperience with this would not potentially annoy the [potentially] many users that I [want to] have 24/7.
EDIT: Sorry, I should have put this in a more exact context. Assume that this site is being hosted by a web hosting service with monthly fees. I won't be managing the server itself, just what the web host allows as a user of their services.
I create two Web sites in IIS. One is the production Web site, and the other is a static Web site with an HttpHandler that sends all requests to a single static "We're updating" HTML page served with an HTTP 503 Service Unavailable. Typically the update Web site is turned off. When it's time to update, we stop the production Web site, start the update Web site, and now we can fiddle with the production Web site all we want without worrying about DLLs being locked or worker processes needing to be spun down.
I started doing this because
App_Offline.htm really does not work well in Web Gardens, which we use.
App_Offline.htm serves its page as 404, which is bad if you're down for a meaningful period of time.
We can start the upgraded production Web site with modified settings (only listening on localhost), where we can do a last-minute acceptance/verification that everything is working before we flip the switch, turning off the update Web site and re-enabling the production Web site.
Things this does not solve include
Any maintenance that requires a restart of the server--you still have downtime where no page is served.
Any maintenance that diddles with the .NET runtime, like upgrading to the latest service pack.
Other approaches I've seen include
Having two servers. Send all load balancing requests to one server, upgrade the other one; then rinse and repeat. Most of us don't have this luxury.
Creating multiple bin directories, like bin-1.0.0.0 and bin-1.1.0.0 and telling ASP.NET which bin directory to use in the web.config file. (One advantage of this is that reverting to a previous binary is just editing a config file. A disadvantage is that it's harder to revert resources that don't end up in your binaries, like templates and images and such.) I don't remember how this actually worked--I think the application did some late assembly loading in its Global.asax based on its own web.config section (since you touched the web.config, the app had restarted, so it was okay).
If you find a better way, let me know!
Changing to the asp.net web site model won't have any effect, as the recycle will also happen, some of changes that trigger it for sure: web.config, global.asax, app_code.
After the recycle, user will still be logged in because asp.net will just validate the syntax. That is given you use a fixed machine key, otherwise it will change on each recycle. This is something you want to do anyway as other stuff can break if the key change across requests i.e. viewstate validation, embedded resources (decryption of the url fails).
If you can put the session out of process, like in sql server, you will avoid loosing the session. If you can't, your code will have to consider that. There are plenty of scenarios where you can avoid using session, and others were you can wrap it and re-retrieve the info if the session was cleaned. This should leave you with a handful specific cases that you know can give trouble to the users, so for those you do some of the suggestions others have already made.
One solution could be to deploy your application into a load balanced environment (web farm).
When deploying a new version you would use the load balancer to redirect requests to the server you are not deploying to.
App_offline.htm is great solution for this I think.
in SO we see application currently unavailable page when a deployment begins.
I am not sure how SO handles it.. But we usually put a holding page. So what ever the user has done (adding question or answering questions) does not get updated. As soon as he updates something he will see a holding page asking him to try after sometime.
And if I am the user I usually press the back button to make sure what I entered is saved in the browser history so that I can post later.
Some site use use are in clustered environment so I take one server offline and inform the load balancer that she will not be available and once I make sure that the new version is working fine I make it live.. I do the same thing for the next server.
Do we have any other option?
It is not a technical solution, but set up a scheduled maintenance window. You can annoucement in advance giving your user base fair warning that there is a possiblity that the application will not be available during that time frame.

How can I duplicate a website's settings in IIS7?

I'm going mad trying to get an ASP.NET application running on IIS7 (Server2008).
I have one web site set up in IIS7 which works fine. I'm trying to create another one now but I only get 404s for all .aspx files. The Handling Mappers are all different from the working site's.
Is there any way I can duplicate the working site's settings so I don't have to go through 50 mappings manually.
Or is there a better way to get the correct settings?
removed dead ImageShack links
IIS7's default configurations are held in c:\windows\system32\inetsrv\config\applicationHost.config
Any changes you make on a per site/application basis are stored in the web.config for that site/application.
You should be able to simply copy the files onto the second server.
If you are merely trying to re-install the default ASP.NET mappings, the best way to do that is use
aspnet_regiis.exe
which is in the %windir%\Microsoft.NET\Framework\v___ folders (depends on which version you're trying to set -- looks like 3.5?)
Use the documentation at http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx to see whether you want to use the -i, -r, or -s option.
For IIS 5 (and 6?), Microsoft had a free download called MetaEdit. It was used for just this - backing up and restoring an IIS configuration from machine to machine. Check MS's web site to see if there is an updated version for IIS 7.

Resources