Download Counter Issue

Topics: ASP.NET 2.0, Controls
Feb 23, 2009 at 2:16 PM
Edited Feb 23, 2009 at 2:17 PM
Recently I found 3 different "Download Counter" extensions, but I can't seem to get any of them to work.  I can add the extension just like adding any other extension (copying files to the server), they show up in Extension Manager, I can view the code or edit the settings.  The data.xml file exists in the App_Data\DataStore\Extensions folder and setting changes get saved to the xml file.  I upload .zip files using the page/post edit feature so the link to the .zip file is properly formatted as ../file.axd?file=MyFile.zip.  It appears that I am doing everything correctly, but for some reason downloads are not being added to the xml data file and do not show on the page/post.

In case it matters or helps, my hosting company is WebHost4Life.com.

Here are the tree Download Counters I have tried.
Also, not sure if it helps, but after adding an extension and reloading or refreshing the page, (durring the re-compile process)  I always get an error regarding the first extension in the Extension Manager list.  Another refresh and the error goes away and it all works.

The process cannot access the file '.....\App_Data\datastore\extensions\BBCode.xml' because it is being used by another process.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.IOException: The process cannot access the file '.....\App_Data\datastore\extensions\BBCode.xml' because it is being used by another process.

Source Error:

Line 381:    {
Line 382: BlogEngine.Core.DataStore.ExtensionSettings xs = new BlogEngine.Core.DataStore.ExtensionSettings(ext.Name);
Line 383: xs.SaveSettings(ext);
Line 384: }
Line 385: return true;

Also, adding one extension often breaks another extension, adding Download Counter broke LightBox and/or Picasa extension.  So then I would have to remove and re-add until I got it working again.

Thank you for any help or suggestions you can provide.
Page on my blog with counter not working is here.
Coordinator
Feb 23, 2009 at 4:51 PM
This error was fixed after the BE 1.4.5 release.  Here's the discussion talking about the error.
Feb 23, 2009 at 6:19 PM
Ben Amada,
Thank you for the info on fix for the locking xml data file issue.  But I suspect this is NOT causing my problem with Download Counter extensions not working for some reason.  I can live with two reloads after adding an extension, but I would really like to get a Download Counter to work.

By the way, what exactly do I need to get and where to I go to get it, to fix the locking xml data file issue.  I am not used to using CodePlex and getting just the source files, I usually just get the release.  I did read the post you liked to, but for the guy that usually deals with releases only, it is not clear what to get or where to get it.
Feb 23, 2009 at 6:34 PM
Forget it.  I did some poking around.  My first look at thread you pointed me to I missed the link in the second last post.  That got me to the Change Set and I could download all current source for that Chang Set or just copy and past the code for Manager.cs and put that on my server.  That fix resolved the locking xml data files issue and the download counter is now working.  THANK YOU!
Coordinator
Feb 23, 2009 at 6:41 PM
Thx for the good news.  Yeah, I was just looking at it, and there was actually only one line of code that needed to be changed for the fix.  Glad you got it working.