Friday, November 30, 2007

Writing Managed Code for Browser based Infopath 2007 Form

Ever wondered how to write managed code for Browser based infopath form , check this out :

http://www.microsoft.com/downloads/details.aspx?familyid=db1d99d9-0a31-45de-8efb-16c75e194dc3&displaylang=en

Steps in Nutshell :

  • Change the form security to full trust

Tools -> Form Options -> Security and Trust -> Full Trust

  • Publish Infopath Form to Network Share

  • Upload form to the server

Central Administration > Application Management > Manage Form Templates

  • Active form for desired site collection

  • Access the form using url of following format :

http://"server name"/_layouts/formserver.aspx?xsnlocation="site collection address "/formservertemplates/"form name".xsn&openin=browser&QueryParametername="value"

Tuesday, November 27, 2007

Content Deployment MOSS Hurdles

Collection of hurdles which you might encounter while setting up content deployment in SharePoint 2007

http://soerennielsen.wordpress.com/2007/06/19/the-long-path-to-content-deployment/

Content Deployment in Three Steps ........

Step 1:
Allow Incoming Content Deployment Jobs on the Production Site

Step 2 :
Create Content Deployment Path and Job from Staging to Production

Step 3 :
Run Content Deployment Job


For step by step instruction check out the following article :
http://blogs.msdn.com/jackiebo/archive/2007/02/26/content-deployment-step-by-step-tutorial.aspx

Content Deployment Failed Error

You started with content deployment , defined the content path and job . Everything looks good till you actually run the job and bang the mighty long error

"Failed to compare two elements in the array. at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer) at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer) at System.Collections.Generic.ArraySortHelper`1.Sort[TValue](T[] keys, TValue[] values, Int32 index, Int32 length, IComparer`1 comparer) at System.Collections.Generic.ArraySortHelper`1.Sort(T[] items, Int32 index, Int32 length, IComparer`1 comparer) at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer) at System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer) at System.Collections.Generic.List`1.Sort(IComparer`1 comparer) at Microsoft.SharePoint.Deployment.WebSerializer.GetDataFromObjectModel(Object obj, SerializationInfo info, StreamingContext context) at Microsoft.SharePoint.Deployment.DeploymentSerializationSurrogate.GetObjectData(Object obj, SerializationInfo info, StreamingContext context) at Microsoft.SharePoint.Deployment.XmlFormatter.SerializeObject(Object obj, ISerializationSurrogate surrogate, String elementName, Boolean bNeedEnvelope) at Microsoft.SharePoint.Deployment.XmlFormatter.Serialize(Stream serializationStream, Object topLevelObject) at Microsoft.SharePoint.Deployment.ObjectSerializer.Serialize(DeploymentObject deployObject, Stream serializationStream) at Microsoft.SharePoint.Deployment.SPExport.SerializeObjects() at Microsoft.SharePoint.Deployment.SPExport.Run() *** Inner exception: Object reference not set to an instance of an object. at Microsoft.SharePoint.SPFeature.EnsureProperties() at Microsoft.SharePoint.SPFeature.get_TimeActivated() at Microsoft.SharePoint.Deployment.WebSerializer.ExportFeatureComparer.System.Collections.Generic.IComparer.Compare(ExportObject exportObject1, ExportObject exportObject2) at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer)"

OR

" Content deployment failed.The exception thrown was 'System.InvalidOperationException' : 'Failed to compare two elements in the array.'

Solution :
The exception basically means that some of the features activated at the site collection level no longer exist on disk. Their feature definition files have probably been deleted. This can easily occur if you delete some features from your solution packs without deactivating/reactivating all features on deployment .

So pin point the features causing trouble and remove it and you will be good to go .

Gray Failures: What is it and how to detect one?

If you are reading this article , i guess you are curious to know about gray failures and different methods to detect gray failures.  Hopefu...