.NET Blog

Tony Cavaliere

 
My Favourite Albums
  And the Grappa wins.
E-mail me Send mail
Add to Technorati Favorites AddThis Feed Button

Subscribe to Cynot Why Not


Recent posts

Disclaimer

Hey unlike other bloggers I stand by what I say but just in case. The opinions expressed herein are my own except on Tuesday when the second card is not turned up otherwise it ain't worth squat.

© Copyright 2010

DevTeach in Toronto - Part 2

I spent most of the three days at DevTeach attending the agile track. I thought I would take advantage of attending sessions that would otherwise not be given at typical user group meetings. I have limited experience with technologies outside of Microsoft. I've made use of NUnit and Rhino Mocks but had no experience with NHibernate, Castle, Tarantino or DBDeploy.NET to name a few.

I was especially pleased to meet and talk with Oren Eini, a member and contributor to many open source projects including NHibernate, Castle and Rhino Mocks. He was gracious enough to help me with a Rhino Mocks problem I was having where I was calling Expect.Call(mIDBConnection.Open()). This line of VB.NET code was causing the IDE to crash and my only option was to exit and restart the IDE. It turns out that there is a bug with the VB.NET compiler and he encouraged me to log the bug with Microsoft. In addition he mentioned that Expect.Call should only be called for methods that return values, that is, in C# non void methods and in VB.NET functions.

I also had the opportunity to talk with James Kovacs and shared university stories, specifically, the pranks I participated in. His presentations on NHibernate and Inversion of Control Containers were excellent. It was great to see a fellow Edmontonian, Donald Belcham. Ok, I only spent one year in Edmonton but I persevered the cold winters and that should be enough to qualify me as an Edmontonian. Donald was also presenting in the agile track. I especially enjoyed his interaction based testing session.

It was a great 3 days at DevTeach. Don forgot DevTeach will return to Toronto in November 2009. 

Guess the movie

Keaton always said, "I don't believe in God, but I'm afraid of him." Well I believe in God, and the only thing that scares me is Keyser Soze.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: DevTeach
Posted by CynotWhyNot on Sunday, May 18, 2008 9:21 PM
Permalink | Comments (27) | Post RSSRSS comment feed

DevTeach in Toronto - Part 1

I spent the better part of last week at DevTeach mainly focused on the agile track. It was an incredible conference and I highly recommend it. If you haven't been, then make it so. I believe it will be back in Toronto in November of 2009. If you can't wait then head over to Montreal where I believe it will be held in 6 months time. I'm seriously thinking about attending the Montreal conference. It's been quite some time since I've been to Montreal and I have relatives there that I have not seen for quite some time.

On Monday evening I partied on with Palermo at the famous Party with Palermo. Free drinks, finger food and swag, all for the price of a business card. That's right you heard me a business card got you in. There was even a beer chugging contest with the winner receiving free admission to the  DevTeach. Now that's a bargain!

Ryan Kajiura a friend and fellow TVBUG attendee showed his true colours and was able to consume an entire glass of beer in about 4 seconds and thus won the free addmission to DevTeach. There was no official timing but whatever time it took it was the fastest amongst the contestants. Congratulations Ryan! After his win I asked him how he felt and he responded by saying "my university education finally paid off". I even got a close up photo of Ryan's triumphant win.

Another skill to add to Ryan's CV.

Ryan Drink Contest

Guess the movie

And now, folks, it's time for "Who do you trust!" Hubba, hubba, hubba! Money, money, money! Who do you trust? Me? I'm giving away free money.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: DevTeach
Posted by CynotWhyNot on Sunday, May 18, 2008 9:09 AM
Permalink | Comments (9) | Post RSSRSS comment feed

Beth Massi and Scott Hanselman at TVBUG

Last week (May 12, 2008) both Beth Massi and Scott Hanselman presented at the Toronto Visual Basic User Group (TVBUG) and what a treat. Not one, but two expert speakers at a user group meeting. Beth gave a great session on building a data access layer using LINQ to SQL and Scott gave a wonderful presentation on ADO.NET Data Services. I especially enjoyed the tongue in cheek format where both Beth a Scott jokingly commented on each other's presentation. Scott's introduction to himself was hilarious. If you haven't seen it please check out his MIX08 presentation.

Thanks to Rob Windsor for organizing one of the best user group meetings that I have ever attended and believe me I've attended my fair share of meetings.

Standing room only at TVBUG where Beth Massi and Scott Hanselman talk about LINQ to SQL and ADO.NET Data Services.

01 TVBUG

A close up of Bath and Scott presenting at TVBUG.

02 TVBUG

Guess the movie

[Yelling] ... and it was my fault because I knew it was gonna happen. But if a white person sees two black men walking towards her and she turns and walks in the other direction, she's a racist, right?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by CynotWhyNot on Sunday, May 18, 2008 8:01 AM
Permalink | Comments (17) | Post RSSRSS comment feed

DotNetNuke as a Root Application

The GTANETPRO group has recently decided to host their own web site. Originally, the site was hosted through a provider and cost about $150 per year to host. I had a Pentium 3 lying around and said why not host it ourselves at minimal cost. This server was already hosting my now obsolete blog and porting the GTANETPRO site should be simple enough. The GTANETPRO site uses DotNetNuke (DNN) so all that was needed was an XCOPY and a restore of the DNN database. Simple enough and it was, we had the site up and running within one hour.

I decided to make GTANETPRO the root application and have my existing sites as child applications. I agree, this perhaps, is not the ideal configuration but nonetheless this was how I did it. When I browsed to my obsolete blog I got the following exception:

Parse Error Message: The code subdirectory '/blog/App_Code/HTML/' does not exist.

Clearly, this was not an issue with the blog application as it did not require the App_Code/HTML directory. In fact, the blog application uses the Web Application project template and does not have an App_Code directory. It must be DotNetNuke's web.config that is the issue. Remember child ASP.NET sites inherit their parent web.config settings.

I did some Googling and found a number of postings where DNN sites where having similar problems.  Finally, I found a post that was not DNN specific but had the same problem. The solution was to make a small change to the parent's web.config so that config settings where not sent to the child sites.

The following markup shows how to prevent a child ASP.NET from inheriting a portion of the parent's web.config. 

  <location inheritInChildApplications="false">

 

    <!-- The stuff in here will not be sent to the child sites. -->

 

  </location>

In my particular case, I surrounded the existing <system.web> section as this contained the HTTP Modules that were causing the exception.

Please note that not all sections can be placed within the <location> tags. For example, if you place the <runtime> section with the above location tags you will get an exception.

Guess the movie

You have the ring, and I see your Schwartz is as big as mine. Let's see how well you handle it. 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: ASP.NET
Posted by CynotWhyNot on Wednesday, May 07, 2008 8:45 AM
Permalink | Comments (75) | Post RSSRSS comment feed

Yahoo Media Player

I just came across the Yahoo Media Player. If you have MP3 audio on your site then perhaps this is the tool for you. All that is required is the addition of a JavaScript file and your site automatically takes advantage of the Yahoo Media Player. Behind the scenes, the Yahoo Media Player code will find all the MP3 audio and add a play button to each of them. In addition, a play list is created for you. By default, the MP3 will be played using Flash and if Flash is not available then QuickTime or Media Player will be used.  Listing 1 shows how you can easily add the Yahoo Media Player to your site.

Listing 1: Adding the Yahoo Media Player

  <form id="form1" runat="server">

    <%--Include the Yahoo Media Player JavaScript.--%> 

    <%--The JavaScript will detect all audio files on the page and prepend with--%>

    <%--a play image button--%>

    <%-- http://yahoomediaplayer.wikia.com/wiki/Main_Page --%>

    <script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script>

      <h1>Yahoo Media Player</h1><br />

      <div style="border: thin solid #808080; background-color: #FFF4E8; width: 100px;">

        <center>

          <a href="media/Song_1.mp3"></a>Song 1<br />

          <a href="media/Song_2.mp3"></a>Song 2<br />

        </center>

      </div>

  </form>

As shown all that is required is the addition of some Javascript that Yahoo provides. Figure 1 shows the rendered output.

Figure 1: Yahoo Media Player Rendered in the Browser

Yahoo Media Player  

By default the Media Dashboard is not shown initially but is easily displayed by a mouse click. Notice that all the MP3 audio on the page automatically has a play button attached and that each MP3 is added to the play list regardless of where on the page the MP3 audio is located. The documentation and community home for the Yahoo Media Player is a public wiki.

I think it's pretty sweet.

Guess the movie

When a free man dies, he loses the pleasure of life. A slave loses his pain. Death is the only freedom a slave knows. That's why he's not afraid of it. That's why we'll win.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by CynotWhyNot on Tuesday, May 06, 2008 3:24 PM
Permalink | Comments (87) | Post RSSRSS comment feed