Posts

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);

Solved! The state information is invalid for this page and might be corrupted. Solved!

Image
Hello Mates, While working on a ASP.NET project in framework 4.0 i faced a strange error. It was working fine on development machine but failed on server. I google around and spent my 6 to 7 hours to fix the issue. I have tried with making changes in Web.Config and in the page directives but in vain. Finally i decided to troubleshoot my code line by line and point out the issue. The Error was... The state information is invalid for this page and might be corrupted.  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.  Exception Details: System.Web.HttpException: The state information is invalid for this page and might be corrupted. Source Error:  The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then reques...