Quantcast
Channel: Application Initialization Module
Viewing all 109 articles
Browse latest View live

ISS long load even with App Initialization

$
0
0

I have a little app on my IIS 8 server.

I takes from 10 to 15 seconds to start.

I read the Faq and install Application Initialization plugin and configured applicationHost file.

Below You can find my code:

<applicationPools><add name="DefaultAppPool" /><add name=".NET v4.5 Classic" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" /><add name=".NET v4.5" managedRuntimeVersion="v4.0" /><add name="magazyn" autoStart="true" startMode="AlwaysRunning"><processModel identityType="LocalSystem" /></add><applicationPoolDefaults managedRuntimeVersion="v4.0"><processModel identityType="ApplicationPoolIdentity" /></applicationPoolDefaults></applicationPools><site name="magazyn" id="2" serverAutoStart="true"><application path="/" applicationPool="magazyn" preloadEnabled="true"><virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" /></application><bindings><binding protocol="http" bindingInformation="*:80:" /></bindings></site>

But even with this addings page loads very slow instead of being preloaded. 

And even AlwaysOne tag page after some time It need to load again while trying to change page.

What should I do to fix it?


Application Initialization for WCF Srvice runs in own AppDomain

$
0
0

We have an application consisting of several WCF services hosted in IIS (7.5 with Application initialization installed). In the background Entity Framework is used for ORM and data access. In order to circumvent the slow startup of EF we are using Application Initialization. For that purpoase we have setup an additional WCF service that is invoked by Application Initialization and that does the EF init.

However, we saw that the call to the init service occurs in an app domain different from the one later used by the application when clients call in. This results into all EF init not coming into effect at all. Any clue on that? How can we make sure that the WCF service we use for app init runs in the same app domain as the services that comprise the actual app. Note: The init service as well as all the others reside in the same site/web app and application pool within ISS.

Additional remarks:

- Since we could not figure out how to call a defined method on the init service we created we put all the warmup lofic into the service constructor. The URL we are pointing to is something like 

<add initializationPage="/ApplicationWarmup/ApplicationWarmupService.svc" />

Is there way of triggering a particular method on the SVC?

- Application init only works if we label the init service with 

 [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]

Maybe that has something to do with our problem. However, as soon as we set the node to "PerCall" as we do for the application services no warmup gets executed at all.

Any help would ne highly appreciated.

Warm-up pages that require authentication

$
0
0

I've been testing the Application Initialization Module in IIS8 to see if it'll work for us.  Nearly all our pages require authentication. It appears Application Initialization doesn't support cookies. Are there any tips to getting Application Initialization working with pages that require authentication?

Using Application Initialization for warming up WCF service

$
0
0

Hi,

We are currently using AppFabric Auto-Start feature for warming up applications that contain WCF web services.

Since this is the only AppFabric feature we are using and we are upgrading to IIS  8.0, we would like to use the Application Initialization instead.

1) Would be happy to know if there are any known differences between these solutions.

2) I was able to set up initialization for the example project: http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-application-initialization. But when I set the same settings for my WCF service there is no warmup. I think this is because the warmup is done by issuing a request tohttp://localhost/MyService/ and this doesn't actually reach the service. I need the warmup request to be done tohttp://localhost/MyService/Service.svc - is there a way to configure this?

Thanks.

How to setup Application Initialization for WCF service

$
0
0

I installed App Init on my Win 7/IIS 7.5. I got the sample application provided by the official IIS 8 App Init site to work. However, this sample application uses static content in combination with ASPX based warmup. The application I am working on is purely WCF consisting of a whole bunch of WCF services. As I got the demo app up and running in the same app pool I think the app pool config (applicationHost.config) is correct.

What I want is to invoke one of my WCF services and make it execute the required warmup logic. As far as I earned from other posts it must be the .SVC file that I have to specify as my warmup URL. Hence my web.config looks like this:

    <applicationInitialization skipManagedModules="true" >      <add initializationPage="/ApplicationWarmup/ApplicationWarmupService.svc" />    </applicationInitialization>   

I think the URL is generally recornized as valid as when I change it to something that does not exist I get an error issued by IIS in my windows event log. But when I put the URL like shown above simply nothing happens (no warmup gets executed). I added trace code to the constructor if the service code behind class as well as to all of its method but nothing gets ever logged.

