Tuesday, April 17, 2012

SharePoint 2010 + ssis adapter + currency field

The currency field in SharePoint list is not updated with the value we get from the source.

After hours of "trail & error" methods, found solution.

Currency field's source data type is "Numeric"

this data type to be changed to "float" using Data Conversion component.

then it worked.




sharePoint + SSIS adapters + The content type text/html; charset=utf-8 of the response message does not match

I am getting the following lengthy error.

[SharePoint List Destination 1 [3738]] Error: System.ServiceModel.ProtocolException: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:o="urn:schemas-microsoft-com:office:office" lang="en-us" dir="ltr">
<head><meta http-equiv="X-UA-Compatible" content="IE=8" /><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Expires" content="0" /><title>
   
Error Page

</title><link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/layouts.css?rev=aTcoNUf8p1YiDzYCg3%2FLIw%3D%3D"/>
<link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/corev4.css?rev=iIikGkMuXBs8CWzKDAyjsQ%3D%3D"/>

    <script type="text/javascript">
    var _fV4UI = true;
    </script>
    <script type="text/javascript">
// <![CDATA[
document.write('<script type="text/javascript" src="/_layouts/1033/init.js?rev=BjQJs0OCQh3Zfydsdw2MYw%3D%3D"></' + 'script>');
document.write(''.

Server stack trace:
   at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.ListsService.ListsSoap.UpdateListItems(UpdateListItemsRequest request)
   at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.ListsService.ListsSoapClient.ListsService_ListsSoap_UpdateListItems(UpdateListItemsRequest request)
   at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.ListsService.ListsSoapClient.UpdateListItems(String listName, XElement updates)
   at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.Adapter.ListsAdapter.ExecuteSharePointUpdateBatch(String listName, String viewId, XElement batchXml, Int16 batchSize)
   at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.ListServiceUtility.UpdateListItems(Uri sharepointUri, NetworkCredential credentials, String listName, String viewName, IEnumerable`1 fieldValueList, Int16 batchSize)
   at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListDestination.ProcessInput(Int32 inputID, PipelineBuffer buffer)
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)






I got this error while updating data to my sharepoint list. After struggling a lot found the solution.

the problem is,  SharePoint Event Receivers ,  I have some event receivers on this list, while updating those items, it throws the error. ultimately SSIS adapter is throwing error like above.

So i deactivated the feature which contains the event receivers temporarily and executed the SSIS package.

voila  "IT'S WORKING"


This may help those who overlooks the event receivers

Thursday, February 16, 2012

Error occurred in deployment step 'Recycle IIS Application Pool': Provider load failure

I got this error while deploying my application in SharePoint Foundation.

I tried Reset IIS,
Restart SP 2010 Administration servce
Restart SP 2010 Timer servce
close & re-open Visual Studio.......

nothing made my solution deploy 

finally I did

restart the WMI Performance Adapter service on the machine in services. Worked for me.

Sunday, February 12, 2012

Your backup is from a different version of Microsoft SharePoint Foundation

I got this error while restoring a backup taken from my Dev server onto QA server.

The error was "Your backup is from a different version of Microsoft SharePoint Foundation and cannot be restored to a server running the current version. The backup file should be restored to a server with version ’14.0.0.4762′ or later"

After googling for many hours found some solutions

1. In Central Admin, go to "Upgrade and Migration".  Click on "Check product and patch installation status".  Scroll down the page of results and see if there are any links to updates that have been installed on the original server that are not on the new server, or vice-versa.
If you find different versions then update the hotfix on the other server. after updating make sure both server's versions are same.

Then I tried to restore again.
 This time I got "Your backup is from a different version of Microsoft SharePoint Foundation and cannot be restored to a server running the current version. The backup file should be restored to a server with version '4.0.145.0' or later.""

Then again googled found this article

http://rahi2sharpoint.blogspot.com/2011/12/your-backup-is-from-different-version.html#!/2011/12/your-backup-is-from-different-version.html

Thanks to author

the reason is, though foundation is update to date, content database is still not upgraded to new version. To ensure follow these steps

  1. Check The DB schema
  2. Get-SPContentDatabase <DB name>| Format-List *
    In this check the SchemaVersionXML if it is "4.0.145.0" then you have to run the below powershell script
  3. Upgrade-SPContentDatabse –Identity <DB Name>

Then I tried taking a fresh backup and restoring. This time its SUCCESSFUL . I Used STSADM to do this
This one helped me to resolve the problem which I faced.


For your info:- To ensure the versions in both servers.  Open the target application's content database in both servers then find a table called "VERSIONS". Then query the table and find the versions that web application using. it shows both versions of Foundation as well as content databse version. DO NOT try to change anything here.
 
have a look at this URL. It may help you.
http://moustafa-arafa.blogspot.com/2011/11/sharepoint-restore-error-your-backup-is.html












Thursday, December 8, 2011

A Project Item with the following item ID could not be found

In SharePoint 2010, this error may occur.

it happens when you delete/exclude any item in sharepoint project.

The solution is :-  goto the feature(mentioned in the error in visual studio)  try to find the problematic file.

The file will be identified easily. just remove that file from the "Items in the future"  section.

the problem will be solved. (it worked for me)


happy coding.....:-)










Word experienced an error trying to open the file

Thanks to author @ http://blog.techgalaxy.net/archives/3042

the problem is occurred while opening doc file (created in 2007) in office 2010.

the trick to open the file is


  1. Open Word 2010.
  2. Click File, Options, Trust Center, Trust Center Settings.
  3. Select the Protect View option.
  4. Deselect all the Protected View options. You may not have to disable Data Execution Prevention mode. Experiment with the various options until you get the results.

Tuesday, December 6, 2011