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

IIS7.5 shared config and application warmup / initialisation

$
0
0

Hi,

How would I go about setting up IIS so that it would either be able to use the application initialisation module or accomplishing the same in with another method.

I currently have multiple webservers with NLB and shared configuration, with the config files and content replicated across the servers. I have set the Idle time-out to 0, recycle at a specific time.

When trying to install the application initialisation module, its says shared config isnt supported!

Why? Because it may not be installed on the other servers?

Anyway, how I can get this to work? Currently after a recycle or a restart, each site currently takes around 20 seconds to load. I am doing a temporary solution now, having the sites checked every few minutes (hoping it will hit all the servers after a while) to to start them up.

Any solution to this?

 


preloadEnabled crashes apppool

$
0
0

Installed Application Initialization Module for IIS 7.5.

When I turn on preloadEnabled for my site, then recycle the apppool, it immediately crashes with the following event log entry:

Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8
Faulting module name: MSVCR80.dll, version: 8.0.50727.6195, time stamp: 0x4dcddbf3
Exception code: 0xc0000005
Fault offset: 0x00014dc8
Faulting process id: 0x7d0
Faulting application start time: 0x01ce14ffb4c30ea6
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a\MSVCR80.dll
Report Id: f3843f64-80f2-11e2-9633-00155da11300

There doesn't seem to be any indication here as to what is wrong.

I've installed and run this exactly the same way on another server with no issues.

web.config does not recognize tag

$
0
0

Hi,

I'm trying to use application initialization with IIS 7.5  running on windows 7.

I was following the step-by-step instructions that Shaun Eagan posted here: http://learn.iis.net/page.aspx/1089/iis-80-application-initialization/,

and yet, it seems that nothing's really happening. The app init tag is not recognized in the web.config file of the application i use.

My local site is available and loads the first page, but there is no initialization, that supposed to be called in a different page.

Of course, I installed the 64 bit version of the app init msi, that matches my platform.

what indicators can I look for locally, to know that the module was integrated successfully into the system and the IIS?

Thanks,

 Danny

 

How to ensure that dependent Window Services are started?

$
0
0

I recently used Application Initialization Module to try to improve a website's response time, but ran into a problem related to dependent Windows Services: in the Application_Start() code, it calls an WCF service and later run an Oracle database query. But both the WCF call and the Oracle query failed: it seems that both the network and Oracle database are still in the process of initialization when the Application Initialization Module runs! Here is an exception when I call Oracle:

"OracleException ORA-1033: ORACLE initialization or shutdown in progress...."

Is it possible that Application Initialization Module would be called only AFTER the dependent window services are initialized? (e.g. the internet is ready and the database is fully initialized). Thanks!

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.

Document of how to configure Application Initialization module

$
0
0

Hi,

I've been trying to find document for how to configure Application Initialization module for a few days, and cannot find clear document.

I do find a few helpful posts, and can guess some information, but I hope I don't have to program by luck.

I found in this sample  http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-application-initialization these configurations,

<applicationInitialization
    remapManagedRequestsTo="Startup.htm"
    skipManagedModules="true" ><add initializationPage="/default.aspx" /></applicationInitialization>

The answer I'm looking for is, what are the meanings of those tags? and what is the schema of the configuration section.

For example, what does remapManagedRequestsTo mean? what does skipManagedModules mean? what does initializationPage mean?

I found some helpful info here http://blogs.msdn.com/b/amol/archive/2013/01/25/application-initialization-ui-for-iis-7-5.aspx

However, I don't want to rely on a third-party tool's document to understand a feature inside IIS. I want authorized document from IIS.

Have any one find official document explaining what is the meaning of those configuration tags?

Many thanks in advance,

/Kai

question: Is initializationPage value limited to calling localhost only?

$
0
0

Has anyone else noticed that with the App Init feature, the InitializationPage URL is only ever called on localhost? You can't change it to list any other domain or host-header. It always creates the URL ashttp://localhost plus whatever is in the initpage value.

That's just really debilitating if you need the feature to call a page in some other site within the IIS server.

For more details, see a forum thread I had opened last week with the same question above (but a slightly different subject). I realized only tonight that that there was this forum specific to the App Init feature. That forum thread is:

http://forums.iis.net/t/1197707.aspx/1?how+to+change+domain+name+used+for+Application+Initialiation+s+initializationPage+value

And this other question from another writer late last year (in this forum) seems to be reflecting the same problem, though worded differently:http://forums.iis.net/t/1193175.aspx/1?Host+Header+Web+Sites