I am also wondering where exactly to put my warmup logic. As the URL is pointing to the .SVC file I am not sure what method gets called by App Init. Or is there a way of extending the URL nominating a method to be called?

Maybe someone can shed some light on this.

Thanks in advance.

Why does IIS Express Restart my App Pool in MVC Application

$
0
0

I have a fairly complex MVC Application which must initialize when the Application starts. I am trying to diagnose why the App pool is restarting after the first MVC page is rendered. To diagnose this issue, I put break points on Application_Start and Application_End. Applicaiton_Start is called as expected. At the end of the first returned HTML/Razor page from my application, Application_End is called. On the next page request, Application_Start get called again, and then seems to run as expected without restarting.

I thought this was caused by Razor compiling the views at runtime, which would then updating the BIN foldee.  I know that IIS and IIS Express restart the APP pool when the BIN folder is updated, so I assumed this MVC Razor compllation was causing the IIS process to restart the app pool. To mitigate this, I followed the instructions here: https://chrismckee.co.uk/asp-net-mvc-compiled-views/ to pre-compile my Razor views. I know that the vies are now pre-compiled, as this did locate several compile issues [compile errors] that would not have been found until runtime without these configuration changes resulting in the pre-complication of the Razor views.

So the question is this:

1) How Can I diagnose why the app pool is restarting?

2) Does anyone know why this happens in and MVC application running in IISExpress?

   [... and obviously, how to prevent it from happening]

Thanks

jloper

deployment of app initialization

$
0
0

Hi,

Is it possible (technically & legally) to deploy warmup.dll as part of a product deployment MSI?

In technical terms, I refer to adding warmup.dll to system32\inetsrv and using appcmd to install it automatically during automated product installation (WIX customcommands).

Thanks

MK

Application Initialization Warmup period

$
0
0

Hello there,

 

We have two IIS 7.5 web applications with below settings (2 different app pools),

1. Application 1 - Idletimeout = 0

2. Application 2 - Idletimeout = 20 (default value) - Application Initialization configured for this site.

Question 1

When we analyzed the performance of the both the sites, Application 1 is responding faster than Application 2 (After the new worker process generated due to idleness)

Question 2

For application 2, the new worker process gets generated after few minutes when the site is idle. What does this few minutes/ warm up period refer to? Where it can be configured?

Question 3

Assume like I have configured 'Application Initialization' for Application 1 as well (along with Idletimeout = 0)

Now if I recycle the app pool manually and assume no requests have reached the server yet, then will the Application Initialization sends the request after the warm up period?

 

 

Thanks,

V.Vetrivelmurugan


WarmUp Module installation broke IIS

$
0
0

HI,

We are in the progress of installing the "Application Initialization" module on our Win2008 r2 standard server and on one of them as soon as we active the application pool startmode the application pools automatically crashes. Since I can't find anything on the internet I was wondering if anyone in here ever had this problem. The only way to make my iis server work again is to uninstall the module.. repairing it didn't do anything neither.

Event viewer logs :

1) A process serving application pool 'XXXXXX' terminated unexpectedly. The process id was '4060'. The process exit code was '0xc0000005'.

2) Application pool 'XXXXXX' is being automatically disabled due to a series of failures in the process(es) serving that application pool.

3) 

Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: MSVCR80.dll, version: 8.0.50727.6195, time stamp: 0x4dcdd833
Exception code: 0xc0000005
Fault offset: 0x000000000002f6c0
Faulting process id: 0xfdc
Faulting application start time: 0x01cff9b84b6dc2ba
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\WinSxS\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_88e41e092fab0294\MSVCR80.dll
Report Id: 8bbc3f46-65ab-11e4-8b5e-0050568a33e5

doAppInitAfterRestart and initializationPage not working on IIS 8.5

$
0
0

I'm use asp.net mvc6 on IIS 8.5, set the app pool to Always running. set the website to auto preload = true already.

but only when the IIS recycle , it will fired the Application_Start() on global.asax.

but when I start, restart website or modify web.config. it not fired Application_Start() on global.asax. 

