{"id":253,"date":"2009-06-03T07:29:17","date_gmt":"2009-06-03T07:29:17","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/carloc\/2009\/06\/03\/three-errors-one-cause-me\/"},"modified":"2019-04-03T04:35:04","modified_gmt":"2019-04-03T04:35:04","slug":"three-errors-one-cause-me","status":"publish","type":"post","link":"https:\/\/www.cloudnotes.io\/three-errors-one-cause-me\/","title":{"rendered":"Three errors, one cause: me!"},"content":{"rendered":"<p>A few days ago I was working on a repro I got from a customer as I very often do, and for some reason after a while my IIS started to behave oddly, pages where not served, the application pool was stuck doing \u201csomething\u201d and whenever I tried to open the IIS Manager I got the error \u201cThere was an error when trying to connect. Do you want to retype your credentials and try again? Cannot create a file when that file already exists\u201d:<\/p>\n<figure id=\"attachment_3958\" aria-describedby=\"caption-attachment-3958\" style=\"width: 528px\" class=\"wp-caption alignnone\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-3958 size-full\" src=\"https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/1768.image_60B8CCA5.png?resize=528%2C274&#038;ssl=1\" alt=\"Failed to connect\" width=\"528\" height=\"274\" srcset=\"https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/1768.image_60B8CCA5.png?w=528&amp;ssl=1 528w, https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/1768.image_60B8CCA5.png?resize=300%2C156&amp;ssl=1 300w\" sizes=\"auto, (max-width: 528px) 100vw, 528px\" \/><figcaption id=\"caption-attachment-3958\" class=\"wp-caption-text\">Failed to connect<\/figcaption><\/figure>\n<p>Needless to say that being IIS on my local machine and I have not made any changes to the security\/ACLs\/DCOM etc\u2026 there should be no need to retype my credentials; and by the way, even retyping them did not help.<\/p>\n<p>By the way, if I tried to remotely connect to another machine of mine, I got the message \u201cThe type initializer for \u2018Microsoft.Web.Management.Remoting.HttpChannel\u2019 threw an exception\u201d:<\/p>\n<figure id=\"attachment_4002\" aria-describedby=\"caption-attachment-4002\" style=\"width: 487px\" class=\"wp-caption alignnone\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4002 size-full\" src=\"https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/3835.image_5E9BCDDC.png?resize=487%2C214&#038;ssl=1\" alt=\"Type initializer throw an exception\" width=\"487\" height=\"214\" srcset=\"https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/3835.image_5E9BCDDC.png?w=487&amp;ssl=1 487w, https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/3835.image_5E9BCDDC.png?resize=300%2C132&amp;ssl=1 300w\" sizes=\"auto, (max-width: 487px) 100vw, 487px\" \/><figcaption id=\"caption-attachment-4002\" class=\"wp-caption-text\">Type initializer throw an exception<\/figcaption><\/figure>\n<p>My next step has been to try to restart the World Wide Web Publishing Service: it was (oddly?) stopped, but again I got an error \u201cWindows could not start the World Wide Web Publishing Service service on Local Computer. Error 1068: The dependency service or group failed to start\u201d:<\/p>\n<figure id=\"attachment_4079\" aria-describedby=\"caption-attachment-4079\" style=\"width: 494px\" class=\"wp-caption alignnone\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4079 size-full\" src=\"https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/8206.image_3D3C2840.png?resize=494%2C231&#038;ssl=1\" alt=\"The dependency service or group failed to start\" width=\"494\" height=\"231\" srcset=\"https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/8206.image_3D3C2840.png?w=494&amp;ssl=1 494w, https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/8206.image_3D3C2840.png?resize=300%2C140&amp;ssl=1 300w\" sizes=\"auto, (max-width: 494px) 100vw, 494px\" \/><figcaption id=\"caption-attachment-4079\" class=\"wp-caption-text\">The dependency service or group failed to start<\/figcaption><\/figure>\n<p>The W3SVC service has a dependency on <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc735229(WS.10).aspx\" target=\"_blank\" rel=\"noopener noreferrer\">WAS<\/a> (Windows Process Activation Service), I tried to start it manually and got \u201cWindows could not start the Windows Process Activation Service service on Local Computer. Error 183: Cannot create a file when that file already exists.\u201d:<\/p>\n<figure id=\"attachment_4007\" aria-describedby=\"caption-attachment-4007\" style=\"width: 494px\" class=\"wp-caption alignnone\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4007 size-full\" src=\"https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/4087.image_1BDC82A4.png?resize=494%2C229&#038;ssl=1\" alt=\"Could not start the WAS service\" width=\"494\" height=\"229\" srcset=\"https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/4087.image_1BDC82A4.png?w=494&amp;ssl=1 494w, https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/4087.image_1BDC82A4.png?resize=300%2C139&amp;ssl=1 300w\" sizes=\"auto, (max-width: 494px) 100vw, 494px\" \/><figcaption id=\"caption-attachment-4007\" class=\"wp-caption-text\">Could not start the WAS service<\/figcaption><\/figure>\n<p>That is the same message I got from IIS Manager, so I thought to have a look at the event log to find out more: I was wrong! I got \u201cMMC could not create the snap-in. The snap-in might not have been installed correctly\u201d:<\/p>\n<figure id=\"attachment_4013\" aria-describedby=\"caption-attachment-4013\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/4503.image_7E872AD9.png?ssl=1\" target=\"_blank\" rel=\"noopener noreferrer\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4013 size-medium\" src=\"https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/4503.image_7E872AD9.png?resize=300%2C219&#038;ssl=1\" alt=\"MMS coult not create the snap-in\" width=\"300\" height=\"219\" srcset=\"https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/4503.image_7E872AD9.png?resize=300%2C219&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/4503.image_7E872AD9.png?resize=768%2C560&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.cloudnotes.io\/wp-content\/uploads\/2010\/04\/4503.image_7E872AD9.png?w=960&amp;ssl=1 960w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4013\" class=\"wp-caption-text\">MMS coult not create the snap-in<\/figcaption><\/figure>\n<p>I quickly found out that virtually every MMC snap-in was broken on my machine (\u201cServer Manager\u201d \u201cCertificates\u201d, \u201cLocal Users and Groups\u201d, just name one) but why?!?\u00a0 ?<\/p>\n<p>Well\u2026 on Windows 2008, MMC is based on .NET as of course is IIS and when the problem first appeared I was tampering my machine.config file to try different ThreadPool settings\u2026 ?<\/p>\n<p>The golden rule in computing reads \u201cAlways back-up sensitive data!\u201d\u2026 after restoring my clean machine.config all the problems above went away! ?<\/p>\n<p>For curiosity I had a deeper look at it and found the following lines:<\/p>\n<div id=\"codeSnippetWrapper\" style=\"margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: 'consolas'; font-size: 8pt; cursor: text; direction: ltr; background-color: #f4f4f4;\">\n<pre id=\"codeSnippet\" style=\"margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'consolas'; font-size: 8pt; direction: ltr; background-color: #f4f4f4;\"><span style=\"color: #0000ff;\">&lt;<\/span><span style=\"color: #800000;\">system.web<\/span><span style=\"color: #0000ff;\">&gt;<\/span>\n\n        <span style=\"color: #0000ff;\">&lt;<\/span><span style=\"color: #800000;\">processModel<\/span> <span style=\"color: #ff0000;\">autoConfig<\/span><span style=\"color: #0000ff;\">=\"true\"<\/span><span style=\"color: #0000ff;\">\/&gt;<\/span>\n\n        <span style=\"color: #0000ff;\">&lt;<\/span><span style=\"color: #800000;\">processModel<\/span> <span style=\"color: #ff0000;\">autoConfig<\/span><span style=\"color: #0000ff;\">=\"false\"<\/span> <span style=\"color: #ff0000;\">minWorkerThreads<\/span><span style=\"color: #0000ff;\">=\"100\"<\/span> \n            <span style=\"color: #ff0000;\">minIoThreads<\/span><span style=\"color: #0000ff;\">=\"100\"<\/span> <span style=\"color: #ff0000;\">maxWorkerThreads<\/span><span style=\"color: #0000ff;\">=\"404\"<\/span> <span style=\"color: #ff0000;\">maxIoThreads<\/span><span style=\"color: #0000ff;\">=\"404\"<\/span><span style=\"color: #0000ff;\">\/&gt;<\/span>\n\n        <span style=\"color: #0000ff;\">&lt;<\/span><span style=\"color: #800000;\">httpRuntime<\/span> <span style=\"color: #ff0000;\">minFreeThreads<\/span><span style=\"color: #0000ff;\">=\"152\"<\/span> <span style=\"color: #ff0000;\">minLocalRequestFreeThreads<\/span><span style=\"color: #0000ff;\">=\"152\"<\/span><span style=\"color: #0000ff;\">\/&gt;<\/span>\n\n[...]<\/pre>\n<\/div>\n<p>Easy to spot it now, eh? For my repro I had set autoConfig=\u201dfalse\u201d but then I decided to set it to \u201ctrue\u201d, for some reason I added a new <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/7w2sway1.aspx\" target=\"_blank\" rel=\"noopener noreferrer\">&lt;processModel&gt;<\/a> element with its own autoConfig=\u201dtrue\u201d and forgot to remove the \u201cold\u201d &lt;processModel&gt;\u2026 At least I learnt something new from my foolishness! ?<\/p>\n<p><em>Note: there might be other reasons if you get the errors above, but always keep a clean backup of your configuration files at hand, just in case\u2026<\/em><\/p>\n<p><span style=\"color: #000080; font-family: Brush Script MT; font-size: medium;\">Carlo<\/span><\/p>\n<p><b><i>Quote of the day: <\/i><\/b><\/p>\n<p>We are continually faced with a series of great opportunities brilliantly disguised as insoluble problems. &#8211; <a href=\"http:\/\/en.wikipedia.org\/wiki\/John_W._Gardner\" target=\"_blank\" rel=\"noopener noreferrer\">John W. Gardner<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few days ago I was working on a repro I got from a customer as I very often do, and for some reason after a while my IIS started to behave oddly, pages where not served, the application pool was stuck doing \u201csomething\u201d and whenever I tried to open the IIS Manager I got the error \u201cThere was an error when trying to connect. Do you want to retype your credentials and try again? Cannot create a file when that file already exists\u201d: Needless to say that being IIS on my local machine and I have not made any changes to the security\/ACLs\/DCOM etc\u2026 there should be no need to retype my credentials; and by the way, even retyping them did not help. By the way, if I tried to remotely connect to another machine of mine, I got the message \u201cThe type initializer for \u2018Microsoft.Web.Management.Remoting.HttpChannel\u2019 threw an exception\u201d: My next step has been to try to restart the World Wide Web Publishing Service: it was (oddly?) stopped, but again I got an error \u201cWindows could not start the World Wide Web Publishing Service service on Local Computer. Error 1068: The dependency service or group failed to start\u201d: The W3SVC service has a dependency on WAS (Windows Process Activation Service), I tried to start it manually and got \u201cWindows could not start the Windows Process Activation Service service on Local Computer. Error 183: Cannot create a file when that file already exists.\u201d: That is the same message I got from IIS Manager, so I thought to have a look at the event log to find out more: I was wrong! I got \u201cMMC could not create the snap-in. The snap-in might not have been installed correctly\u201d: I quickly found out that virtually every MMC snap-in was broken on my machine (\u201cServer Manager\u201d \u201cCertificates\u201d, \u201cLocal Users and Groups\u201d, just name one) but why?!?\u00a0 ? Well\u2026 on Windows 2008, MMC is based on .NET as of course is IIS and when the problem first appeared I was tampering my machine.config file to try different ThreadPool settings\u2026 ? The golden rule in computing reads \u201cAlways back-up sensitive data!\u201d\u2026 after restoring my clean machine.config all the problems above went away! ? For curiosity I had a deeper look at it and found the following lines: &lt;system.web&gt; &lt;processModel autoConfig=&#8221;true&#8221;\/&gt; &lt;processModel autoConfig=&#8221;false&#8221; minWorkerThreads=&#8221;100&#8243; minIoThreads=&#8221;100&#8243; maxWorkerThreads=&#8221;404&#8243; maxIoThreads=&#8221;404&#8243;\/&gt; &lt;httpRuntime minFreeThreads=&#8221;152&#8243; minLocalRequestFreeThreads=&#8221;152&#8243;\/&gt; [&#8230;] Easy to spot it now, eh? For my repro I had set autoConfig=\u201dfalse\u201d but then I decided to set it to \u201ctrue\u201d, for some reason I added a new &lt;processModel&gt; element with its own autoConfig=\u201dtrue\u201d and forgot to remove the \u201cold\u201d &lt;processModel&gt;\u2026 At least I learnt something new from my foolishness! ? Note: there might be other reasons if you get the errors above, but always keep a clean backup of your configuration files at hand, just in case\u2026 Carlo Quote of the day: We are continually faced with a series of great opportunities brilliantly disguised as insoluble problems. &#8211; John W. Gardner<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_uag_custom_page_level_css":"","advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[15,32],"class_list":["post-253","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-iis","tag-vistalonghorn"],"author_meta":{"display_name":"carloc","author_link":"https:\/\/www.cloudnotes.io\/author\/admin\/"},"featured_img":null,"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"savona-slider-full-thumbnail":false,"savona-slider-grid-thumbnail":false,"savona-full-thumbnail":false,"savona-grid-thumbnail":false,"savona-single-navigation":false},"uagb_author_info":{"display_name":"carloc","author_link":"https:\/\/www.cloudnotes.io\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"A few days ago I was working on a repro I got from a customer as I very often do, and for some reason after a while my IIS started to behave oddly, pages where not served, the application pool was stuck doing \u201csomething\u201d and whenever I tried to open the IIS Manager I got&hellip;","coauthors":[],"tax_additional":{"categories":{"linked":["<a href=\"https:\/\/www.cloudnotes.io\/category\/uncategorized\/\" class=\"advgb-post-tax-term\">Uncategorized<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">Uncategorized<\/span>"]},"tags":{"linked":["<a href=\"https:\/\/www.cloudnotes.io\/category\/uncategorized\/\" class=\"advgb-post-tax-term\">IIS<\/a>","<a href=\"https:\/\/www.cloudnotes.io\/category\/uncategorized\/\" class=\"advgb-post-tax-term\">Vista\/Longhorn<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">IIS<\/span>","<span class=\"advgb-post-tax-term\">Vista\/Longhorn<\/span>"]}},"comment_count":"0","relative_dates":{"created":"Posted 17 years ago","modified":"Updated 7 years ago"},"absolute_dates":{"created":"Posted on June 3, 2009","modified":"Updated on April 3, 2019"},"absolute_dates_time":{"created":"Posted on June 3, 2009 7:29 am","modified":"Updated on April 3, 2019 4:35 am"},"featured_img_caption":"","series_order":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paQTEh-45","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.cloudnotes.io\/wp-json\/wp\/v2\/posts\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudnotes.io\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudnotes.io\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudnotes.io\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudnotes.io\/wp-json\/wp\/v2\/comments?post=253"}],"version-history":[{"count":1,"href":"https:\/\/www.cloudnotes.io\/wp-json\/wp\/v2\/posts\/253\/revisions"}],"predecessor-version":[{"id":4112,"href":"https:\/\/www.cloudnotes.io\/wp-json\/wp\/v2\/posts\/253\/revisions\/4112"}],"wp:attachment":[{"href":"https:\/\/www.cloudnotes.io\/wp-json\/wp\/v2\/media?parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudnotes.io\/wp-json\/wp\/v2\/categories?post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudnotes.io\/wp-json\/wp\/v2\/tags?post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}