DotNetNuke 4 is written for ASP.NET 2.0 using Visual Basic. I’m not a big fan of VB, so I do all my .NET development in C#. Luckily, Microsoft has made these languages play very well together, so you can write C# classes that extend classes in assemblies compiled from VB. However the DotNetNuke guys don’t have a lot of documentation about using C#. Their tutorials for writing modules are also very “in-the-box” that assume you want to write modules that work in a very specific way, especially when it comes to the database.
Their module development is very structured, including an MVC-type of framework that feels very forced. They have good ideas about the number of abstraction layers in the data access, but it seems far too complex for, say, a simple guestbook module, and the process assumes that you are creating a new kind of object that will require persistance. It also requires you to slop code all over your DNN installation, where I wanted to package a up the module a little more cleanly. So I started thinking, “what about the Hello World?” So I wrote one in C#.
Read the rest of this entry »
Posted in DotNetNuke October 12th, 2006 by Brian Samson | No comments
I ran into a problem today developing a web app that uses XML/XSLT for the display. This particular widget is designed to run as a custom control and it compiles to a .dll, so I had to embed my XSL files. This wasn’t a problem until I tried to clean up the XSLs by dividing them into smaller pieces and using xsl:include from between them.
The problem turned out to have a quick solution that took about an hour. Write a Custom XmlResolver. Now the one on the Microsoft Website is pretty extensive if you want to learn all about it. But if you want to just drop a class file in your project you can use mine. It resolves everything relative to the namespace that you put it in, so be sure to change that to something appropriate, espeically if you have your default namespace set in Visual Studio.
Note this is quick and dirty and doesn’t do anything with credentials, which I figure is OK since you probably have permission to get to your embedded resources.
Click below to see the full code:
Read the rest of this entry »
Posted in Computers, .NET September 12th, 2006 by Brian Samson | No comments
Updated on 8/12/2008 — It has come to my attention this solution stopped working with DotNetNuke 4.8. I believe it should work with 4.5 - 4.7. I don’t work with DNN anymore so I probably can’t be very helpful, but if someone else has written a newer post on the topic, I’d be happy to link there.
—
So I’ve been working with DotNetNuke as our portal solution at work. My first task was to plug in to the authentication scheme to make it use our existing user database. This seems like a simple request, and in the end it was.
My big problem was the lack of documentation. First of all there is very little experience out there with DNN4. Secondly, the other providers of SSO are either commercial or very confusing, especially for a Java-turned-C# developer like myself. So I thought I’d lay it out, because it’s not very hard.
Read the rest of this entry »
Posted in DotNetNuke, Computers, .NET July 27th, 2006 by Brian Samson | 11 comments