This project is read-only.

uriformatexception, W3SVC errors

Topics: ASP.NET 2.0
Jun 26, 2007 at 7:31 PM

I've just started running BlogEngine.NET 1.0. The application itself seems to be running okay, but sometimes I get this critical error in the server's Application event log:

Source: .NET Runtime 2.0 Error Reporting
Event ID: 5000
Description: EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d6968e, P4 system, P5, P6 4333ae87, P7 1add, P8 74, P9 system.uriformatexception, P10 NIL.

Also, this morning I have quite a few of these information messages in the Application event log:

Source: .NET Runtime 2.0 Error Reporting
Event ID: 5001
Description: Bucket 43784591, bucket table 5, EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d6968e, P4 system, P5, P6 4333ae87, P7 1add, P8 74, P9 system.uriformatexception, P10 NIL.

At the same exact time as the critical error above (#5000), I get this warning in the System event log:

Source: W3SVC
Event ID: 1009
Description: A process serving application pool 'DOTNET20AppPool' terminated unexpectedly. The process id was '9788'. The process exit code was '0xe0434f4d'.

What do these errors mean and how can I get rid of them?


Jul 7, 2007 at 11:49 PM
I am also seeing these exceptions, which manifest as a "Server Application Unavailable" error in the browser, and log the above exception in the Application log. If I had to guess, I would probably start looking in the URLRewrite module since that is where manipulation of the URI is occurring. I'm wondering if this problem is as confined as it seems, since only 2 of us have mentioned seeing it, or if others are having it occur and not realizing it (since if it is an end user who is getting the "Server Application Unavailable" messing in their browser, the only way for the site owner to know it is happening is to view the Application log). Of course, it is also possible that something in our configurations is different from others. The only "modification" I have made thusfar is that I am running using the SQL Provider, on an older SQL 2000 server.

I am thinking about trying to drop some trace events into the URLRewrite module to see if I can get lucky and get some information on when this problem occurs. Since I don't know the app very well yet, the "shot in the dark" approach is about all I have. If there is anything specific the dev team would like me to do to help debug this problem, please let me know.

- Barry

FYI - My implementation is online at:, ported from various other blog platforms.
Jul 8, 2007 at 12:37 AM
Edited Jul 8, 2007 at 12:37 AM

I'm using the default provider (XML files), not SQL.

I've only seen the Application Unavailable once. It coincided with the following error in the System log (not Application log):

Source: W3SVC
Event ID: 1002
Description: Application pool 'DOTNET20AppPool' is being automatically disabled due to a series of failures in the process(es) serving that application pool.

That happened after a bunch of the 5000 errors. It's like the server said, "this is so bad I am shutting you down." I restarted my DOTNET20AppPool manually.

I am also seeing a few 1062 errors in the Application log: "It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process." I don't understand these since I have set up BlogEngine, along with one other application, to share a special application pool that only includes .NET 2.0 apps. Are you also running more than just BlogEngine in your application pool? Are you even using application pooling?

The errors happen mostly when I am creating entries. I think I have finally found a reliable way to duplicate the error:

1. Create a blog entry. Title it "Test Entry" and put "Test stuff" in the content area. Uncheck Publish, save the post, then click Edit again. Refresh the Application log. No error.

2. Now highlight the word "stuff" and click on the hyperlink button. Insert a hyperlink to some site. Save the post and refresh the Application log. No error.

3. Click on Edit again. You may notice a brief delay. Refresh the Application log. Boom! The error appears. happens when you edit a post containing a hyperlink.

I'm not familiar with the guts of this application at all, but I hope that helps you or the dev team track down the error!

Jul 8, 2007 at 1:35 AM

I was able to duplicate the error following your instructions, however it is not all entries with a hyperlink that cause the problem. For example, the entry at is rather more substantial then your test entry, and editing it does not cause that error. Since you have found a repeatable example though, it shouldn't be hard to figure out what is causing it. I'm working on getting a dev environment setup for this so I should be able to trace it through using your repro example soon. Hopefully, finding out what is causing it in this example will fix it everywhere.

- Barry
Jul 8, 2007 at 6:28 PM
I now have a dev environment setup for both the latest code, and the released code. Naturally, the error doesn't occur in either, built in either debug or release mode. I also configured one of the code-bases to run against IIS (on my dev box) rather than the devenv server and still no error. This actually makes sense since if the problem were visible in a dev environment, it would probably have been seen and fixed by the dev team.

I think my next move is to compile the latest code-base and push that up to the server and see if the problem still occurs. I have been using the released code on the server thusfar (Mark-if you were using a different code-base please let me know). If it isn't happening in the current code-base I probably won't worry about it anymore, but if it is still happening I'll add a bunch of trace code and see if I can get lucky and capture some information that points me in the right direction.

- Barry
Jul 8, 2007 at 8:15 PM

I'm using the code that was released (not beta or debug) as of 6/22/07.

So it sounds like this may relate to the installation environment...maybe only with application pooling? My host OS, by the way, is Small Business Server 2003 with Service Pack 2.

Good luck on the bug hunt!

Jul 9, 2007 at 10:21 PM
If the bug occurs when a post with links are saved, then it probably is the trackback and pingback mechanism that fails. It runs in a background thread, so you never see if something goes wrong. I'll look at it and try to fix the issue very soon. Thanks
Jul 10, 2007 at 6:55 AM
One interesting thing I observed today: when I create a post with a link and save it, no error. When I go back in to edit the post, then save it again (even without changes), I get the error.

Thanks Mads and Barry for your work on this. I'll look forward to your follow-up. I'll be away for the next week so I may not be able to respond if there are questions or a new version to test.


Jul 10, 2007 at 6:58 AM
P.S. the background thread makes sense: every few days I get a popup with deferred errors to report. to Microsoft. It just sent 14 errors that the IIS Worker Process had been collecting for a few days.
Jul 12, 2007 at 8:57 AM
I have uploaded patch #128 to fix this problem. Once I knew it was an asynchronous problem on the save and not occuring during the load method as it appeared (the 2 second delay in the asynch process made it look like it was happening on the next load) it was easy to find where the bad URI was being created.
Jul 12, 2007 at 5:04 PM
Thanks Barry! Forgive my ignorance of the development process, but when you upload a patch, is that something I can download (where?) or do I wait until it is incorporated into the next release?

Jul 12, 2007 at 6:31 PM
If you are compiling/building the solution yourself, you can download the source code for the patch here: Just replace the existing BlogEngine.Core.Ping.Manager.cs file with the one in the patch, recompile, test and deploy.

If you are just deploying the web project, it is best for you to wait for the next release. You can avoid the problem in the current release in a couple of ways:

1) If you want to avoid the Ping process alltogether (sending trackbacks/pingbacks) you can just post your item from a web-browser running on the server. The system assumes that this is for testing purposes and doesn't send trackback/pingback notifications.

2) No matter where you post from, if you make sure that any page hyperlinked-to in your posts has trackback/pingback information embedded into it, this problem won't occur. When you save a post with a link in it, BlogEngine grabs a copy of the page you are linking to, finds the trackback/pingback information on that page, and sends the ping to the specified location. The bug here was that if the page didn't have that information, a blank string (not a valid URI) was being used. You can find more information about trackback/pingback by starting at Wikipedia.

I should probably post this stuff on my blog huh? :-)

I hope it helps..

- Barry
Jul 13, 2007 at 4:02 AM
Thanks, Barry, for all your work on that. I'm trying to play "end user" on this product so I'll probably just wait for the next release. I'll look forward to it!

Jul 24, 2007 at 10:50 PM
Hi Barry and Mads,

Today I downloaded and installed 1.1 (dated July 15, 2007) and the uriformatexception is no longer occurring.

Thanks very much to both of you!