Failed to load IIS Metabase

Almost everytime I start a new computer I keep having new types of problems with IIS. Though it’s my second favorite server, I really dislike some of it’s cranky behaviors.

The most common of these uncommon IIS problems I’ve has is : Failed to load IIS Metabase.

The solution to this themed out to be quite simple. Run this command in your visual studio command prompt

aspnet_regiis -i

That’s it! Also make sure that each site you’re hosting has the required privileges to IUSR and you are running the required version of .Net

Problem starting Apache/IIS on Windows 7 Port:80

Recently I had severe problems running Apache on Windows 7. There are several reasons why this can happen. I have identified 5. The problem and the solution(s) are presented in this blog post.

You might come across this problem if you’re having trouble starting Apache or IIS. The first thing you should do is to go check your error logs. First thing to do is to go to your system event log. Do Start>[Type “event viewer”]>[Enter]. Select ‘System’ from the left side and check for any logs.

With Apache I was getting a service-related error code: -1

Now I checked the apache error log (C:\xampp\Apache\logs\error.log) and saw that it was ‘not able to bind to port 80’. This means that some other process was using port 80. So, I googled for a command to check the process that’s using port 80. The command was:

netstat -ano

Now if your process id (last column) that’s using port 80 [::]:80 or is not 4 (PID), then your solution could be simple:

Solution 1

If your PID is not 4 after the above step, go to Task Manager>Performance>Resource Monitor. Here find the process that was using port 80 and kill it. 🙂

Solution 2

If the process that stole your port 80 was Skype, use this link:

Solution 3

If PID 4 (The NT kernel process ‘System’) was hogging port 80. Go to your Service Control Manager (Type in ‘Services’ in Start Menu), Find the service named ‘RemoteDesktopManager’ and disable it.

Solution 4

Again if it was PID 4, there could be a problem with the infamous http.sys. To solve this problem, use this link:

Solution 5 (This was my problem actually)

If you are running SQL Server Reporting Services, you’d be surprised to know that it steals your port 80. If you have SQL Server (05/08) installed on your system, goto Start > Microsoft Sql Server 20xx > Configuration > Sql Server Configuration Manager. Find the Reporting services and stop it. Also make it ‘Manual’ to be safe.

And Viola! My apache service is running. If it was IIS in your case, you’d have that running too 🙂

If this didn’t help you, comment. If this did help you, comment.

Problems with user controls while publishing web apps

I recently had a major issue while publishing a web app that consisted of a lot of User Controls. Every time I opened a page that contained a user control I got the following error:

The base class includes the field ‘TestUserControl1’, but its type (TestUserControl) is not compatible with the type of control (ASP.TestUserControl_ascx).

I noticed that my code was running perfectly fine when I was running it through Visual Studio, but as soon as I published this error would show up on the published website. After cursing and swearing for a while, I tried to publish it with no extended publish options. And viola the error was gone. Intrigued by this I tried to recreate the error and noticed that the ‘updatable’ option while publishing was the cause of the problem.

So the fix: Uncheck the “Allow this precompiled site to be updatable” and publish the site again.

However, the reason behind this error can be many. So I would suggest you google a bit. There are many forums with annoying amounts of discussion on this. I read several posts on this and spent about an hour googling when I came across this article on Microsoft Support web site which may also be helpful: