IIS 7 and Above
IIsProviderSnapIn loading problem
Last post Jun 10, 2008 01:45 AM by 13xforever
May 27, 2008 04:56 AM|13xforever|LINK
Hi, we have machine with Vista and IIS installed. Today we also have installed PowerShell 1.0 and IIS provider (all x86 versions).
The problem is when we try to add IIS snap-in, we got this error:
Attempting to perform the Start operation on the 'WebAdministration' provider failed. Method not found: 'Void Microsoft.Web.Administration.ServerManager..ctor(Boolean, System.String)'
It's too strange, because the following command works just fine:
PS C:\Users\admin> [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Administration")
GAC Version Location
--- ------- --------
True v2.0.50727 C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Administration\22.214.171.124__31bf3856ad364e35\Microsoft....
Jun 03, 2008 05:21 PM|ma_khan|LINK
IS this how you are doing it
PS>Add-PSSnapIn IIsProviderSnapIn ???
Jun 04, 2008 04:35 AM|13xforever|LINK
Yes, exactly. As far as I know, there's no other way. And all other systems work with it well without any troubles. This error is happening on only one machine and is 100% reproduceable after re-installing of IIS, .NET and PowerShell / IIsProvider.
PS:and yes, I know about IIsConsole.psc1, and I believe it's equivalent to Add-PSSnapin in that regard. (And it doesn't work, as you may guess).
Jun 09, 2008 05:49 PM|ma_khan|LINK
You must be using Windows Server 2008 (x86) or Windows Vista Service Pack 1 (x86) or later.
Jun 10, 2008 01:45 AM|13xforever|LINK
SP1 for Vista isn't a requirement at all, but still, yes, we have SP 1 installed. Also, IIS7 is comnig only with Vista and maybe with Server 2008 (didn't try it yet). Also, it's 32-bit version of OS, but honestly, at home I have 64-bit Vista version and
it never coused any trouble.
The problem is (I only can suspect) in the way IIsProvider loads and initialize IIS management assembles. Maybe they didn't register something, don't know, but it's strange, because, as I said it before, reinstallation of any component (IIS, .NET, PS and
IIsPSProvider) didn't solve the issue.
Also, loading and using management assembles is working, but it's not as easy to read and elegant as PS commands.