Anyone with thoughts? I fear that no one's noticed this problem because most just have been testing/demo'ing the feature, and using localhost was good enough. Add to it the fact that some would have a hard time ever noticing what URL is generated, and it's all the more apparent to my why few have complained of this--and that perhaps many complaining "it doesn't work" are just suffering from this very problem.

Warmup not working for web application on port other than 80

$
0
0

I'm using the Application Initialization module for IIS 7.5 on a Windows 2008 Server for a web site that's mapped to port 8080. After setting up the warmup module, I was able to get it to trigger Application_Start() in Global.asax, but not any of the pages I set up as initialization pages. When I added logging in Application_BeginRequest(), it showed that the warmup module was calling the pages on localhost:80 instead of localhost:8080. I tried using Server.TransferRequest but that didn't work. Response.Redirect shouldn't work since these are dummy requests and there is no client to respond to the redirect. I was also wondering how any of this mattered at all, the web application was sent the request, as evidenced by triggerring Application_BeginRequest(), but then why didn't it proceed to render any of my pages? Logging on Application_Error() didn't show any errors on the requests to localhost:80 pages.

Does anyone have an idea on what is causing this issue and how to fix it?


not sure if app init module is working or not

$
0
0

Downloading and installed the app init module for IIS 7.5 (Windows 2008 R2).

Ran the following script on our asp.net MVC 4 web apps:

appcmd.exe set app "Default Web Site/signin2" /preloadEnabled:true

appcmd.exe set app "Default Web Site/zfp" /preloadEnabled:true

They still seem slow to load after an IIS Reset.  How can you tell if IIS init module it is configured and working properly?  Note, we are running two node Windows NLB cluster.

Warming up authroised pages

$
0
0

Hi,

I've added the authroisation module but I was wondering how it would warm up pages that require a user to be logged on.

How can I do this? 

Thanks,

Tim

App Init behaviour different between IIS Restart and Application Initialisation

$
0
0

I have implemented some warm-up code to ensure app application initialisation successfully JIT's my asmx service. This uses System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod() to iterate through all of the assemblies in the application (it also picks up all of the assembly dependencies) to ensure that the first call to the service is as fast as possible.

When I obeserve this behaviour utilising "net stop w3svc & net start w3svc" I can see (via logging) that ALL of the assemblies are JIT'ted and the first call to the service is fast as expected.

However, when the application pool is automatically recycled on its configured time schedule (03:00:00) the log shows only the directly referenced assemblies are JIT'ted, not the dependencies that also sit in the folder.

This is resulting in an unacceptable overhead on the first call to the service.

The App Init performs exactly as expected in all other respects but why does the IIS re-cycle of the Application Pool only JIT compile the directly referenced assemblies and not its dependencies?

Brian

initializationPage not working correctly IIS 7.5

$
0
0
I installed this yesterday and am fairly convinced that the initializationPage aspect is not working correctly. My Server has 6 sites that I intend to use this for. All are running in their own application pool and in in applicationHost.config are configured identically as per the example below.
<site name="mysite1.example.com" id="3"><application path="/" applicationPool="mysite1.example.com" preloadEnabled="true"><virtualDirectory path="/" physicalPath="C:\Websites\MySite1.Demo" /></application><bindings><binding protocol="http" bindingInformation="*:80:mysite1.example.com" /></bindings></site>
With the application pools set up as follows
<add name="mysite1.example.com" startMode="AlwaysRunning" managedPipelineMode="Integrated" managedRuntimeVersion="v4.0" />
On only one of these sites I have set up an initializationPage calling an MVC3 controller action in the web.config.
<applicationInitialization remapManagedRequestsTo="Startup.htm" skipManagedModules="true" ><add initializationPage="/Application/Initialise/" /></applicationInitialization>
On that site I have put logging in for the Application_Start, Application_End and Initialise code. I am finding that setting the startMode="AlwaysRunning" means that after the app pool is recycled the application starts up again but the Initialise code never gets called at this point. Instead it only gets called on the first time I make a request to the site from a web browser. Strangely I do see that on at least one of the other sites which I have **not** set anything up in the web.config for it is doing some warm up! That site (still in development) happens to have code to send an email when accessed. And I can see periodic emails come through with HTTP_USER_AGENT:IIS Application Initialization Preload. Nothing is recorded in the IIS logs for that site / user agent however so I am unsure if similar warm up is being carried out for any of the other sites. Are there known issues with running this on multiple web sites? Is there any way of configuring any logging on it so I can try and see what the problem is exactly?

Visual Studio 2012 mysteriously adding serviceAutoStartEnabled and serviceAutoStartProvider attributes

