Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

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><sitename="Default Web Site"id="1"serverAutoStart="true"serviceAutoStartEnabled="true"serviceAutoStartProvider="PrewarmMyCache"><applicationpath="/">

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


Viewing all articles
Browse latest Browse all 3509

Trending Articles



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