{"action":"created","issue":{"url":"https://api.github.com/repos/opscode-cookbooks/iis/issues/185","labels_url":"https://api.github.com/repos/opscode-cookbooks/iis/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/opscode-cookbooks/iis/issues/185/comments","events_url":"https://api.github.com/repos/opscode-cookbooks/iis/issues/185/events","html_url":"https://github.com/opscode-cookbooks/iis/issues/185","id":80241534,"number":185,"title":"Bug with IIS 7.0: Invalid attribute startMode for the pool","user":{"login":"olivierlemasle","id":628140,"avatar_url":"https://avatars.githubusercontent.com/u/628140?v=3","gravatar_id":"","url":"https://api.github.com/users/olivierlemasle","html_url":"https://github.com/olivierlemasle","followers_url":"https://api.github.com/users/olivierlemasle/followers","following_url":"https://api.github.com/users/olivierlemasle/following{/other_user}","gists_url":"https://api.github.com/users/olivierlemasle/gists{/gist_id}","starred_url":"https://api.github.com/users/olivierlemasle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivierlemasle/subscriptions","organizations_url":"https://api.github.com/users/olivierlemasle/orgs","repos_url":"https://api.github.com/users/olivierlemasle/repos","events_url":"https://api.github.com/users/olivierlemasle/events{/privacy}","received_events_url":"https://api.github.com/users/olivierlemasle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-24T19:07:53Z","updated_at":"2015-05-26T02:02:48Z","closed_at":null,"body":"I'm using iis cookbook 4.1.1 on Windows 2008 (R1), with IIS 7.0.\r\n\r\nWhen using:\r\n\r\n```ruby\r\niis_pool 'DefaultAppPool' do\r\n  runtime_version \"4.0\"\r\n  action :config\r\nend\r\n```\r\nI get the following error:\r\n\r\n    ---- Begin output of C:\\Windows\\System32\\inetsrv\\appcmd.exe set config /section:applicationPools \"/[name='DefaultAppPool'].startMode:OnDemand\" \"/[name='DefaultAppPool'].managedRuntimeVersion:v4.0\" \"/[name='DefaultAppPool'].processModel.logonType:LogonBatch\" \"/[name='DefaultAppPool'].recycling.logEventOnRecycle:PrivateMemory,Memory,Schedule,Requests,Time,ConfigChange,OnDemand,IsapiUnhealthy\" ----\r\n    STDOUT: ERROR ( message:Unknown attribute \"[name='DefaultAppPool'].startMode\".  Replace with -? for help. )\r\n\r\nThe issue is caused by the fact that the  `startMode` is not defined for IIS 7.0 (it has been added in IIS 7.5: see http://www.iis.net/configreference/system.applicationhost/applicationpools/applicationpooldefaults)\r\n\r\nI did not specify any `start_mode` but OnDemand is the default one.\r\nThere is no startMode in the current configuration of my pool, therefore it is considered as an update (cf line \r\nhttps://github.com/opscode-cookbooks/iis/blob/master/providers/pool.rb#L137).\r\n\r\nThe parameter values should be updated only if they're already defined."},"comment":{"url":"https://api.github.com/repos/opscode-cookbooks/iis/issues/comments/105359052","html_url":"https://github.com/opscode-cookbooks/iis/issues/185#issuecomment-105359052","issue_url":"https://api.github.com/repos/opscode-cookbooks/iis/issues/185","id":105359052,"user":{"login":"EasyAsABC123","id":1851104,"avatar_url":"https://avatars.githubusercontent.com/u/1851104?v=3","gravatar_id":"","url":"https://api.github.com/users/EasyAsABC123","html_url":"https://github.com/EasyAsABC123","followers_url":"https://api.github.com/users/EasyAsABC123/followers","following_url":"https://api.github.com/users/EasyAsABC123/following{/other_user}","gists_url":"https://api.github.com/users/EasyAsABC123/gists{/gist_id}","starred_url":"https://api.github.com/users/EasyAsABC123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EasyAsABC123/subscriptions","organizations_url":"https://api.github.com/users/EasyAsABC123/orgs","repos_url":"https://api.github.com/users/EasyAsABC123/repos","events_url":"https://api.github.com/users/EasyAsABC123/events{/privacy}","received_events_url":"https://api.github.com/users/EasyAsABC123/received_events","type":"User","site_admin":false},"created_at":"2015-05-26T02:02:48Z","updated_at":"2015-05-26T02:02:48Z","body":"please test this version: https://github.com/opscode-cookbooks/iis/tree/enhancement-iis_version_detection\r\n\r\nYou can download it here: https://github.com/opscode-cookbooks/iis/archive/enhancement-iis_version_detection.zip\r\n\r\nLet me know and thanks @olivierlemasle "}}