$
0
0

Hello,

I've been following the example at:

http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-application-initialization#TOC301259897

to try to get Application Initialization working on my web site that's running on my IIS 7.5/Windows 7 dev machine.

Here's what my applicationHost.config file looks like after I made some modifications in Notepad++:

 

<sites><site name="Default Web Site" id="1" serverAutoStart="true"><application path="/" preloadEnabled="true">

 

However, if I open the file in Visual Studio, it doesn't look like that, it looks like this:

        <sites>            <site name="Default Web Site" id="1" serverAutoStart="true"      serviceAutoStartEnabled="true"serviceAutoStartProvider="PrewarmMyCache" >                <application path="/">

It's putting in those serviceAutoStartEnabled and serviceAutoStartProvider attributes that aren't really there.

If I close the file in Visual studio it doesn't act as though it's modified the file.  I get the feeling that those attributes are supposed to be there, but why is Visual Studio adding them, but is pretending that it isn't?

I tried adding the serviceAutoStartEnabled and serviceAutoStartProvider attributes to the C:\Windows\System32\inetsrv\config\applicationHost.config file and when I restart my application pools via a PowerShell script I see:

Stop-WebAppPool : Filename: \\?\C:\Windows\system32\inetsrv\config\applicationHost.config
Line number: 1786
Error: Unrecognized attribute 'serviceAutoStartEnabled'
At C:\dev\9.0.x\RestartIISStuff.ps1:1 char:16
+ Stop-WebAppPool <<<<  Aprimo64 #Do this  BEFORE stopping IIS
    + CategoryInfo          : InvalidOperation: (:) [Stop-WebAppPool], COMException
    + FullyQualifiedErrorId : InvalidOperation,Microsoft.IIs.PowerShell.Provider.StopAppPoolCommand

So apparently thse two attributes that VS 2012 keeps sticking in there aren't valid.

-Lance

 

Anybody get Shaun Eagan's example to work on Win7/IIS 7.5?

$
0
0

Hello,

I'm trying to get the example at http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-application-initialization to work on my Win7/IIS 7.5 machine.  According to Shaun:The Application Initialization feature requires IIS 8.0 to be installed.  However, elsewhere I've read that it was compatible with IIS 7.5.  I was able to install the Application Initialization feature, and it shows up in Internet Information Services Manager / Web Platform Installer as Application Initialization 1.0.  I also installed URL Rewrite 2.0 and it shows up as being installed.

I didn't have a pre-existing ".NET v4.5" application pool, so I created one that targets .NET Framework v4.0.30319 and using Integrated pipeline mode.  to my applicationHost.config file I added:

             <add name=".NET v4.5" autoStart="true" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" />

and

                <application path="/appinit" applicationPool=".NET v4.5">                     <virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\appinit" />                 </application>

and

  <rewrite>
   <allowedServerVariables>
    <add name="SKIP_MANAGED_MODULES" />
   </allowedServerVariables>
  </rewrite>

In my web.config I added:

  <applicationInitialization   
   remapManagedRequestsTo="Startup.htm"    
   skipManagedModules="true" > 
   <add initializationPage="/default.aspx" />
  </applicationInitialization>

So, at this point, I believe that my site should match the example just above the "Configuring overlapped process recycling" section.

However, if I hit http://localhost/appinit/default.aspx, I get a 500.19 - Internal Server Error (Error Code: 0x8007000d).

 If I comment out the applicationInitialization stuff in my web.config like so:

<!--
  <applicationInitialization   
   remapManagedRequestsTo="Startup.htm"    
   skipManagedModules="true" > 
   <add initializationPage="/default.aspx" />
  </applicationInitialization>
-->

 

I see the http://localhost/appinit/default.aspx just fine.  I've been doing most of my .config file editing in Notepad++, however if I open the web.config in Visual Studio 2012, it complains about the <rewrite> tag, saying:

The element system.webServer has invalid child element rewrite. List of possible elements expected: asp, caching, cgi, defaultDocument, directoryBrowse, globalModules, handlers, httpCompression, webSocket, httpErrors, httpLogging, httpProtocol, httpRedirect, httpTracing, isapiFilters, modules, applicationlnitialization, odbcLogging, security, serverRuntime,, serverSidelnclude, staticContent,, tracing, uriCompression, validation, management.

Oddly, if I uncomment out the <applicationInitialization> stuff it doesn't complain about that, although that's causing my website to throw the 500.19 that I wrote about above.

I looked in my C:\Windows\System32\inetsrv\config\schema directory and I see both appwarmup_schema.xml and rewrite_schema.xml.

 -Lance

