http://sharepoint2010shyju.blogspot.com/2010/12/creating-custom-timer-job.html?showComment=1296184785817#c3173481420652015259
please refer this link. I must say thanks to the author Mohan for his great post.
the logic is
1. use the properties like below in ur timer job class
[Persisted()]
public string MyCustomProperty;
2. assign the url of the web (site/subsite..whatever) to the property in feature activated event
SPWeb webN = properties.Feature.Parent as SPWeb;
taskLoggerJob.MyCustomProperty = webN.ServerRelativeUrl;
Note:- my scope is web
3. Use the property in Execute method
SPSite _siteCol = new SPSite(this.WebApplication.Sites[0].Url);
SPWeb _site = _siteCol.AllWebs[MyCustomProperty]; //
Note:- I have one site collection, (u can refer ur site collection using contentdbId)
:-), thats it...Happy coding
Thursday, January 27, 2011
Thursday, January 13, 2011
SharePoint Foundation + Search Server 2010
http://sptechpoint.wordpress.com/2010/11/30/your-search-cannot-be-completed-because-this-site-is-not-assigned-to-an-indexer/
This blog saved my day. Once you install the SSE, u have to configure it in Central Admin site
1. Go to Central Admin as login as the farm Administrator
2. Go to Application Management tab
3. Select SharePoint Web Application Management heading | Content databases
4. Ensure your web application is the one selected
5. Select your content database name
6. Under Search Server – select your server (if your search server drop down is disabled please follow the additional steps below)
7. Go to 12 hive folder and open stsadm.exe utility
8. Run the following command psconfig.exe -cmd services -install
9. Then run stsadm -o spsearch -action start (specify the farm account if required)
Thnx to the author of the mentioned link
This blog saved my day. Once you install the SSE, u have to configure it in Central Admin site
1. Go to Central Admin as login as the farm Administrator
2. Go to Application Management tab
3. Select SharePoint Web Application Management heading | Content databases
4. Ensure your web application is the one selected
5. Select your content database name
6. Under Search Server – select your server (if your search server drop down is disabled please follow the additional steps below)
7. Go to 12 hive folder and open stsadm.exe utility
8. Run the following command psconfig.exe -cmd services -install
9. Then run stsadm -o spsearch -action start (specify the farm account if required)
Thnx to the author of the mentioned link
Subscribe to:
Posts (Atom)