• Sign In
 
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...
Common Tasks
  • Blog Home
  • Email Blog Author
  • RSS for comments
  • RSS for posts
Search
  • Advanced search options...
Tags
  • .NET Framewor
  • .NET Framework
  • Ajax/Javascript
  • ASP.NET
  • CLR
  • Cool stuff
  • DataAccess
  • Debugging/Windbg
  • Hotfix/Service Pack
  • IDEVDataCollector
  • IIS
  • Internet Explorer
  • Italian techs
  • LogParser
  • OT
  • Personal
  • Productivity
  • Random
  • Scripting/ASP
  • Security
  • Technology
  • Tools
  • Troubleshooting
  • Vista/Longhorn
  • Visual Studio
Archives
Archives
  • November 2010 (1)
  • October 2010 (1)
  • July 2010 (2)
  • April 2010 (1)
  • March 2010 (2)
  • February 2010 (2)
  • January 2010 (1)
  • October 2009 (2)
  • September 2009 (2)
  • August 2009 (1)
  • July 2009 (5)
  • June 2009 (1)
  • May 2009 (1)
  • April 2009 (3)
  • March 2009 (3)
  • February 2009 (5)
  • January 2009 (3)
  • December 2008 (5)
  • November 2008 (3)
  • October 2008 (2)
  • September 2008 (3)
  • August 2008 (3)
  • July 2008 (3)
  • June 2008 (5)
  • May 2008 (4)
  • April 2008 (8)
  • March 2008 (4)
  • February 2008 (5)
  • January 2008 (2)
  • December 2007 (4)
  • November 2007 (6)
  • October 2007 (6)
  • September 2007 (8)
  • August 2007 (6)
  • July 2007 (7)
  • June 2007 (10)
  • May 2007 (9)
  • April 2007 (12)
  • March 2007 (8)
  • February 2007 (5)
  • January 2007 (3)
  • December 2006 (1)
  • November 2006 (4)
  • October 2006 (2)
  • September 2006 (9)
  • August 2006 (2)
  • July 2006 (1)

Three errors, one cause: me!

MSDN Blogs > Never doubt thy debugger > Three errors, one cause: me!

Three errors, one cause: me!

Carlo Cardella
3 Jun 2009 7:29 AM
  • Comments 2

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 “something” and whenever I tried to open the IIS Manager I got the error “There 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”:

 Failed to connect

Needless to say that being IIS on my local machine and I have not made any changes to the security/ACLs/DCOM etc… 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 “The type initializer for ‘Microsoft.Web.Management.Remoting.HttpChannel’ threw an exception”:

Type initializer throw an exception 

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 “Windows could not start the World Wide Web Publishing Service service on Local Computer. Error 1068: The dependency service or group failed to start”:

The dependency service or group failed to start

The W3SVC service has a dependency on WAS (Windows Process Activation Service), I tried to start it manually and got “Windows could not start the Windows Process Activation Service service on Local Computer. Error 183: Cannot create a file when that file already exists.”:

Could not start WAS service

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 “MMC could not create the snap-in. The snap-in might not have been installed correctly”:

 MMC could not create snap-in

I quickly found out that virtually every MMC snap-in was broken on my machine (“Server Manager” “Certificates”, “Local Users and Groups”, just name one) but why?!?  Surprised smile

Well… 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… Thinking smile

The golden rule in computing reads “Always back-up sensitive data!”… after restoring my clean machine.config all the problems above went away! Nerd smile

For curiosity I had a deeper look at it and found the following lines:

<system.web>

<processModel autoConfig="true"/>

<processModel autoConfig="false" minWorkerThreads="100"
minIoThreads="100" maxWorkerThreads="404" maxIoThreads="404"/>

<httpRuntime minFreeThreads="152" minLocalRequestFreeThreads="152"/>

[...]

Easy to spot it now, eh? For my repro I had set autoConfig=”false” but then I decided to set it to “true”, for some reason I added a new <processModel> element with its own autoConfig=”true” and forgot to remove the “old” <processModel>… At least I learnt something new from my foolishness! Embarrassed smile

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…

 

 

Carlo

Quote of the day:
We are continually faced with a series of great opportunities brilliantly disguised as insoluble problems. - John W. Gardner
  • 2 Comments
IIS, Vista/Longhorn
Leave a Comment
  • Please add 6 and 7 and type the answer here:
  • Post
Comments
  • jaskis
    7 Jun 2009 3:12 AM

    Nice Start....

    btw good know so many things depends machine.config in 2008

    Thanks

    JAs

  • Mag
    26 Jan 2011 2:49 PM

    Hmm. Good post, but I'm getting all the same problems/errors you did, and haven't touched the machine.config file. Guess I still have to do some hunting for this one...

Page 1 of 1 (2 items)
  • © 2012 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy Statement
  • Report Abuse
  • 5.6.402.223