# Saturday, 18 September 2010

A couple of days ago I became aware of the following article: Security Hack Exposes Forms Authentication in ASP.NET. That never sounds good and Microsoft swiftly crafted a workaround to mitigate the attack. It simply consists of changing your web.config and adding a file with some piece of code in it.

For ASP.NET 1.0 to 3.5 use this adjustment:

<configuration>        
   <system.web>
      <customErrors mode="On" defaultRedirect="~/error.html" />
   </system.web>       
</configuration>

For ASP.NET 3.5SP1 and 4.0 use this adjustment:

<configuration>
   <system.web>
     <customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/error.aspx" />
   </system.web>
</configuration>

You’ll also need to put that error.aspx page on your server with the following content:

VB version:

<%@ Page Language="VB" AutoEventWireup="true" %>
<%@ Import Namespace="System.Security.Cryptography" %>
<%@ Import Namespace="System.Threading" %>

<script runat="server">
    Sub Page_Load()
        Dim delay As Byte() = New Byte(0) {}
        Dim prng As RandomNumberGenerator = New RNGCryptoServiceProvider()
       
        prng.GetBytes(delay)
        Thread.Sleep(CType(delay(0), Integer))
       
        Dim disposable As IDisposable = TryCast(prng, IDisposable)
        If Not disposable Is Nothing Then
            disposable.Dispose()
        End If
    End Sub
</script>

<html>
<head runat="server">
    <title>Error</title>
</head>
<body>
    <div>
        Sorry - an error occured
    </div>
</body>
</html>

C version:

<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System.Security.Cryptography" %>
<%@ Import Namespace="System.Threading" %>

<script runat="server">
   void Page_Load() {
      byte[] delay = new byte[1];
      RandomNumberGenerator prng = new RNGCryptoServiceProvider();

      prng.GetBytes(delay);
      Thread.Sleep((int)delay[0]);
       
      IDisposable disposable = prng as IDisposable;
      if (disposable != null) { disposable.Dispose(); }
    }
</script>

<html>
<head runat="server">
    <title>Error</title>
</head>
<body>
    <div>
        An error occurred while processing your request.
    </div>
</body>
</html>

Grz, Kris.

Saturday, 18 September 2010 13:49:57 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [15]  | 
# Thursday, 16 September 2010

Just read on the Gu’s blog that the developer tools for Windows Phone 7 got released. That’s great news!

Unfortunately for my free time that means another technology stack to take a look at soon. If you’re interested here’s already some links to check out:

Grz, Kris.

Thursday, 16 September 2010 20:44:43 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

Play in a more beautiful web, explore Internet explorer 9 Beta. It’s great to see that Microsoft reveals its newest browser to the world.

There’s quite a lot of new and exciting stuff going on in IE9 like:

  • Streamlined design
  • Pinned sites (Windows 7)
  • Download manager
  • Enhanced tabs
  • A new tab page (with color coding for ease of use)
  • You can now search in the address bar
  • A new notification bar
  • An add-on performance advisor (which add-on makes your browser go slow?)

Grz, Kris.

Thursday, 16 September 2010 04:56:39 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Saturday, 11 September 2010

On Wednesday I performed a presentation about WebMatrix and its components: Razor syntax, the WebMatrix IDE, SQL CE and IIS Express. All great products created by Microsoft.

Here are the slides:

Grz, Kris.

Saturday, 11 September 2010 19:42:47 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Saturday, 21 August 2010

Microsoft released training material on how to create high performing application in Silverlight for their upcoming Phone 7. Check it out.

Grz, Kris.

Saturday, 21 August 2010 09:53:13 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, 19 August 2010

I subscribed today to attend Remix10 on September 28th. Last editions were always very interesting and when I take a look at the overview of what’s already known about the agenda, still some dev sessions need to be confirmed, it’s going to be great again this year as well.

I hope to see you there.

Grz, Kris.

Thursday, 19 August 2010 19:00:06 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [2]  | 
# Wednesday, 28 July 2010
In Belgium you can never be sure of the weather. It might be great, it might be too hot, it might be too rainy, …
Belgium | Course | MSDN | Tutorial
Wednesday, 28 July 2010 19:24:22 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, 27 July 2010

Today Microsoft released a new version of their MVC project. Still in preview but it looks promising, especially because the new view engine Razor got in it. Razor you say? That sounds familiar. And it should because it’s also a part which shipped with the WebMatrix stack. This’ll make it easier for people starting with WebMatrix to get on track with MVC 3 as well.

Be sure to read the following articles/announcements:

If you want the goods then download it here.

Grz, Kris.

Tuesday, 27 July 2010 19:30:21 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, 22 July 2010

Sometimes you just stumble upon something new that looks interesting. After a short vacation, too short, I was surfing the web, following twitter, … and ended up at a new page at MSDN: scriptjunkie{} Serious web development.

It’s a new place for people working with HTML, CSS and Script. I like it that Microsoft shows the love for these 3 quite essential parts of technology as most people became so dependent on them during the last years. In addition to that, after a reorganization on the ASP.NET forums there’s one dedicated to these 3 too: HTML, CSS and JavaScript.

Grz, Kris.

CSS | HTML | Javascript | MSDN | scriptjunkie
Thursday, 22 July 2010 18:58:58 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, 06 July 2010

Scott Guthrie has been blogging several days since last week about new cool things coming out soon: IIS Express, SQL Server Compact Edition & Razor. That means in that order: a follow up for Cassini, an equivalent for SQL Lite and a new cool viewengine which can be used in ASP.NET MVC.

But today there was something new which got it all together to make websites: WebMatrix.

Taken from the announcement at the ASP.NET forums:

WebMatrix includes a complete Web development stack that integrates a Web server (IIS Developer Express), database (Microsoft SQL Server Compact 4.0), programming model (ASP.NET Web pages with Razor syntax), and a tool (WebMatrix Beta) into a seamless experience.  You can use WebMatrix to streamline the way you create an ASP.NET Web site from templates, or by starting a new Web site by using the world’s most popular free and open source (ASP.NET or PHP) apps like DotNetNuke, Umbraco, WordPress, or Joomla!. With WebMatrix you can code your Web sites, customize them, optimize them for good search engine ranking, test them, and deploy them to an Internet hosting company, all through the tool.

Learn more about WebMatrix through:

For additional resources, visit:

I like the stapled blocks which form the logo of this new free tool:

webx-stack-gfx

 

And here’s an introduction video about it:

WebMatrix Video Player: Overview

 

If you want to play with it I say go! Razor’s pretty cool to play around with it and if you have question then there are 2 dedicated forums already available:

Over at forums.asp.net: http://forums.asp.net/1224.aspx.
Over at http://forums.iis.net/1166.aspx

Also be sure to read on Scott Guthries blog the announcement of WebMatrix.

The big question you might want to ask yourself now is, is this for me? And the answer would yes, it is. According to the Microsoft site:

WebMatrix is for developers, students, or just about anyone who just wants a small and simple way to build Web sites. Start coding, testing, and deploying your own Web sites without having to worry about configuring your own Web server, managing databases, or learning a lot of concepts. WebMatrix makes Web site development easy.

I would say: welcome to the (Web)Matrix! Be sure to take the right pill.

Grz, Kris.

Tuesday, 06 July 2010 21:07:33 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |