ASP.NET 2.0

Redesigning my website with the help of Expression Blend

I decided to completely redesign my website www.galasoft.ch (yes, it's about time, I know). For this process, I decided to inspire myself (loosely) from my good friend Robby Ingebretsen's site, which is both simple and beautiful. In order to get a better idea of what I want to reach, I decided to work like most web designers and to create a mockup first. Instead of creating a static picture, however, I used Expression Blend, a tool I am fairly proficient in, to create a WPF application demonstrating ......

Converting and customizing XAML to PNG with server-side WPF

One Tweet by Oliver Sturm (http://twitter.com/olivers) the other day got me to thinking. He was asking about the possibility to host graphics for a web site in XAML format, and the best way to render it. Currently, there are 3 possible ways that I know of to render XAML in a web browser Loading the XAML file directly in an IFRAME will trigger Windows Presentation Foundation on the client (if available). The IFRAME can be positioned in the page so the it "blends" with the HTML page. That's only for ......

Microsoft to add jQuery in Visual Studio: Why I think it's great

The news took the community by surprise and the reactions are overwhelmingly positive: Microsoft is going to ship jQuery with the ASP.NET MVC framework (very soon) and with Visual Studio (in a near future). For more details, ScottGu and Scott Hanselman are talking about that in a very complete way. I think it's great news on many levels. First, because I hear that jQuery is a great framework. I must admit I never used it, because I didn't do much web development lately (but I will get back to it ......

TweetMyPage V0.2 - Now with "from TweetMyPage" indicator

As soon as I had my info page online, I asked Twitter to accept TweetMyPage as a Twitter application, and to mark the messages posted with TweetMyPage with "from TweetMyPage". Note for developers: There is a form to fill on the Twitter API page. It's really fast, and one day later I got the answer that it was accepted. From now on, messages posted from TweetMyPage are marked as such: I got a couple of testers so far, and already got a few requests for additional features. I am now evaluating how ......

MIX08 Keynote (11)

WeatherBug

  • New Silverlight application running on Nokia
  • Cool app, "very easy to develop using Silverlight"

Scott Guthrie

  • Wrapping up and summarizing.

Time to have lunch!!

MIX08 Keynote (10)

Cirque du Soleil Use WPF application to track cast information Cirque du Soleil recruiting ScottGu for their shows. Good idea. "Come see the Man Who Never Sleeps". Scott Guthrie Performance for WPF videos and image handling MUCH better. Pretty cool Write custom effects in WPF and they are pushed to the hardward for acceleration. (for example ripples, shadows, etc...) Effects applied to controls during runtime, physics engine calculation, all pushed to hardware for better performance. All these included ......

Problems caused by concurrent asynchronous calls to web services

What's COMET? When an Internet Application needs to be updated regularly, the only possible choice is to use polling. The HTTP protocol makes it impossible to have the server "push" data to the client. The faster the client needs to be updated, the faster the poll must be. Of course, there are limits, for example due to the network speed, the load, etc. A possible alternative is known under the name COMET. (Note: COMET is usually used as an alternative to AJAX, and AJAX implies the use of JavaScript ......

MIX08 Keynote (9)

Scott Guthrie about Silverlight Silverlight controls developedby MSFT are shipped as Open Source! Devigner role officially mentioned in ScottGu's slides! Yes I do exist! Show off new SL 2 applications AOL Builds new AOL email client using Silverlight. Using IsolatedStorage much faster and more advanced than using the browser cache. Scott Guthrie Enable user experience that doesn't exist today. Deep zoom. Based on research project. Navigates through very large images by downloading only portions of ......

MIX08: Keynote (6)

Dean Hachamovitch (IE General Manager) IE8: Select an address, choose "Live map" from a context menu and get a Live Map view of the place. Web slices: User can subscribe to parts of a web page. Hover on a part of the site, icon shows up, select a "web slice" and subscribe.Displays a new bookmark, live view of the web page "extract". Beta 1 of IE8 available for developers after the keynote Scott Guthrie Quick peep of live Silverlight sites. 1.5 million installations of Silverlight per day, should ......

MIX08: Keynote (5)

Dean Hachamovitch (IE General Manager) CSS2.1. Demo in Firefox, Safari, looks the same. Opens in IE7 and it doesn't look the same.IE8 supposed to be the answer to that. First time showing IE8 to the public Focus on CSS and understanding standards the same way than developers are. Legacy web. Legacy pages developed for IE look bad in Firefox and in Safari. IE8 has a "Emulate IE7" button for legacy pages. In the future, IE8 should behave just like Firefox and Safari, at the risk of breaking legacy ......

MIX08: Keynote (4)

Ray Ozzie keynote: "Many amazing technologies available today, but I would like you to bet on us" Oh really? Scott Guthrie keynote: Just launched .NET 3,5, VS2008, IIS7, Windows Server 2008 Scott talks about the new features in ASP.NET 3.5, mentions LINQ IIS7 makes deployment and administration much better Dean Hachamovitch (IE General Manager) Introduces IE8 Cool T-shirt #Mix08 ......

MIX08: Keynote (3)

Ray Ozzie keynote: "Connected entertainment vision" Office offering: Desktop, Mobile and Web, all connected in a seamless experience. Office Live: Linking, sharing and tagging of documents for the social mesh. Connected business. CRM like MSFT Dynamics used by half a millions small firms worldwide. "Utility computing within the enterprise". Power of choice (again). XNA, .NET WPF, Silverlight, ASP.NET Expression Studio for designers Visual Studio for developers .NET in the middle of it all #Mix08 ......

MIX08: Random pieces of news (3)

Interesting concept for localizing Silverlight applications using a "resource" JavaScript file. Presented by Brad Abrams. Amazing set of new controls for Silverlight 2, including a datagrid. Where's the WPF-based one, Microsoft? Multiline textbox in Silverlight 2.0 (but you're not supposed to talk about it :) ASP.NET MVC framework for URL mapping. I think that ScottGu blogged about that before, something I definitely want to look into (when I'll have time, ah ah ah) Tim Sneath on WPF and Silverlight: ......

ReMix Zurich tomorrow

ReMix 07 Zurich I will be attending ReMix in Zurich tomorrow. This event will be specially interesting this year due to the presence of Scott Guthrie for the keynote and 2 presentations. I'll hear even more of Scott in the evening, at the DotMugs (.NET Managed User Group of Switzerland) where he will be speaking about ASP.NET and Orcas. I am very happy to hear Scott again, this will be the thrid time (after MIX06 and MIX07), and I sure hope I will have many more occasions ......

Porting to VS2008 / New WPF book / Pictures of Sicily

Porting to VS2008 I am working on a few ASP.NET projects I do privately, and had a small issue, which I couldn't debug in VS2005. I decided it was time to give a serious try to VS2008, so I converted most of my private ASP.NET projects to VS2008, and everything wen smoothly. I didn't take any risk, and I chose to continue using .NET 2.0 for these projects, so that only the IDE changes, but not the framework. After a very fast and painless conversion, finding the error was a breeze (I was having problems ......

Scott Guthrie talks about the future or ASP.NET and Orcas

The ReMix event was nice, well, not really comparable to Las Vegas, of course, but it was nice to see the demos again. For me, in fact, the real opportunity was rather to connect with other people interested in these technologies, and in this aspect it was really nice. I've been wanting to meet Ronnie Saurenmann (the guy behind the Zurich Airport XBAP and the "Outlook-like" WPF hands-on lab) for quite some time, I hope for the beginning of a nice collaboration. Of course the icing on the cake was ......

On the road to Silverlight: Download...

Now that my site has been cleaned up, I want to add Silverlight content to it soon. I blogged about my plans here, and first of all I need to download all the development environment. That also includes Orcas (Visual Studio 2007) which is currently still in Beta. I didn't install it before because Microsoft told us that it was a bad idea to install it on a non-virtual machine, and that uninstalling it was very difficult. Since the last Beta 1 version, however, things are better and I have been told ......

Mobile blogging with my RealSimpleBlog ASP.NET control

OK, it seems to work rather well! We're now in Penang, and I am able to post pictures and blog entries. One very small problem only: The hotel sure has wireless network in the lobby, but you can only use it if you connect from the (wired) connection in your room first... So for me it's totally useless, as I didn't take my laptop but only my PDA. There are solutions: going to the internet cafe downstairs, or using the wireless access at Starbucks, but it's all a little less convenient than planned. ......

All ready to go... RealSimpleBlog control, Integration in PhotoAlbum

We're flying to Malaysia tomorrow... no wait... today (12.07.2006) after noon. And I managed to reach my goal, which was to integrate the RealSimpleBlog control V0.1 in my PhotoAlbum. Here are the features: I can edit blog entries (XML files) on my LifeDrive (Palm OS PDA), and then FTP them to my server. The entries are rendered by the control on the PhotoAlbum's main page. I can FTP pictures to a folder on my server. Another control I wrote creates a tabular view of the pictures' thumbnails. Actually, ......

Back to ASP.NET this week / Silverlight plans / Chinese plans

ASP.NET: Updating RealSimpleBlog I decided to make an update (V0.5) to my RealSimpleBlog control. This control is used to display blog entries integrated in an existing webpage, without having to install a heavy infrastructure. Since it's a control, and not a framework like other existing blogging systems, it doesn't disrupt existing pages and integrates seamlessly without needing a lot of administration. To be fair, the control is still in an early stage, and I don't feel that I can distribute it ......

Another breaking change in ASP.NET 2.0: Session.SessionID

I only recently became aware of another breaking change in ASP.NET 2.0: In order to optimize session state management, some changes have been implemented. One of the most puzzling ones when you're not aware of it can be reproduced as follows: In ASP.NET 1.1, create a new web application. Add a label to the page, name it lblSessionID. <asp:Label Runat="server" ID="lblSessionID" /> In the code behind, add the following code in the "Page_Load" method: protected void Page_Load(object sender, EventArgs ......

JavaScript code minimizer (not obfuscator!)

A few years ago, I translated Douglas Crockford's JsMin from C to C#, because we wanted to use this functionality in our build process. JsMin is a code minimizer for JavaScript. It will remove all comments, empty lines, turn tabs into single spaces, etc... The goal is to reduce the size of JavaScript files to the minimum necessary, without modifying the functionality. Additionally to reducing the script's size, JsMin also makes it more difficult to read, however it is not an obfuscator. Objects, ......

Happy new MVP year!

First of all, Happy new year. I am not really into the whole new year celebration, and I most certainly don't think that just because a digit gets changed in an arbitrary number, suddenly there will be no more wars, no more tragical events, no more hunger... So it's a bit hard for me to get in the celebration craze, and we spent a quiet evening. Nonetheless, happy new year to all readers and may next year bring you and your families what you all wish :-) Today, to start the year, I had a nice surprise ......

RealSimpleBlog features description, first draft

I just published the features description document (first draft) for my RealSimpleBlog control. After having published V0.4, which corrected quite a few bugs and added new functionalities, I needed to take a small break from code, and to take a step back to think of the next version. The result of these thoughts is compiled in the (incomplete) features description, and in the list of bugs and enhancements after V0.4. The major enhancement in that next version is going to allow me to use the RealSimpleBlog ......

PhotoAlbum V1.12.2 released

I published V1.12.2 of the PhotoAlbum web application yesterday. Even though my "daytime job" took me quite a lot of time and energy lately (without even mentioning the kids ;-), it's been quite a major release, with a lot of bugs and enhancements. Thumbnailed view More screenshots here and here. I am especially happy to have unified the way all the controls on the page react, by implementing common functionalities in a base class. For example, each control is able to extract its embedded files (JavaScript, ......

WPF: SessionID management with CookieContainer

Following this post, I succeeded in adding cookie management to my latest WPF prototype. Cookie management in WPF and in WinForms applications is needed when you use a stateful web service, which uses HttpSessionState to store data about the current Session. When a web method is marked with the EnableSession parameter, the web service's Session property is set (otherwise it is null). However, the client must provide a way to store the cookie in which the SessionID (a unique string identifying the ......

Session management in Web services: The power of Global

Following this post, I found it necessary to study more in detail the session management in ASP.NET web service applications. For quite some time I was very puzzled, because even the simpler tests would fail miserably, and a different SessionID would be returned on every call. In order to solve that problem, I got back to the roots. First, I developed a ASP.NET 1.1 web service, and tested a web method in a web browser, using the asmx URL. This returns a test page with useful information about the ......

A simple AJAX service using Plain Old XML (POX), Part 1: Server-side implementation

I posted on my website an article showing in detail how to use an ASHX generic HTTP handler to answer simple AJAX requests. This is itended as an answer to many questions on various newsgroups I visit, asking how to use web services to perform simple tasks. In many cases, using SOAP based web services is overkill, and it's much easier and faster to use AJAX with plain old XML (POX) as a transport medium. It has actually become even easier with ASP.NET 2.0 and the ASHX handler, which allows lightweight ......

Malaysia and Singapore pictures clean-up (ASP.NET PhotoAlbum)

I cleaned up and reposted the Malaysia and Singapore pictures from this summer. Before that I had to correct a few small bugs in my RealSimpleBlog custom control, which is now in version V0.2.2. It's a work in progress, which eventually will allow the user to place a blog-like content on any webpage he wants. Most existing systems nowadays are fullblown blog applications, and are more difficult to integrate smoothly in existing websites. The pictures page display the pictures interpersed with the ......

Using C# generics to extract enumerated flags from a numeric value

I posted a new page on my site, demonstrating how to use generics to extract enumerated flag values from an integer value in a generic way. I wrote this utility class, because I wanted a way to execute actions on the server using a URL query parameter sent from the client. Until now, when I wanted to execute an action, I was using a URL like: http://www.galasoft-lb.ch/m... Then I was mapping the value 3 to an enum value, and would execute the corresponding action before rendering ......

Technical blogs and newsgroups I read

A colleague asked me what blogs I read, and I thought it would be interesting to blog about that ;-) My main activities in programming in the moment are .NET, especially ASP.NET, and WPF. ASP.NET also includes a lot of JavaScript programming, which was always one of my favourite subjects anyway. About JavaScript, I don't read blogs, but I can recommend the newsgroup comp.lang.javascript. I learned most of my JavaScript there over the years, and though the tone is sometimes passionate over what may ......

Converting a ASP.NET 2.0 Website to a Web Application Project

Version 1.12 of my PhotoAlbum web application was built using the "New website" menu in Visual Studio 2005. This creates a website project, which I was curious to try, as I didn't have any experience with it. I come from ASP.NET 1.1, where the model is very different. For example, you precompile the website before deploying it (in ASP.NET 2.0, it's not compulsory; you can deploy the ASPX files together with the CS files and it is compiled on demand). Also, in ASP.NET 1.1, you have total control on ......

GalaSoftLb.Web.PhotoAlbum: V1.13 planning

I published V1.12 of the PhotoAlbum web application last week. Now is time for some planning, and preparing the next version. Since the PhotoAlbum uses other controls and utilities, I will coordinate all the versions and release them together with the PhotoAlbum's next version. The next PhotoAlbum release will be V1.13. I think that the one after that will be labeled V2, because most of the old code and the old structures will have been replaced by then. However it's not 100% sure yet. Together with ......

PhotoAlbum V1.12

I just published an important step towards V2 of my PhotoAlbum. Compared to the version I published on the 29th of August, there are no big functionality changes, except that it's now possible to add legends to the rotating headers on top of the main page, and to cycle through them using a "Next header" link. I will pack the code and make a custom control with it, to make it easier to add to a page (not that it's difficult now anyway). However, I made very big changes to the folder structure in the ......

