Archive

Author Archive

SubSonic3 Works on Mono!

August 8th, 2010 Nathan No comments

SubSonic  ProjectSo a couple weeks ago I decided to test a few changes made to SubSonic3 that fixed a LINQ evaluation bug related to medium trust. Using a simple console app on linux/mono, I tested basic data access to a SQLite database using repository mode, and to my surprise it worked!

Mono-gorilla-aqua.100px

I’ve always been a big fan of SubSonic since its 2.0 version, which I used for a mid-sized e-commerce site. With a totally rewritten core, 3.0 uses LINQ (language integrated query) for all of its data access providing a great alternative to Dblinq for the Mono platform.

 

 

Read more…

Cross-domain JsonP using Asp.net MVC and jQuery

July 24th, 2010 Nathan 3 comments

So there are a couple great walkthroughs out there that talk about using jquery jsonp in cross-domain scenarios.  They talk a lot about the requesting and server side, but not so much about how to use the callback. So to clarify, I’ll step through what I did to make this work including providing my implementation for a new ActionResult called JsonPResult for MVC.

Read more…

Categories: ASP.Net, jQuery Tags: , , ,

MVC2 on Mono – Tips and Tricks for Windows Developers

July 20th, 2010 Nathan 5 comments

So lately, I’ve been pretty wrapped up with kids and family so I haven’t had much time to post anything new.  However, I did start a new project, which I’ll detail out more as I go. It’s been quite the experience so far since I decided to build this one from the ground up using MySql and Linux/Mono.  I’ve never designed apps like that before. For one, I’ve had to learn a new set of design tools for MySql as opposed to my comfortable Sql Management Studio. And I’ve also had to very incrementally test different programming technologies and methods that were questionably supported in Linux/Mono.  The beauty of this is that no matter what I do to make it work for Mono, the app will always work on Windows, and there’s little development time lost if I have to fall back to its native platform.

Read more…

Categories: ASP.Net, Mono Tags: , ,

Multiple Web Servers over a Single IP, Using Apache as a Reverse Proxy

June 24th, 2010 Nathan No comments

As a developer, I don’t get to play with the IT side of things quite as much as I would like to.  So I enjoy the little things, like learning how to use a reverse proxy on Apache.  At home, I only have one IP coming in with my regular Internet connection, and I want the ability to run multiple servers inside my network on port 80. In the past, I’ve always just setup a new port and routed it to whichever server I wanted. 8080 here, 8081 there, etc. Well with Apache reverse proxy (mod_proxy), I found it was very easy to setup route requests to other internal servers.

Read more…

Categories: apache Tags: , ,

Installing Mono Trunk or 2.6.4 Tag with Subversion Source on Ubuntu 10.04 Lucid

June 3rd, 2010 Nathan 4 comments

Updated June 23, 2010!

Lately, I’ve been really digging the new Ubuntu 10.04 on my desktop and web server. So I’ve been meaning to get a post out here describing how I got Mono trunk installed since it comes packaged with 2.4.4.  After much testing, I finally have finished getting a script to work with a fresh, vanilla install.

I stumbled on this blog post by Boris Schieman where he wrote a bash script to compile and install the Mono trunk.  I made a few tweaks to it for a vanilla linux install for the tagged 2.6.4 release and setup another one for updating a mono trunk build using the daily tarballs. I’ve successfully tested both versions on Ubuntu 10.04 Lucid. I’m just a casual linux/mono user, so use this at your own risk.

Read more…

Categories: Mono, Ubuntu Tags: , , , ,

Silverlight, WCF REST and Streaming My Personal Music Repository from a Standalone EXE

April 26th, 2010 Nathan 3 comments

This is way cool. From time to time, I tend to screw around with stuff I enjoy that really has little productive value.  A year ago this month, I recall wanting to continue writing about sharing your personal music without using IIS and hosting the music directly from a WCF standalone executable. Well it turns out this is a whole lot simpler than I originally thought.

Disclaimer: This probably isn’t best practice, and it’s ripe for enhancements. My hope is that it gets your imagination fired up and motivates you to continue where I left off.

Challenges:

  • How the heck do I stream an MP3 file to a media element via WCF (without having to download the whole file before playing it)?
  • Cross-site scripting policies are blocking my download requests. How can I serve these up via my self hosted WCF REST service?
  • Silverlight3 doesn’t support WCF REST yet. How do I deserialize the WCF REST contract messages?

 

Changes Since Last Release

player_small My original design was very simple.  I hosted the Silverlight files and used WCF with an IIS server at home. The player pulled a list of files and locations. The player’s media element source was set directly to a music file hosted in an IIS virtual directory. All that works great until you are on a machine without a web server. Ultimately, I wanted to figure out a way for the user to host their music repository from their desktop with a simple executable and port forwarding. Which means it would have to serve up all the resources necessary to run the Silverlight player. It would also have to serve up the WCF services and actual music files themselves.

Since the last post a year ago, I’ve made quite a few little tweaks to the player like: regular expression search, random songs, random play order, and a volume control. I also integrated a compact SQLite database for searching so the server-side doesn’t have to do a file system search for each request.

 

Read more…

Categories: Silverlight, WCF Tags: , , , ,

Walkthrough: Porting Asp.Net MVC Website to Mono 2.6.1 and MySql on Linux Apache – Porting to Mono Part 3 of 3

February 24th, 2010 Nathan 1 comment

So for the third and final part of this series, I want to walk through how I ported a very small project I posted on CodePlex awhile back called SiteManager. It is an extremely simplified CMS application that I wrote using Linq to Sql and MVC in order to provide a very basic and easy website tool. It uses membership provider for authentication and Linq to Sql Classes with its database in MS Sql Server. For this walkthrough, I’ll be converting the database to MySql and adapting Linq to Sql to Dblinq so it can completely run on Mono and Linux.

Read more…

Categories: Mono Tags: , , ,

How to Setup and Configure MySql Membership Provider 6.2.2 – Porting to Mono Part 2 of 3

February 1st, 2010 Nathan 11 comments

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…

Cold Weather Lunar Ring (Lunar-bow)

January 27th, 2010 Nathan No comments

I thought I’d share a couple photos I took recently for fun.

Read more…

Categories: Off-Topic Tags: , , , , ,

Installing OpenSuse 11.2 with Mono 2.6.1 and Apache Using Text Mode Configuration – Porting to Mono Part 1 of 3

January 25th, 2010 Nathan 6 comments

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…

Categories: Mono Tags: , , , , , , ,