what are all the essential things to change in IIS 7 to make the web application speedup? - asp.net

We are developed asp.net (.net 4 framework) web application and deployed in IIS 7 on Windows Server 2008.But when we host the web application on our IIS 5.1 server on my local machine ie,windowsxp machine it seems to be work faster than one deployed in the Windows Sever 2008 machine.
most probably the most number of user access the web application at the same is approximately 50 only... Do i need to change any setting in application pool on IIS7.
When deploying i have never changed any settings in IIS 7 on Windows Server 2008.I have deployed using Visual Studio 2010 support.
I don't know about the reason why it is acting like this?
So, Could you please tell me what are all the essential things do i need to change in IIS 7 and also Windows Server 2008 to speedup my web application...

Increase the worker process number in application pool such that it matches the processor cores (tetra core / penta core) in your windows-server machine so that it could make use of server effectively. But keep in mind, you have to choose SessionState other than In-Proc in your application if you increase your worker process number.

Related

Asp.net web application hosted on IIS7 is responding slow

I have 17 simple data entry applications(.net version is 3.5, designed in asp.net, coding language is c# and database is Oracle 10g) hosted under one application pool which is configured on IIS7 as .Net Framework Version = v2.0, Manged pipeline mode = Classic. My server is Windows server 2008 r2 64 bit with 32 GB ram.
Problem is one of my application started responding slowly, it was working fine before but now even pressing the tab key takes 2 to 3 seconds.
To check the problem I debugged the application in visual studio 2008 and it was working fine, then I configured the IIS7 on my PC and hosted the application from it and it was working fine( surprisingly my pc only have 4GB of ram and 32 bit windows 7 as operating system.)
I also tried DebugDiag on server to check the performance of w3wp.exe but couldn't find anything.
I also compared both the hosted applications (one from my local PC and one from server) using Firebug and fond under the .net tab that application hosted from server is taking more time, but I don't know the reason.
I also know for sure that database is not responding slow.
If someone can advice me how to check the problem that would be great,any advice would be appreciated.
Many thanks.

How to route request from one application pool to another in iis 6.0

I have got two web applications (separate virtual directories) residing in the DefaultAppPool on Windows Server 2003. My first application has got a link and when I click on it, the second application opens up.
Now I want to use different .Net framework for both web applications and for that in IIS 6.0, I will have to host them in separate app pools.
Now the question is - is it possible to host them in different app pools and keep the behavior intact so that if I click on the link in first web application, it can still open the second web application hosted in a different app pool?
Thanks in advance,
D
I think I've found the solution and it is simpler than what I actually thought.
Steps I took:
Create another app pool in IIS 6.0 on Windows Server 2003
Assign one of the web applications to this pool. So now I have two web applications in two different app pools. Currently both are having ASP.NET version as 2.0.50727
Change the ASP.NET version of one of the applications to 4.0.30319. So interesting fact to understand here is - in IIS 6, you can't set the .NET framework for an app pool. It actually assumes it from the first application in it and then applies it to all the web applications residing in this app pool
And it is done!!
It can be checked to list all the sites and which .NET versions they are configured to by using aspnet_iisreg -lk. Run this command from your .NET framework directory. For ex: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
Both the sites with different .NET framework will be listed
Hope this helps.

IIS 6.1 Server 2003 Web Apps Don't Startup on Reboot Sometimes

Occasionally when I reboot one of the servers at a client site the Web Apps running in IIS do not automatically start backup when the server is done rebooting. The IIS service starts up just fine, its set to Auto Start and there are no errors in the event log. Just none of the Web Apps are running, I have to click each one and click start. This only happens occasionally, as they usually start but its completely baffling.
Any thoughts? Its a mix of Classic ASP and ASP.NET applications. There are a total of 4 application pools running between around 8 web applications.
I have seen this happen when apps rely on a resource that is not yet available to the server, such as a network share.
Some people combat this problem by writing a Windows Service who's job is to check for such conditions and start the application.

Is it possible to run iis6 and iis7 in parallel?

We have a huge amount of webApplications running on IIS6. Because we want to run an MS MVC2 or MVC3 Webapp we have to use IIS7. Migrating these huge amount of IIS6 webapps is way to time intensive for us.
is it possible to run IIS6 and IIS7 on one machine?
Thanks!
No - it isn't possible to run IIS6 and IIS7 on the same machine.
The version of IIS for a machine is dictated by the operating system and cannot be installed standalone.
For instance, Windows XP shipped with IIS5.1, Windows 2003 shipped with IIS 6.0, Windows 2008 shipped with IIS7.0 and Windows 2008 R2 shipped with IIS7.5.
You can use IIS 7 / 7.5 but just run the application pools in the "classic" pipeline mode, which is the same as running your application in IIS6.
That way you can handle legacy applications and still be free to leverage the advantages of IIS7. Here's an article on the pipeline differences.
http://learn.iis.net/page.aspx/243/aspnet-integration-with-iis-7/
If you want them all to answer on port 80 you will have to setup some type of proxy to route calls to the correct IIS. Say you let one of them (perhaps IIS) run on port 80, then you need to setup IIS7 to run on another port and intercept calls to the IIS7-app and rewrite them to use another port.
Have you tried running your existing applications in IIS7? They might work?
no it is not possible . why because, just consider an mobile app and if update came means it will replace the older one like same it will get work.
if you need to check both in the sense , just install other version in virtual machine and we can easily see the difference between both

IIS6 | Application Pools | ASP.NET Framework

In IIS6 it's possible to have more than one ASP.NET application running in the same application pool. This is fine, except that there is nothing in IIS6 that prevents you from running multiple .NET versions in the same pool.
When you create application pools in IIS7 you must explicitly state was .NET version will be running in that pool. Running multiple .NET versions in IIS7, in the same application, is impossible.
How can I enforce such rules on my IIS6 server in order to prevent my deployment team from creating such problems?
What I do:
Step 1. Create the following application pools:
.NET 1.1 Apps
.NET 2.0 Apps
Step 2. Disable the "Default App Pool"
Now, any time a new application is configured in IIS, it will not work right away because the default app pool is disabled. This forces the person configuring the application to select an app pool that is appropriate for the .NET framework version of the app.
We tend to use one application pool per site, so that each application is isolated in its own process space. Application pool recycles will only affect a single application, and each worker process ends up with its own 4gb memory space. Badly programmed applications have no chance of affecting other applications, resulting in a highly isolated deployment model.
We've also standardized on x64 OS builds running 32bit application pools. While there is overhead using this technique since each application ppol contains a separate copy of the .Net framework, we feel that the added granularity of the application space adds stability to our deployments. You also get the ability to run each application as it's own domain identity, allowing for further memory space isolation and eliminating any need for identity impersonate in web configs.
With IIS 7, you have the ability to run each application pool as either 32 bit or 64 bit, so you can run large memory applications in 64 bit application pools. IIS 7 application pool security is also much more simplified.
I don't think you can. What I do is name my app pools in IIS 6 so that they show what .Net version they host. That way it's easy to pick the correct app pool when creating a new application.
If I remember correctly, you can also setup application pools in IIS6 (Windows 2003). Create one application pool per framework version in use.
I am not aware of any possibility to enforce the version of the .NET framework being used by an application. If you have setup an application pool to use .NET 1.1 and you have a .NET 2.0 application running in that application pool, you will get an exception in the application (yellow screen of death), since it will not find some referenced assemblies and classes.

Resources