As the second part of this series, I’ll look at building a website that can use the MySql Membership Provider. This is one of the main hang-ups I’ve run into while porting one of my ASP.NET applications to Mono. With the latest MySql Connector, this turns out to be a very easy thing to do. It’s nearly as simple as setting up your web.config with the correct parameters and getting the right connector version.
Read more…
nathan ASP.Net Configuration Tool, Membership, Mono, MySql, MySql.Web
I thought I’d share a couple photos I took recently for fun.
Read more…
nathan Off-Topic cold, halo, moon, night, ring, space
I’ve always kept an eye on the Mono project, mostly out of curiosity and intrigue. The last time I played around with Mono it was at version 2.0, and at the time I didn’t really spend a lot of time on it because it didn’t support some of the things I was using. Well recently, I regained interest in Mono when I saw it now supports MVC and some of Dblinq. And since I’ve been buzzing on the whole MVC thing for awhile, I decided to check Mono out for myself and start a fun little porting project. So this is the first part of a three part series describing everything I did to get a server up and running and one of my Asp.Net MVC applications ported to Mono.
This first part will cover installing and configuring an OpenSuse 11.2 server with Apache/Mono and SSH. The second part will talk about how to setup a MySql Membership provider (with mono and Windows), and the third part is a walkthrough showing how to port a simple Asp.Net MVC site to mono and MySql. I’m also targeting those of you who use virtual hosting where you might only have SSH (after install) to configure your server, so I will be using text based tools: SSH, vi, and yast for all my installations and configuration after getting the base system installed.
Read more…
nathan Mono .NET, apache, installing, linux, mod_mono, Mono, MVC, openSuse
So the other day, I wanted to build a confirmation dialog using jQuery with an existing Asp.Net web forms Button control. I wanted this dialog to be modal; and upon confirmation, I wanted it to postback using the Button’s server-side click event. After toying with the jQuery dialog, I realized that its dialog doesn’t suspend the process while waiting for user input. So it also causes problems with confirmation since clicking the original button will always postback. So with a few tweaks, you can prevent the postback and emulate the click event pretty easily.
Read more…
nathan ASP.Net, jQuery ASP.Net, dialog, jQuery, modal, postback
Okay, lemme tell ya… I really, really like SubSonic right now. I’m building a basic data integration application, and I wanted a simple way to store some basic tracking data locally. I didn’t want to build it into a Sql Server or create a super complicated data layer, so I decided to give SubSonic3’s Repository Mode with SQLite a try. SQLite gives me a simple, zero-config, file-based database solution for the app, and SubSonic provides a nice, clean way to push and pull data with it.
First of all, if you haven’t seen Conery’s five minute demo video on repository mode, you should. It’s very cool. Once you watch it, you’ll get the basics of migration and understand the idea of building the object model first while using the database purely as a storage mechanism. In this case, I built my class, and I’m letting Migration handle all the schema generation for me. It will also create a new database file if one doesn’t already exist. That’s the idea right?
Read more…
nathan SubSonic Repository, SQLite, SubSonic3
While playing and learning with MVC, I designed a simple little CMS (content management system). My goals for the project were to keep it simple, use MVC, and make it SEO optimized as possible. Well finally the first version of that application is published on CodePlex. Feel free to go check it out. Don’t forget to peek at the setup documentation.
nathan ASP.Net CMS, CodePlex, MVC, SiteManager
I sometimes underestimate the power of the tools that come with visual studio. Usually this is because I’m ignorant of the fact they even exist until I see them used or read about them somewhere else. T4 text generation is no exception. This is a very useful tool that’s built right into Visual Studio 2008 which I discovered while peeking at the new SubSonic 3 code when it came out. (Thanks Conery).
After spending a day drilling into T4 and learning how it works, I have to say that it was definitely time not wasted. I’ve since used it for tons of miscellaneous code generation projects including mostly data layer extensions. And with the help of the data provider specific templates in the SubSonic project, much of the schema extraction code has been provided for us through open source.
I’m a big fan of SubSonic, and I like to push it in all the shops I work with that aren’t already anchored down to another data framework. However, sometimes we still have to fall back to vanilla data layers like Linq to Sql (L2S), Entity Framework (EF), or straight up ADO.Net depending on the shop and its personalities. Having experience using SubSonic opens your eyes to some useful ways you can improve L2S and the others.
Read more…
nathan T4 Linq to Sql Classes, Sql Server, T4, visual studio
I thought I’d write a little bit about a simple Silverlight file uploader I’ve been playing with. I see a lot of postings out there asking how to do a file uploader that can show upload progress using Silverlight. There are a few issues to overcome like: how to you actually measure progress, and while using the HttpRequest, how do you update the UI from the worker thread? So this project will hopefully answer some of your questions.
Client-Side


I should make a quick mention that this can be done using either WCF or a simple HTTP request. In my opinion, I think using HTTP request provides better performance and comes with less deployment and maintenance hassle; but likewise it leaves a few other loose ends like security and message integrity (if left unhandled). For this example, I’ll mostly only discuss the HTTP request method. My sample code includes a WCF implementation for reference. (Maybe some of you WCF gurus can tell me how that looks).
Read more…
nathan Silverlight file, http handlers, HttpRequest, progress, Silverlight, upload, WCF, WebRequest
I found this article very helpful when troubleshooting an issue with my vanilla Windows 2003 server. Earlier this week, I deployed an application that used Silverlight. The app worked fine in my development environment and my Windows 2008 test environment. After I deployed it to my 2003 IIS6 sandbox server, I noticed all my Silverlight controls weren’t appearing in the browser. You could right click on them and get the Silverlight context menu, but the controls themselves were not loaded.
After googling around a bit, I found this article extremely useful. MIME Types… My server had nothing on it but IIS and Asp.Net. Naturally, Silverlight components were not setup in IIS. So this was a super easy fix by just adding the three new MIME types to the IIS Properties dialog. Check out the link for more details.
http://learn.iis.net/page.aspx/262/silverlight/
nathan Silverlight iis6, MIME, Silverlight
So for those of you who have already played around with Silverlight 2 and saw the newer version Silverlight 3 release this week, you might have some issues installing it. I had the same problem on two different machines while trying to install the new runtimes. The first system was 32bit Windows XP with Silverlight2 Tools and Silverlight2 installed. The second was 64bit Windows 7 RC1 with the same Silverlight components. Read more…
nathan .NET, Silverlight installing, silverlight3, visual studio