Posts

Showing posts from 2011

Versioning of Workflow created using Visual Studio

I have come across problem in versioning of long running persisted workflows. Since persisted workflow is bound to the exact type in the assembly. That means changing an assembly with a newer version can create problem with the persisted workflow when we want to rehydrate it and stop working. So we need to maintain both versions of assembly and redirect the persisted workflows to older version of assembly. Assembly versioning can be maintained using assembly binding in web.config. Steps for enabling side by side execution of workflow versions: Create folder named with the same name as version of workflow say “1.0.0.1”. Now copy the dll (version 1.0.0.1) into this folder. Now copy this code into configuration section of web.config file. < configuration >       < runtime >             < assemblyBinding xmlns = " urn:schemas-microsoft-com:asm.v1 " >              < dependentAssembly >                   < assemblyIdentity name = " myWorkfl

How to display Custom Error Page

Most of the time we don’t want to display WSS default Error Page, as it looks scary. Instead we want to display our custom error page. Displaying custom error page when exception occurs provide lots of benefits like we can create error log for further debugging. Process of displaying custom error page is very simple and involve following steps: Backup the web.config. Open the web.config in notepad and change ( for Sharepoint, if you are not doing it for Sharepoint then skip this step) < SafeMode MaxControls = " 200 " CallStack = " false " to < SafeMode MaxControls = " 200 " CallStack = " true " You will also need to change the CustomErrors mode to "Off" < customErrors mode ="Off" /> Save changes. Backup the Global.asax. Open the Global.asax in notepad or any Editor and insert this code < script runat ="server"> void Application_Error( object sender, EventArgs e) { // Code tha

Script to find click event of checkbox

Once I was in situation when I have to call same function for all checkbox. I was wondering how to do it without writing code for every checkbox. Then I come across with a solution of using JQuery. I used JQuery to find click event of all checkbox on a form element. Below is the code snippet: < script src ="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" type ="text/javascript"></ script > < script language ="javascript"> $(document).ready( function (){     $( "form :checkbox" ).click( function (){         alert( 'hi : ' + this .name);          });  }); </ script > Really JQuery is more powerful than JavaScript. I have done it for checkbox, likewise we can find the events of other controls also. Enjoy have fun with JQuery.

Install Windows SharePoint Services 3.0 on a stand-alone computer

It includes these parts: Hardware and software requirements Configure the server as a web server Install and configure Windows Share Point Services 3.0 with Windows Internal Database Post-Installation steps Hardware and software requirements Component Minimum Recommended Processor 2.5 gigahertz (GHz) Dual processors that are each 3 GHz or faster RAM 1 gigabyte (GB) 2 GB Disk NTFS file system–formatted partition with a minimum of 3 GB of free space NTFS file system–formatted partition with 3 GB of free space plus adequate free space for your Web sites Drive DVD drive DVD drive or the source copied to a local or network-accessible drive Display 1024 × 768 1024 × 768 or higher resolution monitor Network 56 kilobits per second (Kbps) connection between client computers and server 56 Kbps or faster connection between client computers and server Software requirements The Windows SharePoint Services 3.0 installation and configuration wizard marshals many components. Cauti