PhotoAlbum works

I published yesterday a new version of my PhotoAlbum. This is the web application (running on ASP.NET 2,0) in which I experiment technologies which I find interesting in the moment. It's also my journal andmy pictures' gallery. During the holidays, I used this platform to post pictures and blog entries daily from Malaysia/Singapore, using two custom control I had developed for the occasion: RealSimpleBlog and Thumbnails. RealSimpleBlog is a control which is able to read XML files in a directory, ......

Excel integration in (ASP).NET using OleDb

Most of my private programming time lately has been invested in my PhotoAlbum's new version, in which I implement bug corrections and prio 1 improvements over the version I used during the last holidays in Asia. I will publish that version soon together with a list of improvements. One important feature (or so I thought) is the ability to import the content of an Excel file into the XML files I use in the PhotoAlbum system. I use an Excel file as main repository for all my pictures' information, ......

(Possibly breaking) change in ASP.NET 2.0

A colleague of mine made a comment to me last week that led me to a discovery: ASP.NET has a major change of behaviour, which might be breaking existing application: When a directory located under the web application root is deleted, all existing sessions are terminated, and the application ends. Why could that be breaking existing applications? Well, in theory, web applications should be stateless. However, it's very difficult to do more than very simple web apps without saving at least some information ......

Mobile blogging now from Singapore

