State Taxes

February 28, 2011 Leave a comment

I learnt some new information about taxes. It was good to know any way. There are some states where you have to pay state income tax as well on top of Fedral income tax. Here is a good article
http://www.money-zine.com/Financial-Planning/Tax-Shelter/State-Income-Tax-Rates/

Actually one of my friend moved into Virginia State and He did not knew that he will have to pay state tax. In actual moving to Virgina became painful for him as It was a good amount going out of his pay check. so If you are considering moving out to a different state, Make sure you know all the tax situation.

Categories: Uncategorized

Participated in SharePoint Saturday event as a Speaker

December 6, 2010 Leave a comment

Presented on December 4th in SharepointSaturday.org south florida event at Nova University as a Speaker. I presented on SharePoint 2010 Client Object Model, I will be posting some Code Examples in couple of days here. Thanks for attending the session. If you have any question, feel free to send me email at moonis.tahir@gmail.com

http://www.sharepointsaturday.org/southflorida/speakers/4/MoonisTahir.aspx

Categories: SharePoint 2010

Web Service Task in SSIS 2005, WSDL Issue fix

I ran into this issue yesterday. Here is the scenario,
 
SSIS needs to call a web service to send & receive data. You place web service task on SSIS designer and create a HTTP connection manager. I specified web service path in HTTP Connection Manager and WSDL file path in Web service task. Every thing worked on my dev machine. When i moved the SSIS on QA SSIS server. I started getting following error message 

  Code: 0xC002F304
   Source: Log Start Message to Process Manager Web Service Web Service Task
   Description: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The input Web Services Description Language (WSDL) file is not valid.
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil..ctor(Object connection, String downloadedWSDL)
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
End Error
DTExec: The package execution returned DTSER_FAILURE (1).

 
As error is stating that it is not able to get WSDL so gave me a hint that it always need WSDL file even if you specify ?WSDL in HTTP Connect Manager for web service URL.  Customer was running SSIS through DTEXEC from file system and with a config file. so i figured out the way to export WSDLFILE  path in config so that we can configure from server to server. I created a variable with the name WSDLFILE_PATH and exported it to config.
 
Select the Web service Task and go to expressions. Expressions provide you different properties available. so it has WSDLFILE property. I simply added expression to get variable value. Thats served the purpose of providing WSDL file path from config file. Since i could not find any article stating the correct solution to resolve it so i decided to blog it. I hope you found it useful. My experience is that SSIS 2005, you can easily use a web service task. Some people say that you have limitations in 2005 and web service task never works etc. Let me tell you that this is not true. I tested web service task extensively in 3 different SSIS packages and every thing worked very well.
 
Categories: SSIS 2005

Get Parent SPWeb for a particular level from a subsite

I came accross this question recently and decided to blog it with my solution. Here is the scenario

Requirement :

I have a nested subsite called xyz as follows:
http://www.abc.com/def/ghi/jkl/xyz
How can I get the SPWeb object of "def" from within "xyz" programmatically?
I do not want to use the static way of doing 3 ParentWeb’s instead I was wondering if there is an API method or way that would allow me to get the reference to "def" from within "xyz"

Solution :
We have done the similar approach in a project but by introducing the levels. You can decide the levels for your site hirarchy. In above case you may say you want to get parent SPWEB object of level 2. so you want to do it this way by having a function, You may run into such scenario where you want to get SPWeb object for a level to show the menu etc etc.

your levels are like following for the URL mentioned above.
rootweb = Level 1, def = Level 2, GHI = Level 3, JKL = Level 4, XYZ= Level 5 

public SPWeb getSPWebFromCurrentWeb(SPWeb AnyWeb, int iLevel)

{
   

    SPWeb countParent = currentWeb.ParentWeb;
    int iCount=0;    //You need to count how many webs you have.
     while (countParent != null)
     {
          countParent = countParent.ParentWeb;
           iCount=iCount + 1;
     }

     //Return the SPWeb
     SPWeb webParent = AnyWeb.ParentWeb;
     for(int i=iLevel,i<iCount, i++)
     {
           if (webParent != nul)
          {
                   webParent = webParent.ParentWeb;
          }

      }

return webParent;

} //End of Function

