torsten's .NET blog In the end, everything is a gag [Ch. Chaplin]
# Saturday, January 21, 2006
Congrat's to Marco!
Congratulation to Marco Buechel (the son of our CEO): he was the second with only a diff. of only 0.05 secs to the winner in Kitzbuehl (the legendary Streif race)!  Very nice, keep it on!
Technorati tags:  | 
Saturday, January 21, 2006 5:58:03 PM (W. Europe Standard Time, UTC+01:00)    #  Comments [1]  | 
# Saturday, January 07, 2006
Remoting from CLR 1.1 to 2.0 and back: issue 1

This week I had a hard day to track down a remoting issue we had with our product. We have a application service running (Windows Service or Console Window for tests) under CLR 1.1 and a ASP.NET 2.0 application want to call the service. After figuring out an issue with a third party software component I got another exception: "Serialization Error: Unknown member TextInfo". I'm talking about remoting serialization of function parameters and return values, not using/calling any formatter like SOAP. Diving into the problem analysis I found our software never uses such a member and so I examined a involved CLR class that member is part of using reflector: the CaseInsensitiveHashCodeProvider class used indirectly by an own collection inherited from NameObjectCollectionBase. I know MS worked hard to get the old style collections compatible to the new implementations using Generics and new approaches and so it is with that base collection. It is mentioned at the .NET 2.0 obsolete type/member list the collection is using a new preferred constructor with the IEqualityComparer parameter and they wrap up the old style HashCodeProvider and Comparer with a internal class named CompatibleComparer.