We left Penang this morning and are now in Singapore. I posted a lot more pictures in my PhotoAlbum, and practice showed a few fields for improvement: The file structure is too complex. I should be able to post all files in one folder, and if needed, the application should dispatch the files in the corresponding folder. When I FTP from my PDA, changing folders takes too long time. I forgot that the PDA uses linefeed only as line break, when the server uses carriage return-line feed (rookie mistake, ......

RealSimpleBlog custom control (V0.1): Style sets and Integration

I didn't write for some time about my RealSimpleBlog control because I was quite busy with other subjects (WPF mostly). However, I am making nice progresses, and I think I can say without too many risks that the integration in my PhotoAlbum will be ready before we fly to Malaysia on wednesday. Actually, I also integrated the control on my main page, and if you select this link, you will see it in action! I also set the page up to generate a static HTML file on demand, so the old address is still ......

RealSimpleBlog custom control (V0.1): Day 6

After a day-long hiking in the mountains of Appenzell with my 2 daughters and my sister, including a refreshing short swim in a cold mountain lake, it's very tired that I finished implementing the Priority 1 requirements of my RealSimpleBlog control. The last element missing was a thumbnails banner, i.e. a row of 1..n thumbnails and possibly some HTML formatted text following. Typically, I use this in my PhotoAlbum to illustrate some text with a few small pictures, and add a "More..." link leading ......

RealSimpleBlog custom control (V0.1): Day 5

I reached my goal for today, which was to implement the Image element. So now my blog control can display: Date, Title, Text, Frame, List, Image. The last one I still need to write is a small element displaying a thumbnail banner. Since thumbnails are made actually images, I can reuse my method, so it should be fast. I reworked the XSD schema, because the Image element was really too simple in the last version. I extended it with a Link, a Target for the link, and a ALT attribute, which is also used ......

QuickNews and AvantGo

I spent yesterday's evening working on the other project occupying me in the moment, which will link QuickNews to AvantGo (two Palm OS programs which one can use to read RSS feeds). How to link them? Well, QuickNews is very good because it's fast, efficient and to the point. However, it doesn't render HTML, it cannot follow links, so sometimes it's just too short. AvantGo, on the other hand, is a HTML compliant reader, can follow links, can be used to browser online or offline (you have to synchronize ......

RealSimpleBlog custom control (V0.1): Day 4

Nice job this weekend. I moved forward a lot, implemented major features, tested most of them pretty extensively, thought about the future, and learned new things. So far, the features implemented are: Date, Title, Text, Frame, List. Features not implemented yet are: Images, Thumbnails. That should follow soon. Another important feature implemented: Each entry has an attribute "archive-older". If this attribute is set to "true", no older entries will be displayed after the current one. However, if ......

RealSimpleBlog custom control (V0.1): Day 3

I did quite a lot of work yesterday, implementing the following elements: Title, Paragraphs, Frames. One feature I like in the control is that you can write big chunks of texts without having to care about formatting the text: the control will automatically insert <br /> and <div> elements to separate the text in smaller chunks. All you have to do is insert one carriage return, or two carriage returns. That will speed up text input. By the way, what I used to call V1 will actually be ......

RealSimpleBlog custom control (V1): Day 2

I spent an exciting evening yesterday starting to work on my RealSimpleBlog control. As usual when programming really starts, a few question arose, but mostly everything was very clear in my mind, thanks to the simple, but complete list of requirements I intend to implement before we go in holidays. That proves once again that even in a one-man team, even when programming private projects, even just as a hobby, a few simple rules help to be more efficient and to write better code. Off the top of ......

RealSimpleBlog custom control (V1): Day 1

I started writing my RealSimpleBlog control yesterday. The goal is to have V1 up and running by July 12th, which is the date we're flying off to Malaysia for 3 weeks holidays. I plan to integrate the control in my PhotoAlbum, and to blog on that page while I am away. That will provide a nice test for the concept. V1 will be pretty basic, considering I'll have only 3 weeks to implement it. But it will be the basis for future development, and I am pretty excited about it. RealSimpleBlog V1 Requirements ......