Microsoft.Web.Administration of IIS Express
I blogged about
Microsoft.Web.Administration a long while ago, but intentionally I left a small topic aside. However, it remains a misery sometimes painful to developers, so here comes a dedicated post.
Version 18.104.22.168 in Global Assembly Cache
If you plan to write a .NET Framework application to consume
Microsoft.Web.Administration API, you probably notice that Visual Studio resolves that reference to an assembly in GAC,
This 22.214.171.124 version appears in GAC, as long as you enable full IIS on this Windows machine.
Version 126.96.36.199 in Global Assembly Cache
The 188.8.131.52 version worked pretty fine for years, but suddenly things started to break. For example, if you don’t force the reference in your project file to this specific version
184.108.40.206, you might find that Visual Studio/MSBuild resolves a version of
220.127.116.11 from GAC instead.
Where does this version come from?
Well, it is part of IIS Express installation.
Does it bring any harm?
This assembly by default reads/writes the IIS Express configuration file, so your code suddenly behaves differently (not against full IIS any more).
Since you probably don’t want to uninstall IIS Express (you might need it some day), the remaining option at compile time to resolve the issues is to force your application to use version
18.104.22.168 as reference explicitly.
And then use assembly redirection in
web.config) to load only version
22.214.171.124 at runtime.
But if your web app is being hosted on IIS Express, you might need further changes to IIS Express specific