Posts

How to take backup and restore a SharePoint site or subsite (Not Site Collection)

Use this.. Enjoy :) Export - spweb – identity http : //sp2010:8083/abc -path c:\sitebkup\mysite.bak Import - SPWeb – identity http : //sp2010:8083/ict -path c:\sitebkup\mysite.bak

Confluence SharePoint Connector Error

Hello! While wrestling with Confluence and SharePoint i got following error in my ULS logs. I Google it and found that the machine key is not same across all of my servers in the farm. I move ahead and checked it manually and found the machine key is identical across all the servers. After contacting Atlassian support i found that i need to remove some configuration from my database. They provided a workaround and it worked like a magic for me. Error: Unable to decrypt persisted value (SPCONTEXT: Current User: XXXXXXXX\XXXXXXXX, Current Web Application: SharePoint - XXXXXXXX.XXXXXXXX.com80, Current URL: http://XXXXXXXX.XXXXXXXX.com/_layouts/Atlassian/ConfluenceSettings.aspx, User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; InfoPath.3; .NET4.0E; MS-RTC EA 2)): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --...

SharePoint 2010 PowerShell Script to restart a Search query component

Following is the code. $SearchApp = Get-SPEnterpriseSearchServiceApplication -identity "Search Service Application" $SearchApp | Get-SPEnterpriseSearchQueryTopology | Get-SPEnterpriseSearchQueryComponent | Where-Object {$_.ServerName -eq 'NT-IRVA-1446'} | Restart-SPEnterpriseSearchQueryComponent

How to copy data from one table to another in SQL Server 2008

How to copy data from one table to another in SQL Server 2008 insert into MultiMedia.dbo.MovieSongs(Col1,Col2,Col3) select Col1,Col2,Col3 colums from MultiMedia_Temp.dbo.MovieSongs

How to get data in temp table and then copy it to another table in SQL Server

How to copy data from temp table in SQL server 2008? with MovieSlice as           (                 select  moviestock .moviesuffix,count( moviesongs.id_song) as songsCount from  moviestock inner join moviesongs on  moviestock .moviesuffix = moviesongs.moviesuffix group by  moviestock .moviesuffix     )     UPDATE      MovieStock SET      MovieStock .songsCount = MovieSlice.songsCount FROM      MovieStock INNER JOIN     MovieSlice ON     MovieSlice.moviesuffix =  MovieStock .moviesuffix

How to get absolute URL of a web application (SPWebApplication) in SharePoint 2010 C#

Hi Here is the sample code to get absolute URL of web application; string path = webApp.GetResponseUri(SPUrlZone.Default).AbsoluteUri; Thanks

Solved! How to send email using C# in .Net , Simple Code

Hi, These settings are using google email. You may configure it accordingly. using System.Net; using System.Net.Mail; MailMessage mail = new MailMessage (); SmtpClient SmtpServer = new SmtpClient ( "smtp.google.com" ); mail.From = new MailAddress ( "from address" ); mail.To.Add( "to address" ); mail.Subject = "Email Subject" ; mail.Body = "Email Body" ; SmtpServer.Port = 587; SmtpServer.Credentials = new System.Net. NetworkCredential ( "from address" , "from address password" ); SmtpServer.EnableSsl = false ; SmtpServer.Send(mail);