Application Initialization does not have a UI element that you can do a quick check to see whether it is working or not. Checking applicationHost.config file to see if all the wiring is done correctly is the only way to go. but since you followed the directions
that is implied. Sometimes some custom modules installed on the machine depending on the order of execution can interfere with the execution of others. If you have any such modules you could try uninstalling them and see if that makes any difference. Finally,
are you trying to run the sample application provided (http://learn.iis.net/file.axd?i=3848) or do you have a custom application?
There are two things I would do in that situation. I would try the sample application and see if I can at least get the most simple application initialization scenario working or not. In either case, I would enable FREB and see for the failed case wheter app
init module is being invoked and the result of that operation.
<applicationInitialization> tag is not recognized either in my web.config. Can it because of the framework version? Im using 3.5 instead of 4. If so, anyone has any idea of how to set it up for 3.5? if dont, why isnt recognized?
I have the same problem - installed the x64 build of the Application Initialization module and IIS throws on initialization with the following error:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Visual Studio tells me that the web.config is not valid with the following warning:
The element 'system.webServer' has invalid child element 'applicationInitialization'. List of possible elements expected: 'asp, caching, cgi, defaultDocument, directoryBrowse, globalModules, handlers, httpCompression, httpErrors, httpLogging, httpProtocol,
httpRedirect, httpTracing, isapiFilters, modules, odbcLogging, security, serverRuntime, serverSideInclude, staticContent, tracing, urlCompression, validation, management'.
In %SystemRoot%\System32\inetsrv\config\schema there's an appwarmup_schema.xml containing the following:
Oddly enough the Configuration Editor within IIS Manager recognises that system.webServer/applicationInitialization is valid schema... Must be missing something obvious here.
OK it's recognised just fine in full IIS, but not in IIS Express. However in full IIS it doesn't seem to do anything.
I have an application with a Thread.Sleep(10000) in its Application_Start that I'm using for testing and adding the following configuration to it has no effect:
The sample app works just fine. Copying the sample application's configuration to my app doesn't work either so I'm not convinced it's a configuration problem. I can see from Request Tracing that the warmup module is running, but it doesn't seem to actually
do what it says on the tin!
Thanks,
Dean
PS. Not sure if the iis.net developers are around but the rich text box doesn't work at all in Chrome...
danhoch
2 Posts
web.config does not recognize <applicationInitialization> tag
May 21, 2012 09:12 AM|LINK
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
IIS 7.5 ApplicationInitialization
bariscaglar
8 Posts
Microsoft
Moderator
Re: web.config does not recognize <applicationInitialization> tag
May 25, 2012 09:42 PM|LINK
Hi Danny,
Application Initialization does not have a UI element that you can do a quick check to see whether it is working or not. Checking applicationHost.config file to see if all the wiring is done correctly is the only way to go. but since you followed the directions that is implied. Sometimes some custom modules installed on the machine depending on the order of execution can interfere with the execution of others. If you have any such modules you could try uninstalling them and see if that makes any difference. Finally, are you trying to run the sample application provided (http://learn.iis.net/file.axd?i=3848) or do you have a custom application?
danhoch
2 Posts
Re: web.config does not recognize <applicationInitialization> tag
May 29, 2012 09:35 AM|LINK
Thank you for your reply.
I'm not running the sample application. I'm trying to run an existing system that has WCF services to run on IIS.
The thing is that some initialization operations must run before the rest of the services start.
bariscaglar
8 Posts
Microsoft
Moderator
Re: web.config does not recognize <applicationInitialization> tag
May 29, 2012 08:52 PM|LINK
criss_iss
1 Post
Re: web.config does not recognize <applicationInitialization> tag
Jun 08, 2012 11:49 AM|LINK
hello,
<applicationInitialization> tag is not recognized either in my web.config. Can it because of the framework version? Im using 3.5 instead of 4. If so, anyone has any idea of how to set it up for 3.5? if dont, why isnt recognized?
thanks!
ahmels
5 Posts
Microsoft
Re: web.config does not recognize <applicationInitialization> tag
Jun 09, 2012 03:49 AM|LINK
the .NET version is irrelevant to how the Application Initialization tags are recognized
please make sure you have the <applicationInitialization> tag in the correct place in web.config
for example:
<system.webServer>
<applicationInitialization skipManagedModules="true" remapManagedRequestsTo="startup.asp">
<add initializationPage="default.aspx" />
</applicationInitialization>
</system.webServer>
you can also check the IIS schema folder for to make sure the appwarmup_schema.xml file is there
deanward81
4 Posts
Re: web.config does not recognize <applicationInitialization> tag
Jun 15, 2012 12:33 PM|LINK
I have the same problem - installed the x64 build of the Application Initialization module and IIS throws on initialization with the following error:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Visual Studio tells me that the web.config is not valid with the following warning:
The element 'system.webServer' has invalid child element 'applicationInitialization'. List of possible elements expected: 'asp, caching, cgi, defaultDocument, directoryBrowse, globalModules, handlers, httpCompression, httpErrors, httpLogging, httpProtocol, httpRedirect, httpTracing, isapiFilters, modules, odbcLogging, security, serverRuntime, serverSideInclude, staticContent, tracing, urlCompression, validation, management'.
In %SystemRoot%\System32\inetsrv\config\schema there's an appwarmup_schema.xml containing the following:
<configSchema>
<sectionSchema name="system.webServer/applicationInitialization">
<attribute name="remapManagedRequestsTo" type="string" defaultValue="" />
<attribute name="skipManagedModules" type="bool" defaultValue="false" />
<attribute name="doAppInitAfterRestart" type="bool" defaultValue="false" />
<collection addElement="add" clearElement="clear" removeElement="remove" mergeElement="false">
<attribute name="initializationPage" type="string" required="true" isUniqueKey="true" />
<attribute name="hostName" type="string" defaultValue="" />
</collection>
</sectionSchema>
<sectionSchema name="system.applicationHost/sites">
<collection addElement="site">
<collection addElement="application" >
<attribute name="preloadEnabled" type="bool" defaultValue="false" />
</collection>
<element name="applicationDefaults" isCollectionDefault="true">
<attribute name="preloadEnabled" type="bool" defaultValue="false" />
</element>
</collection>
</sectionSchema>
</configSchema>
It clearly doesn't recognise the schema. Any ideas what's going wrong? Thanks, Dean
deanward81
4 Posts
Re: web.config does not recognize <applicationInitialization> tag
Jun 15, 2012 12:40 PM|LINK
deanward81
4 Posts
Re: web.config does not recognize <applicationInitialization> tag
Jun 15, 2012 01:56 PM|LINK
OK it's recognised just fine in full IIS, but not in IIS Express. However in full IIS it doesn't seem to do anything.
I have an application with a Thread.Sleep(10000) in its Application_Start that I'm using for testing and adding the following configuration to it has no effect:
<system.webserver>
<applicationinitialization skipManagedModules="true" remapManagedRequestsTo="app_startup.htm"></applicationinitialization>
</system.webserver>
The sample app works just fine. Copying the sample application's configuration to my app doesn't work either so I'm not convinced it's a configuration problem. I can see from Request Tracing that the warmup module is running, but it doesn't seem to actually do what it says on the tin!
Thanks,
Dean
PS. Not sure if the iis.net developers are around but the rich text box doesn't work at all in Chrome...
ahmels
5 Posts
Microsoft
Re: web.config does not recognize <applicationInitialization> tag
Jun 15, 2012 06:00 PM|LINK
Hi Dean,
is your application using a .NET 2 app pool (.NET 2 and 3.5 applications) ?
If so you should use a rewrite rule instead of remapManagedRequestsTo="app_startup.htm" tag.
you can verify that this application is wroking by skipping the Default Document module, i.e instead of accessing your application like this
http://localhost:<port>/MyApplication/
try to access it like this
http://localhost:<port>/MyApplication/default.aspx
or whatever your default page is.
If this works for you, having a rewrite rule using URL Rewrite module will solve the problem for you