Archive for category ASP.Net
Learning Windows Azure
Posted by Richard in ASP.Net, Azure, Development, Programming, Software on March 12, 2009
I started to learn how to use the Azure Cloud Service from Microsoft this week. Currently it’s still in Tech Preview stage. Unfortunately you can tell that from the SDK documentation.
Here’s some useful links to get you going:
- Screencasts: http://msdn.microsoft.com/en-us/azure/dd439432.aspx
These are quite basic, but trust me, you need them to be basic to get you started. - SDK: http://www.microsoft.com/downloads/details.aspx?FamilyID=80e3eabf-0507-4560-aeb6-d31e9a70a0a6&displaylang=en
Contains CHTM-style documentation, tools and samples. Don’t expect too much from the docs; they explain enough to get you confused, and then have an API reference. You need to unzip the samples and get into them to start understanding how everything fits together. - Visual Studio Templates: http://www.microsoft.com/downloads/details.aspx?FamilyID=8e90b639-1ef0-4e21-bb73-fc22662911bc&displaylang=en
This gives you a set of project and item templates which you can use to create and publish Azure applications. Don’t worry about the extra projects it adds to a solution, or the config files. You will learn more about them later. - The Azure developer center on MSDN: http://msdn.microsoft.com/en-us/azure/default.aspx
Assuming you already registered for Azure, that’s all you really need to get started.
The biggest problem I found at first was deploying an app. Once you have generated an Azure project in Visual Studio, you expect to be able to publish it from Visual Studio too. Unfortunately you can’t, and it takes a little more effort. I’ll write more about that in another post.
I also needed help trying to understand what to focus on to get started. So here’s a big tip: Ignore .Net Services, Live Services, and SQL Data Services. They aren’t part of Azure per se. You can come back to them later. First you just need a hosted project and some storage – either blob storage or table storage. (There’s also queue storage, but I bet no one will want to use that straight away – it’s for tying two apps together, which no one will want to do at first.)
I recommend you download the SDK and the Visual Studio templates, create yourself a “Web Role” project (which is really the equivalent of an ASP.Net project), and work on that. Then move onto table and blob storage. You can use the screencasts to help you.
Good luck getting started!
The Value of Being Free to See the Source
Posted by Richard in ASP.Net, Visual Studio on April 18, 2008
Since the source code to ASP.Net was made available, I’ve been using it extensively. Here’s a great example of why it’s so valuable.
I’ve been trying to integrate the Enterprise Library 3.1 Exception Handling Block into my application. My application is split into a core and web UI specific components, so I’ve defined errors in my code to be thrown when a resource is not available. The web application configuration file specifies that if a specific exception, e.g. a ResourceNotFoundException, is thrown, the Exception Handling Block should replace that exception with a 404 Resource Not Found error using Http. That should in turn use the CustomErrors feature to redirect to a 404 not found page.
Makes sense, and sounds simple, don’t you think?
Nothing in the docs says that it shouldn’t work.
But it doesn’t. It simply won’t work. Why? Well, there’s nothing on the web. But after spending some serious hours digging through the source code, I can finally see why.
Here’s a lovely little hidden-to-the-world snippet of the code I got inside of Visual Studio:
code = HttpException.GetHttpCodeForException(e); // Don't raise event for 404. See VSWhidbey 124147. if (code != 404) { WebBaseEvent.RaiseRuntimeError(e, this); }
Nice of them to let me know.
Mix 08 Online Presentations
My favorite conference is about to start: MIX 08.
It’s a great conference for Microsoft developers with an interest in the web. Last year they had some great talks about user experience and architecture. There’s always something interesting to learn.
Unfortunately I can’t be there (as usual), but all the sessions will be online. Tim Sneath just posted details of where and when you can watch them:
- The keynote with Ray Ozzie, Scott Guthrie will be available live at 9:30am Pacific / 5:30pm GMT on three streams: 750kbps, 300kbps, 100kbps.
- The breakout sessions and panels will be online within 24 hours of each session at MIX08 sessions.
Start Learning Silverlight 2.0 Now
Posted by Richard in .Net, ASP.Net, Silverlight on February 22, 2008
Now this is exciting. (Well, if you’re a geek.)
Silverlight 2.0 is on its way, and Scott Guthrie has posted 8 tutorials about using it.
I’m off to read them now…
The LinqDataSource and the Hidden Viewstate
Posted by Richard in .Net, ASP.Net, C# 3.0, Development, LINQ, Programming, Quaility, Software, Visual Studio on February 21, 2008
Yesterday I thought I’d learn about the LinqDataSource in ASP.Net 3.5, and got an interesting surprise.
The new LinqDataSource can also be used with a LINQ-to-SQL model to perform updates. You simply add the DataSource to your page, set the table name, and set EnableUpdate to true. Then, using a standard DataControl, you can make updates to your data entities.
The question is, how does this work? It appears to be a bit magical. Read the rest of this entry »
My own ASP.Net MVP Framework
So, I did it! I finally did it!
I wanted to publish my ideas for a framework, and I did. You can find it on CodePlex at http://www.codeplex.com/aspnetmvp.
Go have a look. I really want to know what you think.
ASP.Net MVC Corollary – What to do?
Dude! I got quoted! And by none other than Rob Conery of SubSonic fame.
It seems like my last post caused quite an unexpected stir. Thanks to both Rob and Scott for taking the time to answer me. I really appreciate it.
Read the rest of this entry »
.Net Source Code Now Available
Posted by Richard in .Net, ASP.Net, Software, Visual Studio on January 17, 2008
Scott Guthrie has just announced that the source code for the .Net framework has just been made available for reference use.
It will be particularly useful to see how the controls in ASP.Net and Windows Forms have been done.
Detailed instructions for how to set it up are here.
One caveat: it’s not available for the Express editions of Visual Studio. Shame! I was just starting to have some fun with them too.

