Site navigation the Microsoft way

MS Navigation

http://msdn.microsoft.com/en-us/library/e468hxky.aspx

I really used the stuffing out of that link this week.  I was focusing on the sitemap functionality that MS built into asp.net.  The documentation was a pain to use though – because the document references multiple concepts, you have to follow all these links to read up on all the parts.  So this is how I worked through the document: I read through one time and following every link I came across (this left me a little confused).  Then I scanned it a second time and clicked on the links for items I couldn’t remember.  Then I created a test project and used the document as a reference.  Then I went home because I had enough.  The next day I carefully read through the document again – this was most helpful and kind of solidified everything.

All in all I kind of liked the site navigation.  The ability to reference the site navigation object anywhere is rather nice.  I made one modification though – I now throw a 403 error if a user tries to reference anything not in their site map thusly:

private void ValidateAccess() {     if (!(IsCurrentPageUnrestricted() || CurrentUser.SiteMap().CurrentNode != null)) throw new HttpException(403, "You do not have permission to access: " + Page.Request.AppRelativeCurrentExecutionFilePath.ToLower()); }

MS Reporting services cross platform

The scuttlebutt on BI is that Microsoft is going to implement the services in a cross-platform way.  Color me skeptical, but they also said that reporting services was cross-browser for 2005, and it really wasn’t, so I’m going to wait and see how cross-platform SSRS works out.  It will be cool if they can pull it off though.  The master plan is:

  1. Get SSRS, PerformancePoint, and Excel services to work in browsers on iOS (includes IPad and IPhone I assume) by June next year.
  2. Add touch support the above offerings by December of next year.
  3. Add all the above to the new Windows 8 OS sometime in 2013.

http://www.zdnet.com/blog/microsoft/microsofts-plan-for-bringing-its-bi-tools-to-ios-android-and-windows-8-devices/11005

Speed up your web page

I’ve been doing web development for years, but I just ran across this little nougat in Mark Pilgrim’s “Dive into HTML5”

Technically, you could put [script tags] anywhere
 [in your page], but scripts in your <head> will 
 make your page load more slowly. So don’t do that!

I’ve never read that before – it’s a good thing to know!

NuGet reference problems (& solution)

So I went to update the project I’m working on to use NLog from NuGet.  It all went swimmingly, until I promoted and went to check out the CI web site.  Low and behold I got a giant YSOD — it said there was a reference problem.  So fine — it wasn’t a big deal — time to roll back to the old 1.0 version.  Once I promoted and built that, everything on the CI site was fine.  Went to check out my local install though, and now it was broken with reference error.  So I did the usual thing:  reset IIS, deleted the temp IIS files, and checked the .dll in the .\bin directory.  And I still got the error.  So time to escalate — I broke out the fusion log.  And it turns out that with my new Windows 7 setup the YSOD and Scott Hanselman’s instructions point to the wrong place.  So stackoverflow to the rescue with this post:

http://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net

New reg location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion

Now I found the problem:  NuGet adds a line to the web.config file when you reference a new addin.  This reference was not removed when I deleted the NLog NuGet package, so IIS was trying to load a NLog file that didn’t exist and hence the error.  This also explained why I the CI install was working because I haven’t been promoting my web.config.