Performance Hit DURING warm-up

$
0
0

I have set up Application Initialization and it appears to be working as expected however, DURING the warm-up I am observing increased response times.  Once the new process takes over response times drop.  This indicates that I have all the correct URLs in my web.config but that the server, .Net or IIS cannot handle the load.  The hardware is a new HP G8 server with 12GB memory running 2008 R2.  One point to note is that we are running a .Net 2.0 classic app pool (possible issue?).  Are there any logs, perfmons or other metrics to look at that would point me to the bottleneck?  Is anyone else seeing this?


How can I configure the fake startup request for a WCF service so that it will be sent to an HTTPS address (and tcp port)?

$
0
0

Hi, I've got a WCF service I want heated up when the app pool starts.

I think I've got the applicationHost.config pieces correct since I see that a 'fake' request is sent.  However, I need it sent to anhttps address. (with a port number).

I've got a website that is bound to the root and a port number.  Also it is only served over https.  The particular service I'm trying to start is calledsvg.svc

What I'd like to do is this:  (or something similar)

<applicationInitialization><add initializationPage="https://localhost:20020/svg.svc" /></applicationInitialization>

Or perhaps if there were attributes for tcpport and scheme I could set those.

However, if I try this, I just get a request sent where it doesn't help.  (And doesn't fire up my service)

EventLog

Application Initialization Module Configuration question

$
0
0

Why there were not any resource in msdn library about the configuration. 

my web.conf:

<system.webServer>
      <applicationInitialization remapManagedRequestsTo="/WarmupPage/iisstart.htm" skipManagedModules="true">
              <add initializationPage="/ChatRoom.aspx"/>
      </applicationInitialization>
</system.webServer>

what's the use of skipManagedModules   doAppInitAfterRestart  and their default value .

what's the use of hostName in <add initializationPage> 

After I insert these configuration, shoud I restart the web site or web server to apply  (in the iis manager to restart the iis on the server level?).

Using the WebAnalytics Module?

$
0
0

Hi, I've beaten my head over this issue on several occaisions for the last month.  I was very interested to see the WebAnalytics module that automatically inserts the Google Analytics code in each one of your webpages automatically.  I read through the tutorial on how it is to be set up and it's now gotten to be like a cubersome wild hunch process in attempting to do my config files appropriately.  I originally though that the module was native b/c it utilizes a .dll extension. So I was then adding the module name to the <global modules> and <modules> section of my applicationhost.config file.  Then I began thinking that it was a managed module so I've been tyring to add it to the administration.config file under the <module_providers> and <module> sections.  In addition I've tried inputted the <modules> <add name="WebAnalytics" type="........">. Just about every time that I tweak something in the config file to install the module, it brings my webpages offline.  Does anyone here have good familiarity with this module?  Here is the article on set up which I've read through and reitterated steps for several time.s http://www.iis.net/learn/develop/runtime-extensibility/sample-web-analytics-tracking-module

Thank you.

Initializing an asp.net hosted service

$
0
0

I’m currently self-hosting (WebApi) a singleton BLL that holds onto a significant amount of in-memory state inside a Windows Service. I'm thinking of moving it to IIS so I can use overlapping app-pools to swap the BLL code without inquiring downtime (the BLL state is read-only so I don’t mind tossing it away and reloading). I read about IIS 8.0 Application Initialization which seems to help address the problem.

Is there some timeout on the application start routine to be aware of? What is the idea behind multiple init "Urls" (plural) in a new process?

http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-application-initialization
“When IIS detects that an active worker process is being recycled, IIS does not switch active traffic over to the new recycled worker process until the new worker process finishes running all application initialization Urls in the new process.”

Thanks!

-Itai

Auto Start with WCF service

$
0
0

Hi,

I've google'd the hell out of this, but am at a loss.

I use a very customised WCF service with it's own ServiceHostFactory, bindings and behaviours. I am also implementing a DiscoveryProxy to which a service announces that it's online to. So I need something to activate the service before it can be served through the proxy. I looked around and found AppFabric, which I installed and all looks fine with autostarting. That's when I saw the IIS 7.5/8 initialisation module extension and so I'd prefer to switch to this if possible. 

Now I've followed a very succinct article on how to do this, but I cannot get it to work for the life of me! My service is running, but nothing is auto warming it up. I see nothing in the logs I write, in Event Viewer or in my proxy. I've installed it in IIS 7.5 on my machine to test.

Can anyone suggest anything or does this extension just not do what AppFabric can?

Thanks

Viewing all 109 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>