ASP.NET

ASP.NET Column based Profile Provider

Some of my colleagues are often reluctant to use ASP.NET 2.0 profile provider to store profile data for their web applications. The main reason for this is the fact that the default SqlProfileProvider that ships with ASP.NET 2.0 “blobicizes” Profile data using string, XML or binary serialization prior to storing information in SQL Server. This obviously puts a rather large overhead when you need to query your profile data. What most developers aren’t aware though is that you can build your own custom profile provider to store Profile data “in the clear” in the database so that the data...

WebMatrix is here

I’ve been involved for quite some time now with a new Microsoft project codenamed “WebMatrix” but couldn’t say anything about it since all the info was under NDA. Today though, the public availability of the Microsoft WebMatrix Beta was announced, so I guess I’m no longer bound by the NDA agreement and can let you in on a few things. So first let me clarify a few things, and to do that I’m going to use an excellent explanation from David Ebbo’s blog. WebMatrix: a stack and a tool Let’s start with WebMatrix.  The term is actually...

MetaCMS V2

I briefly got the chance to talk about MetaCMS, the content management system and e-shop platform I’ve designed and built, a while back. Since then a lot of sites have been built using it. Some of which (the biggest ones) include: www.nooz.gr (former www.flash.gr) ...

ASP.NET Tips and Tricks

I’m starting a new line of blog posts in which I’m going to give out a few tips and tricks I’ve picked up during the past years. I’m going to start with one of the most common mistakes I often face when reading code. To demonstrate that, I’m going to use LinqToSQL as my data access method (although the problem can be found in any kind of Data access technology) and use the the same model I used in my earlier Caching series. As you can see the model is very simple and contains just three entities, a Peson, its Phones and...

Linq To SQL Caching Adventures Part 2

Before picking up where I left off yesterday, I have to first make a small disclaimer. I received a couple of comments stating that the caching solution I presented wasn’t that sophisticated or complete or that the cache keys that I’ve used were not the right and the answer is of course “yes”. The solution I presented was far from perfect but it served well as a simplified demonstration of the problems one might face when caching Linq to SQL entities. Ok now that we’re done with the typicalities let’s see what was wrong with the solution shown earlier. To demonstrate...

Linq To SQL Caching Adventures Part 1

A caching solution is always necessary if you want to build scalable applications which will handle lots of users and heavy data access without requiring more hardware resources. I’ve already talked about caching when using Entity Framework, but is there a way to use caching in Linq to SQL and what are the problems one might face. To explore caching in Linq to SQL I’ve built a small web site that had a single page. This page used Linq To SQL to access the AdventureWorks sample Database which you can download from Codeplex. The very simple Linq To SQL model that...

MetaCMS first web site goes public

So it’s time for me to reveal what I’ve been up to for the past 6 months. As some of you may already know, I moved to a new start up company about six months ago, called Metadata (I know the site isn’t quite ready yet, but we focused on the product instead of the site), where I was assigned the task of designing and building a solution for Content Management. The company business strategy required a product that would satisfy the needs of every possible client ranging from small companies that need simple websites to large news portal organizations...

Dynamically loading user controls

There are many occasions (at least so I’ve discovered) were you need to re-use user controls that you’ve created. A solution in those cases would be to convert your user control to a custom control, compile it into an assembly which is then going to be shared to all projects needed. The problem is, that you can’t easily convert a user control to a custom control cause you have to write all that render html methods to render exactly as the user control looks like. An alternative that I find pretty handy in cases like that, is moving the user...

Charting Controls

Most of the people I meet have this idea that they have to either buy or find an open source third party component, or (even worse) use flash, when it comes to drawing graphs for a web application or site. So I’m guessing that most people don’t know that the Data Visualization Group within the SQL Server Reporting Services Team has created stand-alone ASP.NET and Windows Forms Chart Controls for the .NET Framework 3.5 and Visual Studio 2008, similar to what has been already available as built-in chart functionality in SQL Server Reporting Services 2008. There are...

Building the Web.Next Now

