Sunday, November 23, 2008

"The error indicates that IIS is not installed on the machine"

Let's consider the example:

  • Fresh installation of Windows 2008 with Web Server role IIS and ASP.NET installed.
  • A web application using AjaxToolkit

By default the Application Pool on IIS 7 is set to Integrated Pipeline, which does not work with AjaxToolkit and switching to Classic mode caused several issues:

  1. 404.17 - File Not Found
    Take a look on the 'handler' in the 'Detailed Error Information' - IIS treats .aspx file as a static content means ASP.NET is not installed on IIS with your application, and, definitely you need to register it for your site, but ..
  2. aspnet_regiis.exe does not work well on IIS 7.0 (even with IIS 6.0 support installed) caused the "The error indicates that IIS is not installed on the machine .." exception what means you need to use server features to install it instead of command line

The quickest solution here is to update ASPNET by using the features - with no changes on application pool go to server roles, uninstall and then install again ASPNET. Both the issues will be fixed.

Sunday, October 26, 2008

MOSS'07/WSS 3.0 Reuse existing Content database

Reusing existing content database in WSS3.0 (WSS_Content_<<GUID>> by default) is very simple:

  1. Create a new application (if no one still exists)
  2. Go to Central Administration > Application Management > Content Databases and change 'Web Application' to required
  3. Simply Add a content database.

Simple. After these steps all previous site collections will be appeared and available for you.

The only redundant object is new content database after the step 1. You can delete it too, but notice that by deleting it from SharePoint configuration it still remains on SQL Server.

Restore SharePoint Content Database

Recently we have hard drive on our SharePoint server failed remaining only.mdf files. Hopefully, restoration procedure is simple, here is:

  1. Install WSS(MOSS) as you usually do (you do not need to restore configuration file, it's simply not needed and can cause some troubles if restoration is on complete different environment)
  2. Install features, packages and service packs (eg WSS SP1)
  3. Attach/restore content database
  4. Go to Central Administration > Application Management > Content databases and add the content database to required application.

UPDATE. Following links might be also useful:

"Windows SharePoint Services use a preexisting database as the content database"
http://support.microsoft.com/kb/888041

How to back up and restore installations of Windows SharePoint ...
[article describes how to back up Windows SharePoint Services content databases and restore the data to the same server where the backup was]
http://support.microsoft.com/kb/833797

Optimizing NHibernate

NHibernate is great unless you want to optimise it. And that's sometimes means 'falling back from NHibernate', especially when  a huge report takes a very long built time by the reason of complicated application logic.

The easiest way to quickly speed up it up to x10 or more times is to simply gather queries by SQL Profiler and make stored procedure!.. based on them, instead of refractoring application logic itself. Yeah, that's simple. And from the business perspective 10 seconds report much much better than 10 hours.

Of course, it should not be overall, otherwise you simply break the idea of ORM. More over, it should be temporally used and good documented of used tables and fields.

For other tips of  optimizing Performance of NHibernate follow the links 1 2 3 4 5

Thursday, October 2, 2008

Starting SharePoint solution and planning your documentation

I cant went by Michael's valuable post about documenting of beginning SharePoint projects:

..."When a new SharePoint project is about to start I use the following steps to design and plan solution

  1. Creating Vision/Scope
  2. Site structure and Navigation
  3. Use Case Scenarios
  4. Data Flow scenario
  5. Content location
  6. Site Collection Boundaries
  7. List of required features and site definitions
  8. Security: Roles and Permissions
  9. Page Wireframes: layouts and content types
  10. Targeting
  11. Search strategy
  12. Infrastructure Plan 
  13. Disaster Recovery
  14. Deployment plan

    Take into account that SharePoint SDLC differs from standard development, and not all projects require those steps. "...

    It's a deep copy of Michael blog's post (check it for updates)

    Wednesday, October 1, 2008

    Visual Studio 2010 and .NET 4.0 announced

    REDMOND, Wash. — Sept. 29, 2008

    http://www.microsoft.com/presspass/press/2008/sep08/09-29VS10PR.mspx

    ...”Visual Studio 10 and .NET Framework 4.0, we are focused on the core pillars of developer experience, support for the latest platforms spanning client, server, services and devices, targeted experiences for specific application types, and core architecture improvements. These pillars are designed specifically to meet the needs of developers, the teams that drive the application life cycle from idea to delivery, and the customers that demand the highest quality applications across multiple platforms.”...

    No certain description of .NET 4.0 features, but even on the list of features of Visual Studio 2010 it is clear that it makes development more interoperable and integrated (continues to line of Visual Studio Rosario).

    And, interesting, do you know something valuable in other platforms, like Java, what .NET still does not have?

    More links: Visual Studio 2010 and .NET Framework 4.0 Overview

    Monday, September 29, 2008

    ScriptResource.axd 404 exception

    After installing a web application on IIS 7 you get sometimes 404 exception with ScriptResource.axd handler without any obvious reason even if you have everything installed properly. The issue hides itself in application settings. Answer is simple - switch a pool of your application to Classic mode, and it backs to work.

    Wednesday, September 24, 2008

    C# <> VB Differences

    What if developer has strongly enough experience in one of TOP 2 .NET languages but never used another one. Been asked of this question found nice link descirbing most hidden differences between VB.NET and C# http://msmvps.com/blogs/kathleen/archive/2008/07/25/what-a-c-coder-should-know-before-they-write-vb-updated.aspx not only from specification perspective.


    Tuesday, September 23, 2008

    Windows 2008 Server Core findings

    After spending some time preparing presentation of Windows 2008 Core I discovered some points usually unclear after a quick view. Here they are:
    • Can you have IIS 7.0 on Windows 2008 Core: yes (with several limitations)
    • Can you install .NET Framework: no (hilarious, but, no)
    • Can you install Microsoft SQL 2005: still no
    Having no possibilty to install .NET FW & SQL 2005 simply means that:
    • Can you install ASP.NET : no
    • Can you install Microsoft SharePoint: no
    • Can you install PowerShell: no
    In this case Server Core is strongly server-role one, such as AD Domain Controller, Windows Backup, File Server and so on (http://www.trainsignaltraining.com/windows-server-2008-server-core-roles/2008-04-09/), not an business layer, what was initially expected.

    As a server-role it has tangible benefit benefits (http://blogs.dirteam.com/blogs/sanderberkouwer/archive/2008/03/21/sc-enarios-server-core-scenarios.aspx) even aside of 10 surprises of Windows 2008 Core (http://www.builderau.com.au/program/windows/soa/10-surprising-things-about-Windows-Server-2008/0,339024644,339292005,00.htm

    Finally, these are several helpful links:

    Monday, June 23, 2008

    WSS 3.0 Visual Studio 2008 Extensions

    Microsoft released new version of one of the most usefull tools for WSS 3.0 - Visual Studio 2008 Extensions. Windows 2008 is also supported. Can be downloaded from here http://www.microsoft.com/downloads/details.aspx?familyid=7BF65B28-06E2-4E87-9BAD-086E32185E68&displaylang=en

    Tip! It's possible to install WSS 3.0 on Windows Vista using the WSS Vista Launcher. Thanks to Jonas Nilsson following link contains detailed description how to do it: http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/05/21/how-to-install-windows-sharepoint-services-3-0-sp1-on-vista-x64-x86.aspx