even I set the initializationPage and doAppInitAfterRestart=true.  it newer send fake request when start, restart, or modify web.config.

<applicationInitialization doAppInitAfterRestart="true">
<add initializationPage="/a=initial_auto" />
</applicationInitialization>

I really don't understand. Why we should wait the user send first request?  You guys all know, the IIS first request will take very very long time.  Why we just don't let it auto send a request , then user access more fast after that.

I just want to it firing the Application_Start() on global.asax.  because I can add some fake request myself. I even don't need IIS send fake request.   I just want to website no matter start , restart, or modify web.config. or rebuild, recycle . it always can firing Application_Start().

Why the Microsoft don't do that? wake up Microsoft.

No request to initialization page issued on app pool recycle.

$
0
0

I have created a simple web application hosted under the Default Web Site. Please see the global and local setting below.   

 

If I understand correctly the way the Application Initialization Module works, I am expecting IIS to issue a request to appinit.aspx (https://machinename/alwaysrunning/appinit.aspx) to initialize the application. This is however never happening.

Any ideas?

What is the purpose of the attribute initializationPage?

Any help with this would be greatly appreciated.

 

EDIT: I found out that when I disable the Require SSL option the module issues a request to appinit.aspx as expected.  Now a simplified question: Does Application Initialization Module support SSL at all?

Thanks!

Zen

  

Global settings in the applicationHost.config file:

<add name="appinit" autoStart="true" startMode="AlwaysRunning">
                <recycling logEventOnRecycle="Time, Requests, Schedule, Memory, IsapiUnhealthy, OnDemand, ConfigChange, PrivateMemory">
                    <periodicRestart requests="0" time="00:05:00">
                        <schedule>
                            <clear />
                        </schedule>
                    </periodicRestart>
                </recycling>
                <processModel identityType="NetworkService" idleTimeout="00:00:00" />
</add>

 <application path="/alwaysrunning" preloadEnabled="true" applicationPool="appinit">
                    <virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\alwaysrunnig" />
</application>

Local settings in application's web.config file:

<applicationInitialization remapManagedRequestsTo="splashscreen.htm" skipManagedModules="true" >
                    <add initializationPage="/appinit.aspx" />
</applicationInitialization> 

How To: Using Application Initialization for Multi-Server Environment with IIS 7.5

$
0
0

Hello Forum,

I have a meduim SharePoint 2013 environment (2 Application Servers & 4 Web Front-End Servers) which all are running on Windows Server 2008 R2 and IIS 7.5

I have been doing some research to optmize the performance of my SharePoint sites, and I come accross this interesting article: http://blog.concentra.co.uk/2013/04/23/iis-application-initialisation-sharepoint-2013/

Which explains the benefits of using Application Initialization.

I think, I would like to use it. Nevertheless, I am using IIS 7.5 which means I guess I have to download Application Initialization Module for IIS 7.5 from:http://www.iis.net/downloads/microsoft/application-initialization

My questions are:

1) Should I download and install the Application Initialization Module for IIS 7.5 on ALL my 6 servers ? Or, Just one? Or, How?

2) Any experiences to share about using it for SharePoint environment? Does it really help significantly?

I would greatly appreciate your inputs !

How To: Using Application Initialization for Multi-Server Environment with IIS 7.5

$
0
0

Hello Forum,

I have a meduim SharePoint 2013 environment (2 Application Servers & 4 Web Front-End Servers) which all are running on Windows Server 2008 R2 and IIS 7.5

I have been doing some research to optmize the performance of my SharePoint sites, and I come accross this interesting article: http://blog.concentra.co.uk/2013/04/23/iis-application-initialisation-sharepoint-2013/

Which explains the benefits of using Application Initialization.

I think, I would like to use it. Nevertheless, I am using IIS 7.5 which means I guess I have to download Application Initialization Module for IIS 7.5 from: http://www.iis.net/downloads/microsoft/application-initialization

My questions are:

1) Should I download and install the Application Initialization Module for IIS 7.5 on ALL my 6 servers ? Or, Just one? Or, How?

2) Any experiences to share about using it for SharePoint environment? Does it really help significantly?

I would greatly appreciate your inputs !

Is Application Initialization not support .net 4.5.1 ?

$
0
0