Yesterday I had the opportunity to speak in front of a large audience about Microsoft's Live Services, available to developers, in a Microsoft hosted event called "The Next Web Now". Although I had to write this presentation twice, as I lost my first one with my stolen laptop, and had to prepare the second one in just a few hours, I was glad to do it as I always enjoy speaking and communicating with other developers. In general I believe it went well, even with all the computer related problems Panos' laptop had ;-). The event's sessions were video recorded so they're...

Day2 at TechEd Barcelona

Tuesday, Day 2 of TechEd Barcelona, couldn't start better. After having probably the best breakfast ever at Hilton (the hotel I'm staying), I walked the 100 meters that separate my hotel from the convention center to get there. Unfortunately I was a bit late so I've decided to skip the first session I'd planned to attend and catch up with my emails and blogs before heading to the ASP.NET ask the expert booth for my second day of duty. Being there from 10.00 a.m. to 1.00 p.m. gave the opportunity to meet and discuss with some very...

.Net Framework 3.5 breaks ASP.NET 2.0 web sites!

I'm one of those that have already installed and use Visual Studio 2008 beta side by side with Visual Studio 2005 on a machine and without any serious problems so far I might add. As you may already know .NET Framework 3.5 gets installed together with the new studio, so my machine contains that too (which is cool by the way, linq, Expressions, lamdas etc are probably the next big leap on programming languages). Yesterday though, while trying to compile a .Net 2.0 web site I've stumbled across the following exception: The base class includes the field 'InformationTBody', but...

Building Facebook applications

My friend Panos wrote today about Nikhil Kothari's Facebook.Net framework (hosted at Codeplex) as well as Steve Trefethen's starter kit as various tools you could use to develop Facebook applications using .Net. I'd like to add to those The Facebook developer toolkit that evolved from the Microsoft - Facebook partnership. Although this download comes from the Microsoft Visual Studio Express Editions product line (as you may notice) nothing stops you from using it with Visual Studio. Furthermore (if you're willing to play with cutting edge technology ;-) you could give Popfly's Facebook blocks (which are products of the same...

Silverlight Nuggets

I rarely have the time to read a 10 page article or watch a full length Webcast, I usually prefer nuggets when I want to discover new technologies and explore hot developer topics since they only last 10-15 minutes. So if you're into Silverlight here's a list of nuggets so that you can catch up: Silverlight Streaming : Silverlight Streaming is a hosted service at http://streaming.live.com/ which provides developers and content creators the ability to host Silverlight content on ... Silverlight - Linking Silverlight and ASP.NET Projects : With Silverlight Tools for Visual Studio 2008 it is possible...

Preparing for vacation

As always this time of year I begun thinking on all the things I want to read, listen, view and code during my summer vacation free time, even though I never get the chance to do all the things I plan to ;-). So I've already bought my PSP extra memory (2GB) and plan to fill it with podcasts, webcasts and videos so I can watch on my free time. Technologies and products that I'm especially interested this summer include : Silverlight, WPF, WCF, Visual Studio 2008, Astoria, Jasper, Linq, .Net 3.5, C# 3.0 etc. I've already begun searching for those but...

Building applications using Live technologies

If your interested in incorporating all or some of the new cool Windows Live technologies in your web site then you'll find Windows Live Quick Applications very useful. Currently there are two samples available Contoso Bicycle Club (code) which Connects membership organizations with the content, information and communities they care about using Rich media experiences, Sharing and storage, Communication, Find and locate (maps) Windows Live Technologies. and Contoso University (code) which is intended as a University sponsored site for students and staff to connect with the university events and social organizations. This demo uses quite a few cool things, like the Contacts...

Putting it all together (ASP.Net, Ajax and Silverlight)

I know that many of you will argue on the need to put all these technologies to work together, after all they are intended for different sides of the Internet cloud (ASP.net on the server, Ajax on the server & client and silverlight on the client). My experience though has shown that nothing is carved in stone when it comes to software development. Imagine for example that you have a nice GridView control (ASP.NET) containing data that you need to update without refreshing the whole page (Ajax) and at the same time display a nice graph of these data using an...

Local vs. Global Web Form Viewstate