Knowing all that now I had to find a way to get around the serialization exception. It happens the moment the CLR 1.1 running at the app service try to deserialize the CLR 2.0 serialized collection. I started to create some experimental own HashCodeProvider classes and one that worked recently had the original (don't change the semantic!) CaseInsensitiveHashCodeProvider hold as a non-serialized member and just serialized the CultureInfo.Name to be able to re-create it on creation/deserialization implementing ISerializable and IDeserializationCallback to set the private members ("_hashProvider" and "_comparer" using reflection - they can only be set via the costructor!) of NameObjectCollectionBase. We had to replace the Comparer also, because after it serialized/deserialized our migratable HashCodeProvider successfully we got another wired exception we had to workaround by a homebrewed Comparer class implemented similar to our HashCodeProvider class.

Now it works fine. What we learned? Also MS don't keep in mind to consider also internal classes to provide backward compatible serialization formats. They used only the code attribute "Serializable" and don't implement ISerializable to explicitly get compatible serialization. I expect to get more issues like this... :-(

Update: It looks like the new cool feature named VTS (version tolerant serialization) will not work for Net.Remoting, isn't it?

Technorati tags:  | 
Saturday, January 07, 2006 2:34:02 PM (W. Europe Standard Time, UTC+01:00)    #  Comments [1]  | 
# Sunday, December 25, 2005
Feed icons

Who is somewhat involved in the feeds/rss/rdf/atom world like me may have noticed the interesting discussion at the Microsoft Team RSS blog. There is now a consens by major players about using this common icon  to visualize webfeeds. Two or three days ago Matt opens a site named http://www.feedicons.com/ to get it broadcasted and so I did by this post :-)

As soon Dare Obasanjo gets the bugfix installer ready of my favorite NewsReader you will notice we use it the same way as it will be used within IE7 - to indicate autodiscovered feeds while you browse. OK, that's an old feature, but you know we refreshed all our used icons and so it was just the right time for the right think thing.

Technorati tags:  |  | 
Sunday, December 25, 2005 3:16:53 PM (W. Europe Standard Time, UTC+01:00)    #  Comments [3]  | 
# Saturday, December 10, 2005
Trust a trusted site

Just got this message from my IE 6 this moment:

trust a trusted site?

Yes, indeed!. Short moment after: yesss, I do. Once again: yes!
Did I got a silent "featured" security update last week?

Technorati tags:  |  |  | 
Saturday, December 10, 2005 6:32:15 PM (W. Europe Standard Time, UTC+01:00)    #  Comments [3]  | 
# Tuesday, December 06, 2005
First steps with VWD 2005 Express - no luck

Today I installed the Visual Web Developer/C# 2005 Express editions and just want to get the simple Homepage template running. The express editions install also the new MSDE 2005 Express (silently) - so I assumed it would run out of the box.

Bang! SQL failure: "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance". Yes, I read all the articles I found at the net here and here and there: no success. Now are three hours fighting the problem are lost, out of ideas. I installed all of them as a normal domain user (member of the local adimistrators group) while I'm offline from the company's local network. Is this also a kind of remote desktop issue (and if so: a bug within the OS)? Should it gone if I would work from within the local area network@work?

And: I really miss the system tray console window to control the SQL Server Express engine like that of v2003...

Technorati tags:  |  | 
Tuesday, December 06, 2005 3:01:18 PM (W. Europe Standard Time, UTC+01:00)    #  Comments [1]  | 
# Wednesday, November 30, 2005
Still there

Yes, a whole month and no post. Sorry, but we are soo busy at work.

Meanwhile we got the 1.3.0.38 release of my favorite news reader ready (somehow), and it seems it get positive feedback. Read, what email.about has to say about it.

Technorati tags:  | 
Wednesday, November 30, 2005 2:16:59 PM (W. Europe Standard Time, UTC+01:00)    #  Comments [0]  | 
# Friday, October 28, 2005
VistaDB: blog it, get it, try it... throw away?

Low cost marketing: So here is the first step -- I blog about:

VistaDB 2.1 database for .NET has been released
This 2.1 update includes over 60 improvements, including new support for .NET 2.0 and Visual Studio .NET 2005. VistaDB is a small-footprint, embedded SQL database alternative to Jet/Access, MSDE and SQL Server Express 2005 that enables developers to build .NET 1.1 and .NET 2.0 applications. Features SQL-92 support, small 500KB embedded footprint, free 2-User VistaDB Server for remote TCP/IP data access, royalty free distribution for both embedded and server, Copy 'n Go! deployment, managed ADO.NET Provider, data management and data migration tools. Free trial is available for download.
- Learn more about VistaDB
- Repost this to your blog and receive a FREE copy of VistaDB 2.1!

Now awaiting to get it for test...

Technorati tags:  |  | 
Friday, October 28, 2005 6:07:58 PM (W. Europe Daylight Time, UTC+02:00)    #  Comments [2]  | 
# Tuesday, October 25, 2005
1.3.0.36 Alpha and AdsBlocker HowTo

We decided to post another iteration of the Rss Bandit Alpha (v1.3.0.36): read about the details at Dare Obasanjo's blog and download it here.

It is the first version that is AddIn - enabled and you can find and use the first AddIn available here: AdsBlocker. So how to use it?

  1. Download and unzip to a folder you like (e.g. "AddIns" sub-folder within your Bandit installation path).
  2. Start Bandit and open the AddIns dialog via Tools|AddIns... menu.
  3. Press the "Add..." button and select the AdsBlocker.AddIn.dll
  4. Press "Close"
  5. Optional: add entries/modify the ads.blacklist.txt file (regular expressions) to configure your blocked content (urls)
  6. Optional: create a white list "ads.whitelist.txt" in the same location if your blacklist gets large and you want to re-enable some blocked content.

 

Technorati tags:  |  |  | 
Tuesday, October 25, 2005 7:59:45 PM (W. Europe Daylight Time, UTC+02:00)    #  Comments [4]  | 
# Tuesday, September 27, 2005
More to know about .NET Timers

As you may know, .NET 1.1 supports three different Timer classes:

  1. Windows timers with the System.Windows.Forms.Timer class
  2. Periodical delegate calling with System.Threading.Timer class
  3. Exact timing with the System.Timers.Timer class

The timings are more or less accurate (see CodeProject: Multithreading in .NET), but that is not the point I want to highlight today. Two sentences from the mentioned codeproject article are important for this post:

"... Events raised from the windows forms timer go through the message pump (together with all mouse events and UI update messages)..."

and

"...the System.Timers.Timer class. It represents server-based timer ticks for maximum accuracy. Ticks are generated outside of our process..."

To report state and newly retrieved items from requested feeds we used a concept to serialize the asynchronous received results from background threads with the help of a timer. This was introduced in the NightCrawler Alpha Dare Obasanjo posted last week for external tests. Some users reported strange failures, memory hog up and bad UI behavior with this Alpha so I would suggest here to not use it anymore for testing if your subscribed feeds count is higher than 20 or 30 feeds.

The idea was not as bad as it seems to be (if you only look at the issues above). The real issue in our case was to use simply the wrong timer class! The UI state refresh includes an update of the unread counters that is reported to the user within the treeview as number postfixes and (more important here) a font refresh (as user decides, default is to mark the feed caption text bold). Have a look to the constructor of the class we used for background thread result processing:

    1 public ThreadResultManager(RssBanditApplication owner, ISynchronizeInvoke syncObject) {

    2       this.owner = owner;

    3       resultInfos = PriorityQueue.Synchronize(new PriorityQueue());

    4 

    5       // what we catch on:

    6       this.owner.FeedHandler.UpdateFeedStarted += new NewsHandler.UpdateFeedStartedHandler(this.OnUpdateFeedStarted);

    7       this.owner.FeedHandler.OnUpdatedFeed += new NewsHandler.UpdatedFeedCallback(this.OnUpdatedFeed);

    8       this.owner.FeedHandler.OnUpdateFeedException += new NewsHandler.UpdateFeedExceptionCallback(this.OnUpdateFeedException);

    9 

   10       processResult = new System.Timers.Timer(250);

   11       processResult.Elapsed += new System.Timers.ElapsedEventHandler(OnProcessResultElapsed);

   12       processResult.SynchronizingObject = syncObject;

   13       processResult.Start();

   14     }

As you can see in line 10 we used the System.Timers.Timer class. The syncObject parameter is (as you can guess) the main form.

So what happens exactly now if the timer fires? I used the CLR Profiler to get the following exiting results. The event is called in sync. with the SynchronizingObject, means Control::WndProc(m) calls calls into System.Windows.Forms.Control::InvokeMarshaledCallbacks void(), MulticastDelegate::DynamicInvokeImpl()... and then our event method OnProcessResultElapsed(). The allocation graph mentions 101 MB (44.78%) used here! Here is the implementation:

   20 private void OnProcessResultElapsed(object sender, System.Timers.ElapsedEventArgs e) {

   21       // get them out of the resultInfos list and deliver

   22       if (resultInfos.Count > 0) {

   23         ThreadResultInfo t = (ThreadResultInfo)resultInfos.Dequeue();

   24         if (t.Args is NewsHandler.UpdateFeedEventArgs) {

   25           this.owner.OnUpdateFeedStarted(t.sender, (NewsHandler.UpdateFeedEventArgs)t.Args);

   26         } else if (t.Args is NewsHandler.UpdatedFeedEventArgs) {

   27           this.owner.OnUpdatedFeed(t.sender, (NewsHandler.UpdatedFeedEventArgs)t.Args);

   28         } else if (t.Args is NewsHandler.UpdateFeedExceptionEventArgs) {

   29           this.owner.OnUpdateFeedException(t.sender, (NewsHandler.UpdateFeedExceptionEventArgs)t.Args);

   30         }

   31       }

   32     }

As you can see: no real magic things happen. Interesting is the line 22: if there are no queued results, we just return and do nothing. But there was already a cost calling it in sync with the main UI thread, look at the call chain above! And as such it breaks the UI thread every 250 msecs also if there is just nothing to do.

But lets look what will happen if there is a result to process: let's pick the call into owner.OnUpdatedFeed(). The owner forwards to the UI class and no .InvokeRequired call is needed (the only good thing so far). It calls into FeedTreeNodeBase class to update the unread counter and node text of the treeview that in turn calls the TreeNode::UpdateNode() function. It will call into the treeview:WndProc(m), WmNotify(), CustomDraw()..., FontHandleWrapper::.ctor,... Font::ToHFont(), Font:ToLogFont() and...? You are right: it checks the code access security with CodeAccessPermission::Demand()! Right and secure, but slow. More slow even though the CodeAccessSecurityEngine::Check calls into a AppDomain::MarshalObject(Object) followed by a parameter memory serialization into another AppDomain! I scratched my head: what the f...? Then I remembered the second quote (above): Ticks are generated out of process! So this was the obvious reason for the cross-AppDomain call (memory allocation: 75MB, 33%).

So what to do to fix the problem(s)? Simply use the Windows.Forms.Timer! Think about it: it is driven by the main window message pump and runs always in the right context of the main UI thread (no .InvokeRequired calls). Timing isn't an important point here, we just want to process one result each time we are called. Further: no cross-AppDomain security check should happen anymore! With that timer it is just a simple update control(s) with some fresh data!

So take care of the timer class(es) you may use in your projects! Check their implications! Be careful, there are also other issues with it I did not mentioned here, read the docs!
Now I'm off to close related bugs...

Technorati tags:  |  | 
Tuesday, September 27, 2005 2:52:06 PM (W. Europe Daylight Time, UTC+02:00)    #  Comments [0]  | 
# Thursday, September 08, 2005
BASTA! 2005
BASTA! 2005
Technorati tags:  | 
Thursday, September 08, 2005 12:40:01 PM (W. Europe Daylight Time, UTC+02:00)    #  Comments [0]  | 
# Friday, September 02, 2005
"Send to OneNote..." plugin for RSS Bandit
Just got it work, yesss! You can download it here. Just expand the zip to your RSS Bandit installation sub-folder named plugins. Within the config file you can change the default note page used and some templates to format the posted item link and content.
Inspired by a comment by MrPuck at Dare Obasanjo's post I got the idea. It should work with OneNote 2003 SP1. Thanks to Donovan and Andrew.
Technorati tags:  |  |  | 
Friday, September 02, 2005 9:11:06 PM (W. Europe Daylight Time, UTC+02:00)    #  Comments [2]  | 
# Friday, August 12, 2005
RSS Bandit new logo design contest

As my various mails to some web designers does not had any real effect to get a new set of icons for the Next Generation User Interface of my favorite feed reader, I hope I will get more responses and comments by starting a design contest for a new logo of RSS Bandit now. Currently we use this one:
  Bandit-Logo.32x32.png

The application icon is just the smiley face simulating the point of the character "i". Some professional users complains about the "unprofessional" look of our logo (they associate a game or an app to play with) while there are also users that really like it.
So I just started with some new that get rid of the smiley face, as you can see some variants here:

v1.3.0.png
Variant 1
v1.3.1.png
Variant 2
v1.3.3.png
Variant 3
v1.3.4.jpgEric Var 2
Variant 1 and 2 Eric (Thanks to Eric Winchester)
v1.3.0.1.png
Variant 1a
v1.3.1.1.png
Variant 2a
v1.3.3.1.png
Variant 3a
http://www.wiredprairie.us/journal/2005/09/rss_bandit_logo_idea.html
Variant Aaron (thanks to Aaron)
  v1.3.1.2.png
Variant 2b
 smiley variant 1
Smiley Variant 1 (Thanks to Mark Allanson)
Ash.draft.1.gif
Variant Ash (Thanks to Ash)

So please vote in comments to this post, what you like or not. Send your own designs to my contact address or that at www.rssbandit.org, please. I will add them here for all to preview and vote.

Use the App Icon png found in post enclosure to create your own with the awsome smiley...

Update: as suggested I added variants; 2a with smiley and made the "RSS" a little bit more different in color than the background.

Update 2: 2b with smiley in foreground and removed "hands", and a new variant 3a for the one who liked that.

Update 3: variant 4 (Eric Winchester by mail) and Smiley variant 1 (Mark Allanson by mail to Dare Obasanjo aaaages ago ;-)

Update 4: more variants (Aaron by comment, Ash by mail)

Update 5: more variants  from Eric Winchester with the bandito-mask (by mail). Jake, I got your images but they are not much different than our own or that of Mark Allanson. I only post variants here that are interesting AND different in variations. But go on with other/more samples, please!

Voting results as of Oct 11th, 2005 (53 comments, final result):

3  0  11  6  4  0  0  16  3  1  0 
1a  2a  2b  3a  Eric 1  Eric 2  Aaron  Ash 

So the team will go with variant Eric 1 and we do really want to say thank you all that helped with pictures and votings! 

Technorati tags:
Friday, August 12, 2005 12:26:52 PM (W. Europe Daylight Time, UTC+02:00)    #  Comments [60]  |  Bandit-Logo.32x32.png (30.12 KB)
Navigation

Like RSS Bandit? Make a donation to help support its development and maintenance. As little as 1€ will help.

Make payments with PayPal - it's fast, free and secure!
On this page....
<January 2006>
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
2930311234

SUBSCRIBE RSS GeoURL e-mail

Search
Categories
Blogroll

newtelligence dasBlog 2.3.9074.18820

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Join WebHost4Life.com