Steps to reflect changes in ShaPoint Timer job in MOSS

 

I’ve developed SharePoint Timer job in moss and gained a lot of experiences with deploying, configuring, debugging and updating it. The problem I had faced was my timer job changes don’t affect. Even after deploying multiple times then also changes are not affect in timer job. After lots of efforts finally I got the steps which will reflect the changes in timer job every time I deploy the solution. Here is the steps (my project type is WSPBuilder):

 

First Way:

  1. In visual studio 2008 right click on solution, Select WSPBuilder -> Uninstall.
  2. Check the dll of your solution name in C:WINDOWSassembly and if you find your dll then right click on dll and select Uninstall.
  3. Restart Windows SharePoint Services Timer from the Services.
  4. iisreset.
  5. Right click on solution, select Build.
  6. Right click on FEATURES folder of solution and select Copy to 12 hive.
  7. Right click on solution, WSPBuilder -> Copy to GAC.
  8. Right click on solution, WSPBuilder -> Copy to 12 hive.
  9. Right click on solution, WSPBuilder -> Build WSP.
    1. Right click on solution, WSPBuilder -> Deploy.
    2. Now you can run you timer job. You will got the changes.

 

Second Way:

After following above steps sometimes you might got changes in timer job. For that follow the below steps:

  1. Make changes in code which you want to do in code.
  2. After that right click on solution, WSPBuilder -> Upgrade. One popup is come to you for Rebuild Solution, click on Yes button.
    Timerjob
    Note: If you do not get this popup then your code might not be changed. So, for that again make some changes in you code and try again Step no.1 and 2 until you get this popup.
  1. Right click on solution, select Clean.
  2. Right click on solution, select Rebuild.
  3. Follow the same steps from First way (1 to 10).

 

Reference links

http://bytes.com/topic/asp-net/insights/902681-how-create-deploy-sharepoint-2007-timer-job

 

Sameer J. Vaghela

 

Moss 2007 to Sharepoint2013 page migration

Few months ago, I had arequirement of copy SharePoint 2007 pages to SharePoint 2013 site in my migration project. The web application was hosted on other server (not on the SharePoint server). So Ihad to use SharePoint services model.I have used copy-service for this requirement. Please note that this service will only copy static content of page not other webparts content.

To start the page migration, first fetch source page fieldinfo and bytearray using copy-service ‘GetItem’ method(add copy service reference and programatically change its url).

 //give source copy-service url and credentials
CopyWS.Copy copyWS = new CopyWS.Copy();
copyWS.Url = “http://wssdev:7001/_vti_bin/copy.asmx”;
copyWS.Credentials = new NetworkCredential(“sourcesite-username”, “sourcesite-password”);//fetch page fieldinfo and bytearray using copy GetItem method from source page.
CopyWS.FieldInformation[] mossPageFieldInfoArray;
byte[] mossPageByteArray;
uint myGetUint = copyWS.GetItem(“http://wssdev:7001/Pages/test1.aspx”, out mossPageFieldInfoArray, out mossPageByteArray);

Next, set copy-service url to destination site and copy the page using ‘CopyIntoItems’ method. Provide source page fieldinfo and bytearray into this method.

//give destination copy-service url and credentials
copyWS = new CopyWS.Copy();
copyWS.Url = “http://spe2013dev1:4444/_vti_bin/copy.asmx”;
copyWS.Credentials = new NetworkCredential(“destinationsite-username”, “destinationsite-password”);// create page in destination site using source page info.
CopyWS.CopyResult[] copyResultArray;
string[] copyDest = { “http://spe2013dev1:4444/Pages/test1.aspx” };
uint myCopyUint = copyWS.CopyIntoItems(“http://wssdev:7001/Pages/test1.aspx”, copyDest, mossPageFieldInfoArray, mossPageByteArray, out copyResultArray);

To confirm the migration process, check CopyResult.ErrorCode, if it is successful than your page gets copied successfully else it will show error message.

Additional Information:

  • Page FieldInformation Array
  • Page Byte Array
  • Page Copy Result
Related link:
http://msdn.microsoft.com/en-us/library/copy.copy.copyintoitems%28v=office.12%29.aspx

Best practice for user permission to SharePoint site or list


Generally we have two kind of scenario when we set-up a SharePoint site.  One, public facing site and in other case site is used in intranet- enterprise wide. In later case if we do not want to use anonymous access we use authenticated users as “Domaindomain users”

When we set-up access permission to site or list under a site, we need to consider following cases and use the best suitable one.  If we do not set up the access permission properly then it will be a risk factor to the site

Group
Rating for Intranet Content
Anonymous
Worst
Built inGuest
Bad
Built inEveryone
Bad
Built inAuthenticated Users
Ok
ForestDomain Users (Group Designed to includes all domaindomain users)
Good solution
DomainDomain Users
Good
DomainNamed Security Group with users
Better