24 April, 2007

Problems with ASP.NET debugging in BDS 2006

Hello people! Today I want to talk about annoying things that occurs when you try to debug ASP.NET applications in Delphi 2006.

At first small prelude. Most of you are probably like me first install all necessary applications on just installed Windows Xp and only after this remember that IIS supposed to be installed before .NET framework has been installed because if you install IIS after the .NET Framework then ASP.NET will not be registered properly in IIS and you will have some problems with ASP.NET.

In order to solve this issue you should do the following:

  • Start console and browse to the "C:\WINDOWS\Microsoft.NET\Framework\(your framework version)";
  • run aspnet_regiis.exe with -i parameter;

Now ASP.NET is registered but still not in the way which will satisfy me. Why? Well, it is simple. First, if you take a look at the Documents tab in the Properties window of any ASP.NET application you won't see Default.aspx item in the Default documents list. Yes, I know that it could be easily added but after all it supposed to be there by default. Second, with out any reason ASP.NET applications works very slow and sometimes, when you try to debug them from BDS 2006, you receive some weird errors. So if you don't want to have any doubts whose fault is this, yours or Microsoft, then the following should be done -uninstall ASP.NET and reinstall it again :) Don't worry, it won't take too much of your time. Just do next and you won't regret:

  • Once again start console and browse to the "C:\WINDOWS\Microsoft.NET\Framework\(your framework version)";
  • run aspnet_regiis.exe with -u parameter;
  • then remove ASPNET account from user accounts if it is still there (Press Start>Run; type control userpasswords2);
  • run aspnet_regiis.exe with -i parameter;

Now everything will work like out of the box. But it is not the end :)

The only thing left to do is to uncomment tags of the <assemblies> and <httpModules> sections of the Web.config file of your ASP.NET application. And now everything works like it supposed to work! Hurray! Everybody happy!

Stay tuned!

No comments: