SharePointWarrior

My home on the internet to share all of my SharePoint battles with the world

October, 2012

  • SharePoint 2010: Exception occurred while submitting data into the Stager

    Problem: In the ULS logs we found this error:

    Exception occured while submitting data into the Stager (tableName=WAQueryFeedback ): System.InvalidOperationException: The given value of type String from the data source cannot be converted to type nvarchar of the specified target column. ---> System.InvalidOperationException: String or binary data would be truncated.   

    at System.Data.SqlClient.SqlBulkCopy.ConvertValue(Object value, _SqlMetaData metadata)     -

    -- End of inner exception stack trace ---   

    Solution: I first asked the customer to verify that the ‘Usage and Health data collection proxy’ was working properly. He went into Central administration and verified it was accessible and you could get to it. After re-provisioning the service with the below powershell command the error went away:

    $svcAppProxy = Get-SPServiceApplicationProxy | where-object {$_.TypeName -eq “Usage and Health Data Collection Proxy”}
    $svcAppProxy.Provision()

    Fight Comparison:
    Virgil Hill vs Roy Jones Jr…after feeling each other out for a few, Jones took him out in the 4th

  • SharePoint 2010: Web part errors accessing external web sites

    Problem: Today a string a errors appeared on web parts within a customer’s sharepoint 2010 farm such as:

    • Error loading weather details. Unable to connect to the remote server
    • Check weather service connection. Cannot connect to http://weather.msn.com

    Resolution: The fact that this ‘used to work before’ and that all of these problems appeared today  was very suspicious in regards to something in the network having changed. According to the customer no infrastructure changes were made recently. The customer was using NTLM so that was another clue that it could not pass through NTLM authentication. Fix was to bypass the local proxy via the web.config file:

    <system.net>

        <proxy usesystemdefault="false"
          proxyaddress=http://proxy.contoso.com
          bypassonlocal="true" />

    </system.net>

     

    Fight Comparison
    Larry Holmes vs. Leon Spinks…easy

  • SharePoint 2010: No new ULS logs being generated

    Problem: Customer discovered that the ULS logs had stopped generating. Within the Logs file there were files but from an old date.

    Troubleshooting: I looked in Event viewer and found this:

    Tracing Service failed to create the trace log file at location specified in SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\LogDir Error 0x0: The operation completed successfully. . Traces will be written to the following directory: C:\Windows\SERVIC~2\LOCALS~1\AppData\Local\Temp\.

    Resolution:

    1. In Central Admin go to Monitoring>>Configure diagnostic logging
    2. changed the ‘Path’ value to C:\Temp and then back to D:\SharePoint\Logs
      (They have the logs being written to the D drive which is common, changing it back and forth resolved this problem)

    Fight Comparison
    Fedor vs Arlovski:
    This was an easy one that was a weird resolution but it worked. Kind of like when Fedor was getting pushed back by Arlovski, and then decided to throw a Hail Mary punch to his face, knocking him out cold.

  • Powershell: How to convert a ‘Single line of Text’ column to ‘Multi-line of Text’

    Problem: Customer needed a way, via PowerShell to convert a column from single line of text to Multi-line of text. I first verified that the column they were trying to convert was not the default ‘Title’ column, I would not recommend touching that one. The customer had run into an issue where the Single Line of text column’s 255 character limit was truncating some entries.

    Solution:

    $web=Get-SPWeb "http://nameOfSite"

    $list = $web.Lists["NameOfList"]

    $column = List.Fields["ColumnName"]

    $script:noteFieldType = [Microsoft.SharePoint.SPFieldType]::Note

    $column.Type = $noteFieldType

    $column.Update()

    $web.Dispose()

    NOTE: Remember to run these scripts with the correct permissions. When the customer ran it the first time, they had some vague errors like 'Cannot index into a null array'. Found out they were logged into the server as themselves, once they logged in as a farm account, the script worked fine.

    Fight Comparison:
    Mike Tyson Vs. Carl ‘The Truth’ Williams…easy KO