Navigation

Thursday, 30 October 2014

Installing Windows Service with Command Prompt and Visual Studio Command Prompt

We can install windows service into Services on windows server with the help of InstallUtil.exe a
command line utility using 

1. Using Visual Studio Command Prompt 
2. Command Prompt

InstallUtil.exe is the command line utility which is installed with .Net frame work and its path is %WINDIR%\Microsoft.NET\Framework[64]\<framework_version>

I. Using Visual Studio Command Prompt 
  1. On the Windows Start menu or Start screen, choose Visual Studio Visual Studio ToolsDeveloper Command Prompt.
    A Visual Studio command prompt appears.
  2. Access the directory where your project's compiled executable file is located.
  3. Run InstallUtil.exe from the command prompt with your project's executable as a parameter:
           installutil <yourproject>.exe



Sunday, 25 May 2014

Filtering ULS Log using Power Shell

It is very handy using Get - SPLogEvent power shell command to retrieve logs from ULS in certain time period .

Use bellow command syntax 

get-splogevent -starttime (get-date).addminutes(-20) | where-object { $_.correlation -eq “b66db71a-3257-4470-adf9-5c01dc59ecb3″ } | fl message > c:\errors.txt

For more information please follow link

Managing SharePoint Configuration

Saturday, 8 February 2014

View All Site collections in the Farm


  1. Verify that the user account that is performing this procedure is member of farm administrations SPGroup.
  2. On the central Administration Home Page, click on  Application Management
  3. On the Application Management page, in the site collections page, click view all site collections
  4. Select the web application in Web Application drop down for which you want to see the site collections
For More information follow link

Thursday, 21 November 2013

Number type input fields validation using JQuery

Using JQuery it is easy to validate numeric data in input fields.

Below code validates numeric input in the input type fields.
For this we only need to add .number as class for the input html tags in which we need to validate numeric data.

$('input.number').blur(function () {

    var value = $(this).val();

    if (value == undefined || value == "") {
        $(this).parent().find("span").remove();
        return;
    }
    if (isNaN(value)) {
        $(this).parent().find("span").remove();
        $(this).parent().find("br").remove();
        $(this).parent().append("</br><span class='error'>Please Enter Number</span>");
    }
});

Above blur event shows the Please Enter Number error message just after user moves cursor from input field.

Thursday, 14 November 2013

Creating SharePoint 2010 List Instances in Visual Studio 2010

We can easily create SharePoint 2010 List instances using visual studio 2010

Advantages:- 
  • If there is no need of custom list in any other SiteCollection other than in one site, it is no meaning to create list definitions. Instead we can create one list instance and deploy it to site directly.
  • After creating the new list instance we can add list data to Element file which will reduce the burden of creating list items every time that we deploy solution and even it will helps in the time of production site deployment.

Steps to Create:-
  1. In visual studio 2010 click on File -> New project then new project window will open.
  2. Then in Installed templates section of opened window select                     Visual C# ->SharePoint ->2010 -> then Empty SharePoint Project -> enter project name  -> then Ok - > Enter your site name and click on create. It will create project in visual studion.                                                                    
  3. After this in Solution Explorer Right click on your project then click on Add -> New item.
  4. Now in opened window select Online Templates -> List Instance and name your List then click on Add
  5. Now new List instance is added to your folder.

Sunday, 10 November 2013

SSRS 2008 R2 Export to Excel Hiding Columns

When I started working on SSRS in my learning days it took lot of my time to solve empty/hidden columns in excel after exporting from report.


Normally if you use only list control in your report without any other controls, we can export clean excel without any empty columns. But if there are any controls along with list control in your report, you have to concentrate more on alignment of each control to get proper excel export.

Hidden columns are result of small deviations in widths of controls.

For Example let us take one rectangle control for header and list control for users information in one Report as shown in Picture-1

Picture -1

Picture - 2






As shown in Picture 1, rectangle width is 1.0025 inches and list column width is 1.00 inches so because of 0.0025 difference in widths we will get column B as hidden in exported excel sheet as shown in Picture 2.

  • To avoid hidden columns maintain widths with rounded values.
  • If there are two or more controls above the list control, make sure each control is side by side and the width of each control is as integral multiple of list column width.