and you can call the function this way

SPSite site=new SPSite ("http://www.abc.com/def/ghi/jkl/xyz");

SPWeb currentWeb=site.OpenWeb();
SPWeb parentWeb=getSPWebFromCurrentWeb(currentWeb, 2);

Categories: SharePoint 2010

SharePoint EventReceivers 2007 vs 2010 – Part 2

 

Continuing Part 2 for this topic.

Class

Events

Events

Description

 

SharePoint 2007

SharePoint 2010

 

SPItemEventReceiver
Applicable on SharePoint List Items

 

 

 

 

ItemAdding

ItemAdding

 

 

ItemUpdating

ItemUpdating

 

 

ItemDeleting

ItemDeleting

 

 

ItemCheckingIn

ItemCheckingIn

 

 

ItemCheckingOut

ItemCheckingOut

 

 

ItemUncheckingOut

ItemUncheckingOut

 

 

ItemAttachmentAdding

ItemAttachmentAdding

 

 

ItemAttachmentDeleting

ItemAttachmentDeleting

 

 

ItemFileMoving

ItemFileMoving

 

 

ItemAdded

ItemAdded

 

 

ItemUpdated

ItemUpdated

 

 

ItemDeleted

ItemDeleted

 

 

ItemCheckedIn

ItemCheckedIn

 

 

ItemCheckedOut

ItemCheckedOut

 

 

ItemUncheckedOut

ItemUncheckedOut

 

 

ItemAttachmentAdded

ItemAttachmentAdded

 

 

ItemAttachmentDeleted

ItemAttachmentDeleted

 

 

ItemFileMoved

ItemFileMoved

 

 

ItemFileConverted

ItemFileConverted

 

 

 

ContextEvent

New in 2010

Categories: Uncategorized

SharePoint EventReceivers 2007 vs 2010 – Part 1

Below is side by side comparison of event handlers for SharePoint 2007 and SharePoint 2010. Description column has some comments about new events. You can create event handlers for SharePoint 2010 in Visual Studio 2010 using Event Receiver template.

Class

Events

Events

Description

 

SharePoint 2007

SharePoint 2010

 

SPWebEventReceiver

 

 

 

 

SiteDeleting

SiteDeleting

 

 

SiteDeleted 

SiteDeleted 

 

 

 

WebProvisioned

New in 2010

 

 

WebProvisioning

New in 2010

 

WebDeleting

WebDeleting

 

 

WebDeleted

WebDeleted

 

 

WebMoved

WebMoved

 

 

WebMoving

WebMoving

 

SPListEventReceiver
Applicable on SharePoint List, Document Library

 

 

 

 

FieldAdded

FieldAdded

 

 

FieldAdding

FieldAdding

 

 

FieldDeleted

FieldDeleted

 

 

FieldDeleting

FieldDeleting

 

 

FieldUpdated

FieldUpdated

 

 

FieldUpdating 

FieldUpdating 

 

 

 

ListAdding

New in 2010

 

 

ListAdded

New in 2010, It was much needed event. Most common requirement I have seen is to Notify someone if a new document library or list is added or Kick Off a workflow through code.

 

 

ListDeleting

New in 2010

 

 

ListDeleted

New in 2010

SPEmailEventReceiver
List received an Email message

 

 

 

 

 

EmailReceived

New in 2010

SPWorkflowEventReceiver
All new events for workflow

 

 

 

 

 

WorkflowStarting 

New in 2010

 

 

WorkflowStarted

New in 2010

 

 

WorkflowPostponed

New in 2010

 

 

WorkflowCompleted

New in 2010

Categories: SharePoint 2010

MSDN link for Calculated Field Formulas with Examples

Very good article with examples. Published May 2010.

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

Categories: Uncategorized