In ASP.NET, as you may already know, you can set most of the Page Directives at the web.config Pages section if you need these directives to apply to all pages contained in your Web application. So setting EnableViewState to false, for example, in web.config's Pages section means that none of your page will use ViewState to persist state for its controls. So "what happens if I have an exception, a page that needs viewstate" you might ask. In most of the cases setting the corresponding directive's value at the Page declaration normally overrides the global web.config one, but that's not the...

Innovation Day Intrview video

As promised I've created a silverlight video of my interview at Microsft's innovation day event. I've used clackerzone's super Live Writer addin that enables you to encode (uses Expression Media Encoder) and upload your video directly from Windows Live Writer with a few simple steps. var livewriterapp0Wrapper = document.getElementById("livewriterapp0Wrapper"); CreateSilverlight(); Enjoy...

Solving the Sys not defined issue on IIS7

This week I had to install a couple of web applications that used Microsoft Ajax on ISS7 for the Innovation Day event. Unfortunately there were some backwards compatibility issues that made me use the backwards compatible Asp.Net application pool and not the new default app pool. Although the web apps loaded ok I kept getting a Sys not defined javascript error and as you can probably guess (Sys is the root namespace for Ajax javascript libraries) there was no Ajax behavior on these apps. After investigating for a while it turned out that if you're planning to use IIS7 to...

Microsoft Innovation Day

 I've spoken a couple of times about innovation in Greece and I'm glad when I see other people talking about it too. So when I was invited to show all the things we're building at www.dol.gr at Microsft's Innovation Day, I was thrilled. Luckily there was WiFi netwrok availableso here are some snapshots from the event. Stay tunned more will come later...     Special thanks to Panos for the pictures

Silverlight ongoing list of resources

  For those of you interested in finding out what silverlight really is as well as develop silverlight applications... bits & bytes Get silverlight Telerik RadControls – 3d virtual rooms using control based framework DLR & IronPython Silverlight developer reference “poster” Forums – installation, troubleshooting Electric rain harmony (coming summer 2007) – flash to silverlight converter Silverlight 1.0 Beta QuickStarts Silverlight 1.1 Alpha QuickStarts Silverlight 1.0 QuickStart Using Blend 2: http://go.microsoft.com/fwlink/?LinkId=93839 New Silverlight Online Documentation: http://go.microsoft.com/fwlink/?LinkId=88945 New sites Main Microsoft site.  Community site.  Mix conference experiences & demos Getting started with silverlight - Scott Guthrie demos how to build an app from scratch "How Do...

Silverlight demo applications

Having been to Mix06 I knew that there were going to be a lot of cool things coming out this year too. So I've been following closely Mix07, although I didn't manage to go this year and I must say that I'm pretty excited with all the things announced (although some were expected ;-) ). One of the coolest demos I've seen so far is the Silverlight Airlines application posted by David Anson. I just hope that it will work for Europe as well as USA soon. Check it out.

SilverLight Rad Controls

When I did my presentation on WPF/e (SilverLight) a few weeks back everyone kept asking about the tools and the controls they could use in order to develop silverlight applications. Unfortunately at the time there realy wasn't anything ready they could use, so I kept saying that in the future control vendors will startpublishing tools for it. Thankfully control vendors are indeed starting to build software (tools - controls) to support SilverLight, Telerik leading with its RadControls (Button, Cube, Media & StripLayoutPanel). At least next time I will have some examples to give when presenting ;-).

Finally its gone Live

Finally the project I've been working for the last year has gone Live. The project had to do with the semi-automatic digitizing of newspapers and magazines from their raw form (PDF or postscript files) into rich fully decomposed digital content and the creation of new services that would consume this content. Two of these services have gone live, specifically www.tanea.gr and http://digital.tanea.gr, but more are going to go live soon. I feel congats are appropriate to everyone that participated in the project. As for the future services I really can't say more, except that the engine is so powerful and the content so...

Live the web build the web season 2 videos