exactly same config setting.  but my .net 4.5 website will initial (firing application_start() method) when IIS recylce.

but another website .net 4.5.1 mvc5 + ef 6  can't .... I don't understand why. I already check it a lot of time.

Is that a BUG?

I'm use windows server 2012 r2 + IIS8.5

Application Initialization isn't working

$
0
0

I have been trying to solve this problem for a while. I can't get this feature to work correctly.

SSL is not set on this site. There are bindings to both the SSL and the regular port.  I have a log that records when the Application_Start() method has finished. I don't see the site being hit.

The pool is configure to always run, and the site has the Preload Enabled set to True. The first option in the Default Page is set to the initializing Page.

I am running IIS 8.5.

This is the one configuration line that I have   <applicationInitialization >
      <add initializationPage="Accounts/Start" />
    </applicationInitialization>


IIS 7.5 Application Initialization Module not working

$
0
0

Hi all,

I have tried to install this module on IIS 7.5, on Windows 7 x64

When I restart application pool, It start itself, and I can see the static page that I have set in my web config's app

However  I don't understand why my web site don't turn on; if I navigate to my url, application turn on and I must wait the first compilation

How can I set Application Initialization to startup also the web site?

Thanks in advance

Jack

Change HTTP Status Code

$
0
0

Everything is setup and the first time we hit the site the startup.html is shown as defined.

<applicationInitialization
    remapManagedRequestsTo="/startup.html"
    skipManagedModules="true" ><add initializationPage="/" /></applicationInitialization>

The problem is, the startup.html page is returned with HTTP status code 200 and will be cached by the browers of our clients.

Surely the response code should be:

503 - the server is temporarily unavailable

Is there any way to change the response code of the static HTML page?

Maybe by using a outbound rewrite rule?

IIS Application Initialization starting randomly or multiple times

$
0
0

We have setup Application Initialization on IIS 8 in order to warmup our WCF application hosted on IIS:

  • We setup exactly one single URL to be called for the warmup.
  • We configured the recycling settings of the app pool so that the initialization is schedulted one per day at 2AM (no initiatluation on number of requests, memory usage etc.)
  • The idlke timeout of the app pool is set to 0 so that it won't shut down die to inactivity.
  • We activated all logging on app pool recycle reasons so that an event is written to the event log telling us when and why the app pol got recyled. The logging generally works fine (we see event being created).
  • We have logging code in placve in out initialization routine that logs an event when the init is started and when it completed and what the app domain was it warmed up.

However, wich all the above in plave we encounter the following problems that cause us severe headaches:

  1. The application initialization is started ramdomly throughout the day from time to time (once or twice a day). At those times neither has an admin receycled the app pool manually nor was it the time we deliberately scheduled the recycle (which is at 2AM as mentioned above). Whenever this happens no entry is writen to the event log despite all logging activated. Hence we have absolutely no clue what causes us thise unexpected inits.
  2. When the nightly scheduled app init occurs sometimed the warmup logic is started 2 or even 3 times in parallel at the same time.

Can anyone shed some light on this and help us out. I´f we cannot get the app init up and running in a controlled way it won't be of any use for us. We defenitely have to prevent it from kicking in randomly duriung the day when users are using our app.

WebAPI

$
0
0

So is there any way to get application initialization to work with a WebAPI service?

I'm about to just create a scheduled task that goes through a list of requests to keep them active.  That seems like the only reliable way to accomplish this from what I've seen so far.

Warm up for WCF Services

$
0
0

Hi,

I have installed the Application Initialization module in my IIS 7.5 following the diverse tutorials around the internet (step by step). In my case, all my application pools have the startMode = "AlwaysRunning" and also I have the preLoaded = "true" in the different applications hosted in IIS. I can see the w3wp.exe processes running for each of my application pools but no magic happens, I still have the slow first call, am I doing something wrong? Important fact: I'm only trying to warm up WCF services, not web sites. Actually, I have one RESTFUL WCF service which works quite different from normal WCF services. I'm currently using a process calling each service periodically (every 10 minutes) but this should be a short-term workaround not a definitive solution. Has someone experienced a similar issue? Thanks in advance.

Regards,

César Campos

Viewing all 109 articles
Browse latest View live