Friday, March 25, 2011

SharePoint:object not set to an instance of an object with the webpart

Issue:

This issue is raised by one of the user who is unable to see a particular webpart in Sharepoint he is getting an error message "object not set to an instance of an object". and this is only happening for a particular users....hmmm god dam..

Deploying webpart to SharePoint 2007 using  Visual Studio Extensions for Windows SharePoint Services (VSE WSS) and getting error message “Object reference not set to an instance of an object”.

Resolution:

You need to add the user to the any of the people and groups...simple right.

This is for the second one:

1] Copy the built webpart.dll to c:\windows\assembly (GAC)

2]  In the folder location where webpart VSE solution was created found setup.bat file in bin\Debug, and this is the file which VSE calls when deploying the solution and has instructions to run it. Ran the setup.bat from command prompt as “setup /uninstall” this ran ok, then ran setup /install this ran ok too. Modified the setup.bat file and add the line to remove the webpart.dll from the GAC and add the webpart.dll assembly to GAC as under:

under :LDeploy section before goto :EOF added the following line:
===========================================================
"%programfiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -if webpartTest.dll
"%programfiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -uf webpartTest

Thanks for your time and patience in this matter. 
Thank You,

No comments:

Post a Comment