Friday, December 31, 2004

Reinstalling DotNet/ASPNet on a Windows 2003 Server

So much for getting rid of DLL hell...I've just been through hell and back trying to re-install the DotNet framework to run properly with SourceGear's Dragnet product.

We were experiencing some problems that only popped us running IE (FireFox was fine) and the suggestion was to reinstall DotNet. Oh sure. no problem -just go to Windows Installer right?

Wrong - apparently the service packs don't show up under Add/Remove programs with a good name. Redownloaded DotNetFX again , thinking I should be able to install over it. Sorry - "This has already been installed on your OS." (Win 2003).

Why is that? Because Windows 2003 comes WITH the DotNet framework built in. This means that you can't simply "remove it" and then "reinstall it". But there is a solution. Read on.

Based on some other useful sites, I turned on Windows Installer Logging so I could see that the message was when I tried to install it - maybe I could find out where the culprit was that way. No luck. The log file simply said "Looking for MSI.DLL" and then "Cannot install." Don't bother doing that.

There must be an easier way. So I uninstalled any product I knew that used DotNet, hoping that would get rid of the dependencies. Still no luck. Even went through the Registry, removing entries pointing to DotNet. Still no luck.

Finally came across a useful MSDN KB article about repairing corrupted installs (funny how it didn't turn up on any search engines - Google and MSN have to really start filtering out the sites that simply repeat other KB articles).

C:\DOTNETFX.EXE /t:C:\temp /c:"msiexec /i c:\temp\netfx.msi REINSTALL=ALL ReinstallMODE=vomus"

It said it installed just fine. Full install - no problem. Why wouldn't it simply do this without having wasted the better part of the morning?

Why not? Because it STILL didn't fix it. I still get an internal error 2908 on Microsoft.VisualBasic.VCA,Version="7.0.50000.0",PublicKeyToken="b03f5f7f11d50a3a",Culture="neutral",FileVersion="7.10.3052.4",
Hresult: 0x8002802F. Please refer to Help and Support for more information.

This seems like it should be pretty straight forward to me. I simply want to reinstall the software.

Finally, posted a question on the framework.setup newsgroup and Blair Neumann from Microsoft pointed me to the right KB article.

1. Repair your Windows 2003 server. (that's a nasty piece of work)
2. Hack the registry (just a little) and rerun some installers.

Sure, you have to hack the registry a little but after I did that, everything seemed to be good except for one little thing: my Dragnet app still didn't work.

Somewhere in my adventures, "something" had turned off support for ASP.Net. Where do you fix this?

IIS Manager (INETMGR) - Web Service Extensions - make sure that ASP.Net is Allowed and not prohibited.

It was a frustrating adventure but there was light at the end of the tunnel.

What did I really learn from all this? 1) Sometimes the best searches simply suck at finding the root cause of the problem and 2) a checklist somewhere would be valuable for doing these repairs

Real Checklist for verifying AspNet is working properly on a Windows 2003 server
1. Verify in IIS that ASP.Net web service extension is Allowed.
2. If it is, and something's still not working right, re-register it. Go to the \WINDOWS\Microsoft.NET\Framework\v1.1.4322 folder and run:

aspnet_regiis -i

aspnet_regiis -c (note the -c didn't seem to work on my version but you can also do it with an -r to reinstall)
3. If it's STILL not working, repair your Windows 2003 server and then recheck.
4. Still not working, go to the KB article (luckily, you'll only have to do the Registry hacking step as you've done the other step (repairing the server)).

Not fun - and very frustrating but at least now it works. Hopefully this post will make it easier for those who come across it again on their own.


Anonymous said...

excellent stuff, spent 2 hours trying to sort an issue i was having. then after finally finding this article i had it sorted in five minutes

Anonymous said...

Thank you for posting this. Saved my day.

Anonymous said...

Had the same problem. Found the source and fixed it.
Compare wwwroot\aspnet_client\system_web\1_1_4322\WebUIValidation.js
on the 2003 server and on a server that works (or your development machine). Mine were different. Replaced a javascript function on the 2003 server with the one off my machine. Here is the working version of this function that should be replaced on the 2003 server:
function ValidatorCommonOnSubmit() {
var result = !Page_BlockSubmit;
Page_BlockSubmit = false;
event.returnValue = result;
return result;

Good luck.

Anonymous said...

Forgot to mention, you will probably have to wait a while for the fix to work it's way through whatever caching IIS and IE are doing.

Austin Amuok said...

Thanks, this article came in real handy when i was scratching my head in my quandry. Thanks! Hongera!!

Austin Amuok

Georgina Black said...

Cool picture of zoroastrianism

Abiya Carol said...

A making linq work on Mono with Mysql was another difficult challenge if you preferred the mono way, and then Mono team fixed it, but it still had some bugs -it's always a rollercoaster.

dotnet training in chennai