As promised, I'm publishing 1.3 minutes (I couldn't post more as they get pretty large pretty quick) of video footage from each developer session (sorry Marios I didn't have enough tape to get your session too, I promise I will be more prepared next time) of the Live the web developer's day event. Web 2.0: Breaking news session part 1 and part2 WPF/E: Impress the Web session part 1 and part 2 AJAX-enabled sites? Piece of cake! session part 1 and part 2 Enjoy!

First Presentation Impressions & Resources

For those interested on how did my first presentation go, it went really well despite my initial stress and nervousness. I really enjoyed it and now can't wait till the next time I'll be given the opportunity to speak in front of an audience ;-).You can find out what I talked about by downloading my presentation slides and demo source code (which includes the video ;-)).I'm also going to post some video parts of the presentations (yes I had my camera with me but run out of film) when I find time to download and encode them from my camera (Panos is also in ;-)).

WOW Week

Several events occurred this week making it a truly WOW week: Microsoft’s much awaited, new operating system, Windows Vista, was finally launched. British Library published a great WPF application that presents old historical books. The user experience is so rich that you think you’re actually holding the book. I think I had already seen a demo of this app on Mix06, but nothing compares with the real thing. A few days after the final release of Microsoft’s Ajax library, MS opened up its Source Code under the Microsoft Reference License (Ms-RL). Microsoft released a new version of its browser enhancement module that enables browsers to...

New Microsoft Anti-Cross Site Scripting library published

The Microsoft Anti-Cross Site Scripting library is an encoding library designed to protect ASP.NET applications from cross-site scripting (XSS) attacks. This library differs from other encoding libraries in that it uses the the principle of inclusions technique to provide a high degree of protection against XSS attacks. For those of you that build Web Applications this is a library that should always be used.

Build Web Application with no Html knowledge!

Over the years I’ve seen and/or participated on quite a few interesting projects but VisualWebGui is probably the best work I’ve ever came across. VisualWebGui is a project that tries to unify the development model of Web and Windows Forms development. So with VisualWebGui you can create a new project, design forms like you would have done for any windows forms application and run it on the web. The Guy or guys behind this (I still haven’t found any references on who’s behind this) have made most of the window form controls not only...

When everything else fails blame the spammer!

Recently I came to realize the real threat spammers pose to the Internet community. After trying for two days (30 hours) to find out why a web application, that was up to recently flawless, was not responding on a non deterministic basis, I discovered (the hard way) that it had been exploited by spammers, in order to send their emails. Sending thousands of emails each day the spammers have actually accomplished a DOS (Denial of service) attack on it. So what’s the lessons learned here… a)      Design your web applications having security always (I don’t...

Personal Web Starter Kit Bug

Microsoft's personal web starter kit, included in Visual Studio 2005, contains two small bugs. Issue 1: In the photos administration page the ObjectDataSource used for the CRUD (CreateRemoveUpdateDelete) operations does not provide any parameter declarations for the update and delete functions. Thus when trying to update or delete a photo you get an exception saying that the method call requires a parameter that's not provided.<asp:ObjectDataSource ID="ObjectDataSource1" Runat="server" TypeName="PhotoManager" SelectMethod="GetPhotos" InsertMethod="AddPhoto" DeleteMethod="RemovePhoto" UpdateMethod="EditPhoto" >  <SelectParameters>    <asp:QueryStringParameter Name="AlbumID" Type="Int32" QueryStringField="AlbumID" />  SelectParameters>  <InsertParameters>    <asp:QueryStringParameter Name="AlbumID" Type="Int32" QueryStringField="AlbumID" />  InsertParameters>asp:ObjectDataSource>Issue 2: If you install the database backend by running the script...

Intuitive Microsoft Exception Messages...

I’m developing a web application which takes advantage of Microsoft Enterprise Library’s Logging block to log Errors in a custom sink I’ve developed. Now in order to log unhandled exceptions I’ve hooked on the Application_Error event of the HttpApplication object, the code looks something like that: void application_Error(object sender, EventArgs e) {   HttpApplication app = (HttpApplication)sender;   Exception error = app.Server.GetLastError();   if (error != null)   {     LogEntry errorEntry = new LogEntry();     errorEntry.Title = error.Message;     errorEntry.Categories.Add("General");     errorEntry.EventId = (int)(LoggingErrorCodes.Unhandled_Error);     errorEntry.Severity = System.Diagnostics.TraceEventType.Error;     errorEntry.ExtendedProperties.Add("CallStack", error.StackTrace);     Logger.Write(errorEntry);     app.Server.ClearError();   } } So far so good, when I run the application though, I...