tag:blogger.com,1999:blog-75314599934178036862024-03-21T06:18:31.947-07:00Assorted SharePoint Thoughts - Chaitu MadalaAnonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.comBlogger119125tag:blogger.com,1999:blog-7531459993417803686.post-82937097909949500002015-09-08T01:52:00.000-07:002015-09-08T01:54:01.283-07:00How to call SharePoint REST Web Services from SharePoint Designer 2013 and Fiddler?<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>What?</u></b><br />
<br />
SharePoint 2013 introduced a new action in SharePoint Designer 2013 workflows to call a http web service called "Call HTTP Web Service".<br />
<br />
There are thousand other blog posts explaining how to use that action but in this post I am going to focus on and detail how to use GET and POST http methods with REST based native SharePoint 2013 web services.<br />
<br />
<b><u>Why?</u></b><br />
<br />
SharePoint 2013 (and previous versions) uses a client side “token” to validate posts back to SharePoint to prevent attacks where the user might be tricked into posting data back to the server. This token is known by many names; <em>form digest </em>or<em>message digest </em>or <em>request digest. </em>The token is unique to a user and a site and is only valid for a (configurable) limited time.<br />
<br />
Calling a SharePoint 2013 REST POST http method therefore requires adding the Request Digest token to the request header of the request as the “X-RequestDigest” header.<br />
<br />
<b><u>How?</u></b><br />
<br />
The first step to test out the queries is to use <a href="http://www.camldesigner.com/">CAML Designer 2013</a> and Fiddler.<br />
<br />
<a name='more'></a><br /><br />
CAML Designer 2013 provides the ability to build REST urls with selected fields, filters and order by.conditions.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVA7GwfEY6DIcVonj-Zhr3xYFQDkJVhLgdyob2047nxmU_8HAoXrgSUAGF7RGIR5AL35bSsAiev3wFl5Ib3tb09q-_T-QMYWFpkIAJ19np0cQBSDyPR3Pkez_AvW-5aI-OPqrW9zFhWc0/s1600/CAML+Designer+2013.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="315" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVA7GwfEY6DIcVonj-Zhr3xYFQDkJVhLgdyob2047nxmU_8HAoXrgSUAGF7RGIR5AL35bSsAiev3wFl5Ib3tb09q-_T-QMYWFpkIAJ19np0cQBSDyPR3Pkez_AvW-5aI-OPqrW9zFhWc0/s640/CAML+Designer+2013.PNG" width="640" /></a></div>
<br />
<br />
Calling a SharePoint REST web service using a GET http method is straight forward.<br />
<br />
Fire up Fiddler and go to composer > options<br />
Make sure that the check box "Automatically Authenticate" is checked.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgklSspvcqu6e0XFw8Iuzi29f0qfKFNd7SiTNDxB9r6IkKIUcTZAyyg7bOmh5sGXo_xS9i4R3z0KVWA4abmbn-J_T_bwqIgfW_pR4h-8HneMfXAgL_K-Q0ijaT09C42vwo_olcJgceh-Rc/s1600/Fiddler+0.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="462" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgklSspvcqu6e0XFw8Iuzi29f0qfKFNd7SiTNDxB9r6IkKIUcTZAyyg7bOmh5sGXo_xS9i4R3z0KVWA4abmbn-J_T_bwqIgfW_pR4h-8HneMfXAgL_K-Q0ijaT09C42vwo_olcJgceh-Rc/s640/Fiddler+0.PNG" width="640" /></a></div>
<br />
<br />
Click on the tab "Parsed" and choose "GET" as the http method.<br />
Provide the full REST url. You can use CAML Designer to build this. (ex: http://site/_api/web/Lists/getByTitle('Target%20List')/Items)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Ensure that the below headers are added to the request headers section:<br />
<br />
ACCEPT: application/json;odata=verbose<br />
Content-Type: application/json;odata=verbose<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtFlW22v0yWsANjhAcYX0qn9467JeutYDRlESJ3zIxGVEaC4FnKx83PRmmRBPfZZOARDG1X8oB91bje1dNXW2P2ep7fpSUMcaviItHreBL1BNseHtA1FXD2WgMzPGbfomrBySqOXytqDg/s1600/Fiddler+1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtFlW22v0yWsANjhAcYX0qn9467JeutYDRlESJ3zIxGVEaC4FnKx83PRmmRBPfZZOARDG1X8oB91bje1dNXW2P2ep7fpSUMcaviItHreBL1BNseHtA1FXD2WgMzPGbfomrBySqOXytqDg/s640/Fiddler+1.PNG" width="640" /></a></div>
<br />
<br />
Click the Execute button and you will see the results.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNs49VNbVdz3yA8BUo059UlRA1BQicVce9gD6uj_wSNBflIE8o1bz8zsilgNtdM4P9HJ67Z7gY2FDgIDEE2Ca072ey9Fd_nkhAyY6PCN_Oye_halo4oytBpxQ2L8jqRp3CWS8SLA0qk3Q/s1600/Fiddler+2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNs49VNbVdz3yA8BUo059UlRA1BQicVce9gD6uj_wSNBflIE8o1bz8zsilgNtdM4P9HJ67Z7gY2FDgIDEE2Ca072ey9Fd_nkhAyY6PCN_Oye_halo4oytBpxQ2L8jqRp3CWS8SLA0qk3Q/s640/Fiddler+2.PNG" width="640" /></a></div>
<br />
<br />
There are so many nice posts in the internet explaining how to call an HTTP GET REST Web Service using a SharePoint Designer workflow and parse the results.<br />
<br />
Updating a item using POST that does not belong to a list in the web in which the workflow runs however is tricky as it requires you to add the Request Digest token to your request.<br />
<br />
<b>POST using Fiddler:</b><br />
<br />
Any POST operation requires the X-RequestDigest token.<br />
<br />
As described on <a href="https://msdn.microsoft.com/en-us/library/jj164022.aspx">this page on MSDN</a>, you can retrieve this value by making a POST request with an empty body to http://site/_api/contextinfo and extracting the value of the "d:FormDigestValue" node in the XML that the contextinfo endpoint returns.<br />
<br />
Open Fiddler and go to composer.<br />
Specify POST as the http method and http://{site}/_api/contextinfo as the url.<br />
Ensure the below headers are added to the request header:<br />
<br />
ACCEPT: application/json;odata=verbose<br />
Content-Type: application/json;odata=verbose<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQfER9lfeNRDey4kozq1ajZ1mu-IqS0hQ-Mv8AcsRhbAZCrXBXLB_JgFuSyLdxmw5PmHn2BaSP8dUQlVT1hdYN7oy-7816VoHdSFEENen1zF9GNVqNVsvqtAHK2uFCE5qRN4CUrNT30Oc/s1600/Fiddler+3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="346" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQfER9lfeNRDey4kozq1ajZ1mu-IqS0hQ-Mv8AcsRhbAZCrXBXLB_JgFuSyLdxmw5PmHn2BaSP8dUQlVT1hdYN7oy-7816VoHdSFEENen1zF9GNVqNVsvqtAHK2uFCE5qRN4CUrNT30Oc/s640/Fiddler+3.PNG" width="640" /></a></div>
<br />
<br />
You will see the below results when you execute.<br />
<br />
The below procedure explains how to update an item.<br />
<br />
Copy the X-RequestDigest token (highlighted in yellow)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5_TvdC3cYpnMobDfAXh_h8v6sonXBNe25E01wA-xNRrNhzBEB6zZzkVH2YhWEPRbUJsi933EmqSCTfn0Y8Rpj9QiaZopjEqDW9XvuQj4lcg5c8sDcs07xv5nCSz2sHuXItSCUCCu-vkA/s1600/Fiddler+4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="486" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5_TvdC3cYpnMobDfAXh_h8v6sonXBNe25E01wA-xNRrNhzBEB6zZzkVH2YhWEPRbUJsi933EmqSCTfn0Y8Rpj9QiaZopjEqDW9XvuQj4lcg5c8sDcs07xv5nCSz2sHuXItSCUCCu-vkA/s640/Fiddler+4.PNG" width="640" /></a></div>
<br />
<br />
Open Fiddler and go to composer.<br />
Specify POST as the http method and the REST query to retrieve the item to update.<br />
<br />
Ensure that the below headers are added to the request header:<br />
<br />
ACCEPT: application/json;odata=verbose<br />
Content-Type: application/json;odata=verbose<br />
X-RequestDigest: (In this format: <i>0x269CE93D2C4929E37FDFABE3994611EB74791A66681DC23CBC04CEDDAF85C99B87D2B2F82B5F75F9E788A15986F04E37C0A7739F4371DB7527969FEBB1FA1AAB,08 Sep 2015 01:40:18 -0000)</i><br />
X-HTTP-Method: MERGE<br />
IF-MATCH: *<br />
Content-Length: 91<br />
<div>
<br /></div>
<div>
Please note that the below headers are important to perform updates:</div>
<div>
X-HTTP-Method: MERGE<br />
IF-MATCH: *<br />
<br />
Build the request body to update the item:<br />
<br />
For example the following will update a column named Booked Leave with value 23 in a list item:<br />
{ '__metadata': { 'type': 'SP.Data.Target_x0020_ListListItem' }, 'Booked_x0020_Leave': 23 }<br />
<br />
If you are not sure about how to build the response body, please refer to <a href="http://www.fabiangwilliams.com/2013/09/03/more-on-sharepoint-2013-rest-api-with-fiddler-and-spd/">this awesome post</a> by Fabian<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghlgdQcJXBVTnEHATFm7P5FeSYUSk9rTY1SiNaIJP3uvDIsgQXEgnjVQ1sqgRrxJr5cYuOSiJU5t4c53DEA3V70og8U0Xwsh50P0zPmGuJmURLick-L-dkk2s7HqZHANwMYbIdOOyOn5U/s1600/Fiddler+5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="538" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghlgdQcJXBVTnEHATFm7P5FeSYUSk9rTY1SiNaIJP3uvDIsgQXEgnjVQ1sqgRrxJr5cYuOSiJU5t4c53DEA3V70og8U0Xwsh50P0zPmGuJmURLick-L-dkk2s7HqZHANwMYbIdOOyOn5U/s640/Fiddler+5.PNG" width="640" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
Hit execute and you should see "<i>HTTP/1.1 204 No Content"</i> in the response header for a successful update.</div>
<div>
<br /></div>
<div>
If the response header contains "Forbidden", it can mean that the request digest token is invalid.</div>
<div>
<br /></div>
<div>
<b>Post using SharePoint Designer 2013:</b></div>
<div>
<b><br /></b></div>
<div>
The request digest token is unique to a user and a site and is only valid for a (configurable) limited time.</div>
<div>
It therefore has to be updated every time before a POST method is called.</div>
<div>
<br /></div>
<div>
<a href="http://blog.ctp.com/2014/03/12/updating-list-items-using-sharepoint-2013-workflow-engine/">This wonderful post</a> by Alaxandre explains how to update a list item in a list that resides in the same web as the item on which the workflow is triggered using SPD 2013.</div>
<div>
<br /></div>
<div>
For updating items that reside in a list that belongs to a different site collection / web,follow the below process:</div>
<div>
<br /></div>
<div>
Build a dictionary with the following headers:</div>
<div>
ACCEPT: application/json;odata=verbose<br />
Content-Type: application/json;odata=verbose<br />
Authorization: Leave empty. Do not specify ""<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBqto60k7cTkxeYYPl2PzR6s3ityvMXuoE4x7xTOQqoEIIKt2POSUKnTxQZldU_IxEOA3e8QAMLjxwhWfPfB-V7j1l3nUf_4_vOQDaIOg2TDZOhbN9W2A2M4qQA3SeAo0dh2cpcKanfnQ/s1600/SPD+Get+Token.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBqto60k7cTkxeYYPl2PzR6s3ityvMXuoE4x7xTOQqoEIIKt2POSUKnTxQZldU_IxEOA3e8QAMLjxwhWfPfB-V7j1l3nUf_4_vOQDaIOg2TDZOhbN9W2A2M4qQA3SeAo0dh2cpcKanfnQ/s640/SPD+Get+Token.PNG" width="640" /></a></div>
<br />
<br />
Call the action "Call HTTP Web Service" with the url: http://{site url}/_api/contextinfo and specify "POST" as the http method. Make sure that you set the above dictionary as the request header.<br />
<br />
Call the action "Get an item from a Dictionary" with "d/GetContextWebInformation/FormDigestValue" as the value for "item by name or path" from the response of the above action and output to a string variable.<br />
<br />
Use the above request token with the POST request header to update the list item.<br />
<br />
Your request header dictionary should look like the below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib2vuAQ8mKFv_OMAiJ6FDWOP54soR8gG5FaOl9i5xmS4WiksyTl2RiVIigPl6GKfo67V9mzXRu01cuPxXkI4HADBvQeJte_CYszewWU-brDTxDeMIMU8O8TaggMkakVqJAd-fj59dmXTk/s1600/SPD+Get+Token+2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib2vuAQ8mKFv_OMAiJ6FDWOP54soR8gG5FaOl9i5xmS4WiksyTl2RiVIigPl6GKfo67V9mzXRu01cuPxXkI4HADBvQeJte_CYszewWU-brDTxDeMIMU8O8TaggMkakVqJAd-fj59dmXTk/s640/SPD+Get+Token+2.PNG" width="594" /></a></div>
<br />
<br />
Run the workflow and you should see "<i>No Content"</i> in the response header for a successful update.<br />
<div>
<br /></div>
<div>
If the response header contains "Forbidden", it can mean that the request digest token is invalid.</div>
</div>
<div>
<br /></div>
<div>
Hope that this helps.</div>
</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com1Melbourne VIC, Australia-37.814107 144.96327999999994-38.6164245 143.67238649999993 -37.0117895 146.25417349999995tag:blogger.com,1999:blog-7531459993417803686.post-18249966953695734212014-09-25T19:28:00.000-07:002014-09-25T19:33:02.088-07:00Inconvenient Document Template Access Issues and Send To connections in SharePoint<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>What?</u></b><br />
<br />
You have a SharePoint site (Site A) that has got a content type with a document template attached to it.<br />
You have created a few documents using the document template and them moved them into a different site (Site B).<br />
<br />
A user who has access to the document in the new location (Site B) but does not have access to Site A tries to access it and gets prompted to authenticate against Site A.<br />
<br />
Eventually being a not so technical end user, he gets his accounts locked after trying his credentials repeatedly.<br />
<a name='more'></a><b><u><br /></u></b>
<b><u>Why?</u></b><br />
<br />
When a document that was created using a template that is associated with its content type is moved or copied to a different location, it still points to the original document template using which it was created in the original location. When a user who does not have access to the site from which the document is copied from, he/she will be prompted to authenticate against the site where the document originally was created.<br />
<br />
<b><u>How?</u></b><br />
<br />
Document templates that are attached to content types are uploaded to a folder at the root of the site called "_cts". It is not possible to alter permissions on that folder.<br />
<br />
The easiest way to handle this would be to create a custom permission level which will only have the below permissions. All the below permissions are required at a minimum:<br />
<br />
<ul style="text-align: left;">
<li>View Application Pages - View forms, views, and application pages. Enumerate lists.</li>
<li>Use Remote Interfaces - Use SOAP, Web DAV, the Client Object Model or SharePoint Designer interfaces to access the Web site. </li>
<li>Open - Allows users to open a Web site, list, or folder in order to access items inside that container.</li>
</ul>
<div>
<br />
Create a new SharePoint group and only give the above newly created permission level to it, then add the user "DOMAIN USERS" or "Everyone" to it.</div>
<div>
<br /></div>
<div>
Due to the very limited permissions that are given to users in this group, users in the new group won't be able to access any content in the site. They however will still be able to access the structure of the site and the list of all the lists and libraries in the site but wont be able to access content inside them.</div>
</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-61521321270926942232014-09-25T17:37:00.005-07:002014-09-25T19:30:35.894-07:00How to reuse / associate list workflows built using SharePoint Designer 2013 on multiple lists<div dir="ltr" style="text-align: left;" trbidi="on">
<b>What?</b><br />
<b><br /></b>
How to reuse / associate list workflows built using SharePoint Designer 2013 on different lists<br />
<br />
<b>Why?</b><br />
<br />
You want to built a reusable list workflow using SharePoint Designer 2013 and be able to attach them to multiple lists.<br />
<br />
<a name='more'></a><br />
<b>How?</b><br />
<br />
Create a list<br />
Develop a workflow using SharePoint Designer 2013<br />
Export the workflow to Visio 2013<br />
<br />
If you delete the workflow from the list and try to import it back, you won't be given the option to choose a list as long as the list on which the workflow was built exists.<br />
<br />
To enable this workflow to be associated to any list, delete the list (and create the list again if needed)<br />
<br />
Once the original list on which the workflow was built has been deleted, SharePoint Designer 2013 lets you associate the workflow with any list.<br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-28395124112929025652014-08-05T05:30:00.001-07:002014-08-05T05:30:56.200-07:00You receive an error "The {Send To Connection} site could not be found or accessed." when you try to send a document using "Send To" in SharePoint 2013<div dir="ltr" style="text-align: left;" trbidi="on">
<u><b>What?</b></u><br />
<u><b><br /></b></u>
You receive an error "The {Send To Connection} site could not be found or accessed." when you try to send a document using "Send To" connections in SharePoint 2013.<br />
<br />
<b><u>Why?</u></b><br />
<br />
I have tried to copy documents from one site collection (Site A) to another (Site B) using Send To connections in SharePoint 2013. Documents sent from Site A to Site B were sent successfully whereas documents that are sent from Site B to Site A failed with the exception:<b><i> "The {Send To Connection} site could not be found or accessed."</i></b><br />
<br />
<a name='more'></a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm2y81XO91aCHd-ydss1GGJTWk0_2mzGHWuZtLu12njHbJQ6NyucNBap9KxTWtS_Cj69fpePRWXjTWpIGfsEECClJH6dOa5IhNft1C5RwBIVhDoaVU83MvN54N34_qHwmSwd4patXos0o/s1600/Send+To+Error.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm2y81XO91aCHd-ydss1GGJTWk0_2mzGHWuZtLu12njHbJQ6NyucNBap9KxTWtS_Cj69fpePRWXjTWpIGfsEECClJH6dOa5IhNft1C5RwBIVhDoaVU83MvN54N34_qHwmSwd4patXos0o/s1600/Send+To+Error.PNG" height="162" width="320" /></a></div>
<br />
<br />
ULS logs has the following entry: <i><span style="color: blue; font-family: Courier New, Courier, monospace;">"The request failed with HTTP status 401: Unauthorized"</span></i><br />
<br />
The above error definitely says that it is a permission related issue.<br />
<br />
<b><u>How?</u></b><br />
<b><u><br /></u></b>
Further investigation has shown that the service accounts that are used by Site A and Site B are different.<br />
<br />
In order for the "Send To" connections to work successfully, you need to make sure that the service accounts that are configured to run application pools for both the web applications needs to be able to access the respective target sites.<br />
<br />
Just add the service accounts that run the app pools to the group "Records Center Web Service Submitters" which is automatically added when the content organizer feature is turned on.</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-50003034009059279662014-03-18T17:28:00.000-07:002014-03-18T17:28:20.022-07:00How to fix SharePoint 2013 Designer list workflows on pages libraries that automatically get cancelled with HTTP 500 exception<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>What?</u></b><br />
<b><u><br /></u></b>
List workflows that are built using SharePoint 2013 Designer on pages libraries in SharePoint 2013 get cancelled automatically with internal status "Cancelled" as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6p-R2zQmDRrPJRKGwQBQi_NLH2rcXJAmQd-6kWxBfZb4AVFWCCFda4_y1EAC_V3bhlAqTkCpI9DDdpAaebO2-hlrF2AZpzf8s8ZK65v5YVaNcMG9zPUE3ww41QuDUShxJAatD0YTgvp8/s1600/Workflow+Error+1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6p-R2zQmDRrPJRKGwQBQi_NLH2rcXJAmQd-6kWxBfZb4AVFWCCFda4_y1EAC_V3bhlAqTkCpI9DDdpAaebO2-hlrF2AZpzf8s8ZK65v5YVaNcMG9zPUE3ww41QuDUShxJAatD0YTgvp8/s1600/Workflow+Error+1.PNG" height="145" width="400" /></a></div>
<br />
<a name='more'></a><br />
When you click the little icon in blue "i" next to the internal status, you will notice the below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjINJwHlQLiVkK7e9iVT9bxNk5RCVPWQ_Zqf4XTqP2pkR8qIkGbZ3bbkezxDwfdUUo-UZcTWleVYe9k5rHOUyAxdYH6LcdnmD6jpW50zjn28hXuQnagzeIMLiCuIq-4RVy7Ry5Kp8AvcZ4/s1600/Workflow+Error+2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjINJwHlQLiVkK7e9iVT9bxNk5RCVPWQ_Zqf4XTqP2pkR8qIkGbZ3bbkezxDwfdUUo-UZcTWleVYe9k5rHOUyAxdYH6LcdnmD6jpW50zjn28hXuQnagzeIMLiCuIq-4RVy7Ry5Kp8AvcZ4/s1600/Workflow+Error+2.PNG" height="443" width="640" /></a></div>
<br />
Details of the error:<br />
<br />
<i><span style="color: #e06666; font-size: x-small;">RequestorId: 3b5950f5-6aff-ea13-1923-b68a876d73ae. Details: System.ApplicationException: HTTP 500 {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["0"],"SPClientServiceRequestDuration":["278"],"SPRequestGuid":["3b5950f5-6aff-ea13-1923-b68a876d73ae"],"request-id":["3b5950f5-6aff-ea13-1923-b68a876d73ae"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"MicrosoftSharePointTeamServices":["15.0.0.4481"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Cache-Control":["max-age=0, private"],"Date":["Tue, 18 Mar 2014 23:15:24 GMT"],"Server":["Microsoft-IIS\/7.5"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager </span></i><br />
<br />
<b><u><span style="color: blue;">All other list workflows that are configured to run on SharePoint lists work just fine</span></u></b><br />
<u><b><br /></b></u>
<u><b>Why?</b></u><br />
<br />
This is a tricky one to find and to this point I am not sure whether this is the correct work around. This workaround just worked for my scenario and I don't actually propose this is a solution in any way.<br />
<br />
I have fiddled with number of things. Who know you might as well try these and you may end up with functioning workflows.<br />
<br />
<ul style="text-align: left;">
<li>Ensure that <b>you are not logged in</b> as system account</li>
<li>Re-publish the workflow</li>
<li>Make sure that the User profile synchronization has started</li>
<li>Ensure that the currently logged in user is picked up by user profile sync</li>
<li>Re-register the workflow service using Register-SPWorkflowService –SPSite "http://{server-name}" –WorkflowHostUri "http://{server-name}:12291" –AllowOAuthHttp -Force</li>
</ul>
<br />
None of the above worked for me.<br />
<br />
In my case, after fiddling a lot for hours, I figured out that versioning settings on the pages library were the root cause of the problem.<br />
<br />
<u><b>How?</b></u><br />
<br />
I turned off "Require documents to be checked out before they can be edited" in the pages library's versioning settings page.<br />
<br />
Go to the pages library's settings page:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcNHKBXwj-rhL-SeYEKJXUv9cjBBSmjEpVcQaB2Mu3WjOd9PHkj-XOYvnH-cbGEZTlBrM6MDK8g_ZTAENjPEmyU4PySCw7R3RJ75a_4UZYBu_omsuw8GzpI8duAwf0nxUkDuk2ZCyU4O4/s1600/Workflow+Error+3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcNHKBXwj-rhL-SeYEKJXUv9cjBBSmjEpVcQaB2Mu3WjOd9PHkj-XOYvnH-cbGEZTlBrM6MDK8g_ZTAENjPEmyU4PySCw7R3RJ75a_4UZYBu_omsuw8GzpI8duAwf0nxUkDuk2ZCyU4O4/s1600/Workflow+Error+3.PNG" height="379" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV79eyGLXjHl4CaJP-x2TzYWAmITkNPLJP5yvpTcvIWFwVdF_OiMCf9QLW-aCK4p68DsWM083qX4kDqTThRSY4cb4vEBs2xViFRUR0LKyP-zvXu1PlkyodtaxnbhtbblGhPNu1CiDPi2k/s1600/Workflow+Error+4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV79eyGLXjHl4CaJP-x2TzYWAmITkNPLJP5yvpTcvIWFwVdF_OiMCf9QLW-aCK4p68DsWM083qX4kDqTThRSY4cb4vEBs2xViFRUR0LKyP-zvXu1PlkyodtaxnbhtbblGhPNu1CiDPi2k/s1600/Workflow+Error+4.PNG" height="320" width="243" /></a></div>
<br />
<br />
Click on "Versioning Settings"<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxsTvM9aPQLZCJHl0MV3WgEgOXm-Ks0ZyuwyaCvkFG-sEZ5_ZbiP5i6IGEn3xdQeCBuDcX4urEGbEiMGySQ196a4GebzGrXlUGwXe_LPY5rZKON24smMV9Ss0zmgZQlkeYYAu__1D8vT4/s1600/Workflow+Error+4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxsTvM9aPQLZCJHl0MV3WgEgOXm-Ks0ZyuwyaCvkFG-sEZ5_ZbiP5i6IGEn3xdQeCBuDcX4urEGbEiMGySQ196a4GebzGrXlUGwXe_LPY5rZKON24smMV9Ss0zmgZQlkeYYAu__1D8vT4/s1600/Workflow+Error+4.PNG" height="640" width="486" /></a></div>
<br />
Make sure that the setting "Require documents to be checked out before they can be edited" is turned off. (It is turned on by default)<br />
<br />
Hope this helps someone and please post me the actual resolution if someone is able to identify the root cause for this problem.<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com2tag:blogger.com,1999:blog-7531459993417803686.post-61483269597652883702013-12-09T23:30:00.000-08:002013-12-09T23:30:03.578-08:00Migrate browser based InfoPath Forms with code behind from MOSS 2007 to SharePoint 2013<div dir="ltr" style="text-align: left;" trbidi="on">
<u><b>What?</b></u><br />
<br />
How to successfully migrate browser based InfoPath Forms with code behind from MOSS 2007 to SharePoint 2013?<br />
<br />
In this post I will try to explain some of the obstacles that you might be hit with and the ways to get around them.<br />
<br />
Please use this is a general guide to understand the overall migration process.<br />
<br />
<a name='more'></a><br />
<u><b>Why?</b></u><br />
<br />
InfoPath forms migration has always been a pain. Every version of InfoPath is different from its previous version.<br />
<br />
Unless third party tools like AvePoint’s DocAve Migrator are used for migration, there is no direct path from MOSS 2007 to SharePoint 2013. The web applications that are required to be migrated will first have to be migrated to SharePoint 2010 and then to SharePoint 2013.<br />
<br />
With InfoPath forms that contain code behind however, no tool can help you. You will have to rebuild and redeploy the InfoPath form solution even if you use third party tools.<br />
<br />
In my scenario, I had to migrate browser based InfoPath forms that were built in InfoPath 2007 with custom code behind into SharePoint 2013.<br />
<br />
I am totally against and would not recommended writing code behind with InfoPath forms at all but I had to migrate and support the forms that are already being used.<br />
<div>
<br /></div>
<u><b>How?</b></u><br />
<u><b><br /></b></u>
The first step is to migrate all the content from MOSS 2007 to SharePoint 2010.<br />
<br />
<u>Migrate content from MOSS 2007 to SharePoint 2010:</u><br />
<br />
Perform the migration of the content from MOSS 2007 farm to the SharePoint 2010 farm first. I have used Database Attach method to mount the content databases.<br />
<br />
<u>Rebuild the InfoPath Form Template in InfoPath 2010:</u><br />
<br />
<ul style="text-align: left;">
<li>Find the InfoPath form template and open it in design mode</li>
<li>Go to File > Form Options > Security and Trust and ensure that the security is set to full trust and that the form template is signed.</li>
<li>If the InfoPath template does not have any data connections, we can go ahead and publish the .XSN form into a network location (Make sure to leave the path in the second dialog as empty)</li>
<li>If the InfoPath template contains any data connections, follow the procedure below:</li>
<li>Go to File > Publish > Export Source Files and save the files.</li>
<li>Go to the location where the source files are saved. Find the file “manifest.xsf” and edit it in note pad or your favourite editor. Find and replace all the references to old site url with the new site url and make a note of all the data connections.</li>
<li>Publish the manifest file as a .XSN form</li>
</ul>
<br />
<u>Building the Visual Studio 2010 solution to deploy the InfoPath form:</u><br />
<br />
Dr. Nader has posted a <a href="http://nader.elshehabi.com/2011/08/how-to-really-deploy-infopath-2010-forms-with-code-behind-as-a-feature/">great article</a> explaining the process of deploying an InfoPath form with code behind <a href="http://nader.elshehabi.com/2011/08/how-to-really-deploy-infopath-2010-forms-with-code-behind-as-a-feature/">here</a> with source files as well.<br />
<br />
Create/use Nader's Visual Studio solution and copy the form into the visual studio solution, rename the elements as needed, rebuild the VS solution and deploy it.<br />
<br />
<b><span style="color: red;">Important:</span></b> Ensure that the feature that deploys the xsn form is deployed in CA<br />
<br />
Download all the data connections that you have renamed while rebuilding the form. Update all of them to point to the correct site. Upload them back to the data connection library and overwrite the old data connections.<br />
<br />
If the visual studio solution is deployed correctly, you will see 2 farm solutions listed in the solution store.<br />
<br />
1.)<span class="Apple-tab-span" style="white-space: pre;"> </span>The farm solution that was deployed by the visual studio solution<br />
2.)<span class="Apple-tab-span" style="white-space: pre;"> </span>Another solution in the format “form-{InfoPath Form Template name}”.wsp which is added dynamically<br />
<br />
The second solution will be installed and deployed dynamically by the feature receiver in the visual studio solution. If the second solution is not found in the solution store, that indicates that the form template deployment failed. Try to correct the issue and redeploy it until the second solution is deployed.<br />
<br />
After the dynamic farm solution is successful deployed, go to Central Administration > General Application Settings > Manage Form Templates. You should see the InfoPath form template listed in the list of form templates. Pick the form template and activate it in the desired site collection.<br />
<br />
Go to Site Collection settings in the site collection in which the form template is activated and go to site collection features.<br />
<br />
You will see a feature with the same name of the InfoPath form template. Activate it. Verify that the form template is installed correctly by navigating to the url: http://{site collection url}/ /FormServerTemplates/Forms/All%20Forms.aspx<br />
<br />
Now navigate to the library in which the InfoPath forms reside and open an existing form/create a new form. If you are lucky enough, the forms should open without any errors.<br />
<br />
<u>Migrate content from SharePoint 2010 to SharePoint 2013:</u><br />
<br />
Perform the migration of the content from SharePoint 2010 farm to the SharePoint 2013 farm. I have used Database Attach method to mount the content databases.<br />
<br />
If you have no need to continue with the InfoPath form development in SharePoint 2013, you might just go ahead and install the wsp file in SharePoint 2013 and the InfoPath forms might work. But if you think that there will be a need to continue to support/work with the InfoPath form template(s), follow the below to upgrade the InfoPath form template to InfoPath 2013.<br />
<br />
<u>Upgrading the InfoPath form solution from SharePoint 2010 to SharePoint 2013:</u><br />
<br />
Open the solution in Visual Studio 2012/2013 and the conversion should be smooth.<br />
<br />
Open the InfoPath template inside your solution and copy it into a different location. Open it in design mode and open the code behind solution. When you try to compile it, you will end up with the below error.<br />
<br />
<i><span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;">“Unable to compile infopath solution using VS 2012 with below error. (Cannot add Microsoft.SharePoint.dll of SharePoint 2013 to an InfoPath 2010 C# code behind)”</span></i><br />
<span style="color: blue;"><br /></span>
<i><span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;">"Warning 3 Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. NEW Security Request:”</span></i><br />
<br />
The above error occurs because the InfoPath projects uses .net 2.0 as the target version. We will need to specift .net 4.5 as the target version.<br />
<br />
You will need InfoPath 2013 installed in the server where you are building the visual studio solution to be able to compile the code successfully.<br />
<br />
Install InfoPath 2013 in the server where you are building the visual studio solution.<br />
<br />
After InfoPath 2013 is installed, VSTA will allow you to specify .net 4.5 as target version. The Previous error disappears. You will be welcomed with a new Error:<br />
<br />
<i><span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;">“An assembly with the same identity 'System.AddIn.Contract, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported.”</span></i><br />
<br />
Try removing one of the duplicate references for the above assembly and the code should compile successfully.<br />
<br />
Publish the InfoPath template to a network location and then copy the published template into the Visual Studio 2012/2013 solution.<br />
<br />
Try creating a new InfoPath form instance.<br />
<br />
The below error might show up:<br />
<br />
<i><span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;">"An error ocurred while trying to connect to a web service. An entry has been added to the Windows event log of the server. Log ID:5566"</span></i><br />
<br />
Event log does not have any entries with Log ID:5566<br />
<br />
When you attach the debugger to w3wp, the below exception might show up:<br />
<br />
<u><span style="color: red;">Exception:</span></u> <span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;">"The form cannot run the specified query."</span><br />
<u><span style="color: red;">Inner Exception Details:</span></u> <i><span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;">"Unknown Error"</span></i><br />
<br />
The above exception is thrown when the code reaches <b><i><span style="color: blue;">FileQueryConnection.Execute();</span></i></b> if your contains the <i><span style="color: blue;">FileQueryConnection</span></i> object.<br />
<br />
It appears that InfoPath Form Services does not support claims based authentication.<br />
<br />
This is a hard lesson. In SharePoint 2013, we can't switch to Classic/Windows Authentication easily in SharePoint 2013.<br />
<br />
Recreate a new web application with windows authentication as authentication type using the PowerShell command below:<br />
<br />
<i><span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;">New-SPWebApplication -Name "{Name of Web App}" -ApplicationPool "{Application Pool Name}" -AuthenticationMethod "NTLM" -ApplicationPoolAccount "{DOMAIN\Account Name}" -Port {Port Number} -URL "{Web Application Url}"</span></i><br />
<br />
Mount Content DB using the below command:<br />
<br />
<span style="color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;"><i>Mount-SPContentDatabase -Name {Content DB Name} -WebApplication {Web Application Url} -AssignNewDatabaseId</i></span><br />
<br />
Re-upload all the data connections and activate the form template on the site collection in the newly created web application.<br />
<br />
Try to create a new form or open an existing form and you should be ok now.<br />
<br />
What is weird is that the InfoPath forms continue to work after migrate from classic-mode to claims-based authentication<br />
<br />
Run the below PowerShell commands to change the authentication mode to claims based:<br />
<br />
<i><span style="background-color: white; color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;">$WebAppName = "http://<yourWebAppUrl>"</span></i><br />
<i><span style="background-color: white; color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;">$wa = get-SPWebApplication $WebAppName</span></i><br />
<i><span style="background-color: white; color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;">$wa.UseClaimsAuthentication = $true</span></i><br />
<i><span style="background-color: white; color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;">$wa.Update()</span></i><br />
<br />
Hope that this helps someone.<br />
<div>
<br /></div>
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com2tag:blogger.com,1999:blog-7531459993417803686.post-73797240147298295932013-12-02T18:19:00.002-08:002013-12-09T19:37:25.641-08:00InfoPath assembly Microsoft.Office.InfoPath.Server.dll missing in SharePoint 2013?<div dir="ltr" style="text-align: left;" trbidi="on">
<u>What?</u><br />
<br />
I am working on migrating an InfoPath Form Solution with code-behind from MOSS 2007 to SharePoint 2013.<br />
<br />
After the old solution was upgraded to Visual Studio 2012 on a SharePoint 2013 server, Visual Studio complained that the assembly Microsoft.Office.InfoPath.Server.dll could not be found.<br />
<br />
<u>Where?</u><br />
<u></u><br />
Not in GAC<br />
Not in 15\Bin<br />
Not in 15\ISAPI<br />
<br />
It is found in <strong>C:\Program Files\Microsoft Office Servers\15.0\Bin</strong></div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com1tag:blogger.com,1999:blog-7531459993417803686.post-75958718744933137792013-09-25T17:52:00.001-07:002013-09-25T17:54:36.418-07:00Nintex Workflow 2010: Integer vs Number<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>What?</u></b><br />
<br />
A workflow that was built using Nintex Workflow 2010 in SharePoint Server 2010 was working fine for a couple of months and it suddenly started to throw workflow errors.<br />
<br />
The workflow was erroring because of a "for each" action that iterates through a collection of integers.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQSbT0J73VSo-npM5GC4Cd7r0DPLiWyqge7Gomv_FNH1hUduKMPrIRs24861jIda5kxuOiwuEpdwFR2k2oxEnmitCCfy6MPp4O1FOZr3h1NubuwhI09NXT_tc5cX5jTs8N7tkXhqJ7eZw/s1600/Workflow+Error+1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQSbT0J73VSo-npM5GC4Cd7r0DPLiWyqge7Gomv_FNH1hUduKMPrIRs24861jIda5kxuOiwuEpdwFR2k2oxEnmitCCfy6MPp4O1FOZr3h1NubuwhI09NXT_tc5cX5jTs8N7tkXhqJ7eZw/s1600/Workflow+Error+1.PNG" /></a></div>
<br />
<a name='more'></a><br />
<br />
<b><u>Why?</u></b><br />
<br />
After some analysis, I figured out that the workflow has started to error after the collection of integers had exceeded 999.<br />
<br />
<b><u>How?</u></b><br />
<b><u><br /></u></b>
The query list action shown in the above image stores values from a "Number" field in a SharePoint list into a collection variable.<br />
<br />
The for each action then tries to loop through each item in the collection and store the value into an "Integer" variable. (Assuming that integer in Nintex is like a normal integer that we all know :) ). This is when the workflow started to error.<br />
<br />
The issue was resolved after I created a new "Number" variable and used it in the for each loop.<br />
<br />
Not sure what the difference is between Integer and Number according to Nintex.<br />
I could not find a lot of documentation explaining the differences between Integer and Number according to Nintex either and had to learn in the hard way.</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-16475330136028538122013-09-25T17:37:00.003-07:002013-09-25T17:53:55.390-07:00SharePoint 2010 - Internal server error exception: System.ServiceModel.FaultException Microsoft.Office.Server.Search.Query.KeywordQueryInternal.Execute()<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>What?</u></b><br />
<br />
You might receive an internal server error exception when you use Search Core / Custom Search Results Web Part in SharePoint 2010 with the below exception in ULS log:<br />
<br />
<i><span style="color: blue;">Internal server error exception: System.ServiceModel.FaultException Microsoft.Office.Server.Search.Query.KeywordQueryInternal.Execute()</span></i><br />
<br />
<a name='more'></a><br />
<i><span style="color: blue; font-size: x-small;"><b><u>Full Error from ULS:</u></b></span></i><br />
<i><span style="color: blue; font-size: x-small;"><br /></span></i>
<i><span style="color: blue; font-size: x-small;">Internal server error exception: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Exception from HRESULT: 0x80040E60 (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80040E60 at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at at Microsoft.Office.Server.Search.Query.QueryInternal.Execute(QueryProperties properties) at Microsoft.Office.Server.Search.Administration.SearchServiceApplication.Execute(QueryProperties properties) at SyncInvokeExecute(Object , Object[] , Object[] ) at System...<span class="Apple-tab-span" style="white-space: pre;"> </span>71324a1d-9785-4da4-ba0d-3c2f507e9581</span></i><br />
<i><span style="color: blue; font-size: x-small;">....ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) ...). System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Exception from HRESULT: 0x80040E60 (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80040E60 at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr ...<span class="Apple-tab-span" style="white-space: pre;"> </span>71324a1d-9785-4da4-ba0d-3c2f507e9581</span></i><br />
<i><span style="color: blue; font-size: x-small;">...errorInfo) at Microsoft.Office.Server.Search.Query.KeywordQueryInternal.Execute() at Microsoft.Office.Server.Search.Query.QueryInternal.Execute(QueryProperties properties) at Microsoft.Office.Server.Search.Administration.SearchServiceApplication.Execute(QueryProperties properties) at SyncInvokeExecute(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) ...).<span class="Apple-tab-span" style="white-space: pre;"> </span>71324a1d-9785-4da4-ba0d-3c2f507e9581</span></i><br />
<div>
<br /></div>
<b><u>Why?</u></b><br />
<b><u><br /></u></b>
I know of one scenario in which this could occur. If you configure your search web part to sort results based on a managed property and if that property does not have "Reduce storage requirements for text properties by using a hash for comparison" set to true, you will likely encounter this error.<br />
<br />
<b><u>How?</u></b><br />
<b><u><br /></u></b>
Set the property "Reduce storage requirements for text properties by using a hash for comparison" for the managed property that you intend to use for sort operation to "true"</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com1tag:blogger.com,1999:blog-7531459993417803686.post-14249598735627550002013-09-25T17:31:00.001-07:002013-09-25T17:54:06.635-07:00SharePoint Health Analyzer - The following servers have not executed any timer jobs in the last 2 hours<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>What?</u></b><br />
<br />
We have setup a new SharePoint 2010 production farm with 2 web servers. (One WFE and one APP). In the new farm, we have started to see a critical issue in the health analyzer that says "The following servers have not executed any timer jobs in the last 2 hours"<br />
<br />
<a name='more'></a><br /><br />
<b><u>Why?</u></b><br />
<b><u><br /></u></b>
After some trouble shooting which included restarting the timer service on both servers and executing the PowerShell script below, we have figured that the timer services are running fine. But the event logger is full of the above exceptions.<br />
<br />
$farm = Get-SPFarm<br />
$disabledTimers = $farm.TimerService.Instances | where {$_.Status -ne "Online"}<br />
if ($disabledTimers -ne $null)<br />
{<br />
foreach ($timer in $disabledTimers)<br />
{<br />
Write-Host "Timer service instance on server " $timer.Server.Name " is not Online. Current status:" $timer.Status<br />
}<br />
}<br />
else<br />
{<br />
Write-Host "All Timer Service Instances in the farm are online! No problems found"<br />
}<br />
<br />
It finally turned out to be an issue with time difference in the 2 web servers.<br />
<br />
There was about 14 hours of time difference between the 2 web servers.<br />
<b><u><br /></u></b>
<b><u>How?</u></b><br />
<b><u><br /></u></b>
We synced the time between the 2 servers and restarted SP timer service on both web servers and the error disappeared</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-58271499445973368822013-09-04T19:33:00.001-07:002013-09-04T19:33:50.112-07:00SharePoint 2010: Linq Exception - An item with the same key has already been added.<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>What?</u></b><br />
<br />
All of a sudden we started to see a weird exception in our intranet "System.ArgumentException: An item with the same key has already been added." being thrown by a custom web part that shows results that are indexed by SharePoint 2010 Search.<br />
<br />
<a name='more'></a><br />
We have a custom control in our intranet that lists out all items in a searchable A-Z format that are indexed by search based on a chosen content type name. Except for one content type, all the results for other content types have been listed by the control with no issues.<br />
<br />
<b><u>Why?</u></b><br />
<br />
I have been able to fix the issue but could not find out for sure what the reason was behind this issue.<br />
<br />
<b><u>How?</u></b><br />
<b><u><br /></u></b>
Steps taken to resolve this issue:<br />
<br />
Initial thoughts were that the search index got corrupted. So search index has been dropped and rebuilt. But the issue has not been resolved.<br />
<br />
Create a duplicate content type "Custom Form 2" with the same fields as "Custom Form" (the erroring content type)<br />
Identified all the documents with the content type "Custom Form" through out the site using a Content Query Web Part and incrementally changed the content type for those documents to "Custom Form 2" in batches.<br />
<br />
Ran incremental crawl in CA<br />
<br />
After repeating the above process for 3-4 document libraries the error disappeared.<br />
<br />
I then reverted the content type for all those documents from "Custom Form 2" to "Custom Form" and then deleted the staging temporary content type "Custom Form 2"<br />
<br />
If you ever experience a similar problem, I recommend running a powershell script to replicate the above steps and you may be ok.<br />
<br />
Please let me know if someone is able to figure out the root cause for this issue.</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-44289461908831843862013-07-08T02:56:00.001-07:002013-07-08T02:56:37.969-07:00Nintex Workflow 2010 - The dreaded "Workflow failed to run" error<div dir="ltr" style="text-align: left;" trbidi="on">
<b>What?</b><br />
<b><br /></b>
Workflows that are built using Nintex Workflow 2010 fail with error: "[Workflow Name] failed to run"<br />
when the following actions are executed:<br />
<br />
<br />
<ul style="text-align: left;">
<li>Task Reminder Action</li>
<li>Task Delegation Action</li>
<li>Pause For</li>
</ul>
<br />
You may also notice that the workflows also don't perform as they should.<br />
<br />
<a name='more'></a><br />
<b>Why?</b><br />
<b><br /></b>
There may be a number of reasons behind this error. Every error has its own reason :)<br />
<br />
From my understanding, it could be related to permissions, event receiver clashes, batch run exceptions, AD user accounts with no/invalid emails, etc.<br />
<br />
<b>How?</b><br />
<b><br /></b>
In my case, the SharePoint farm has 2 web front end servers and both the servers were running the service "Microsoft SharePoint Foundation Workflow Timer Service".<br />
<br />
The resolution was to stop the "Microsoft SharePoint Foundation Workflow Timer Service" using Central Administration page from one of the web front end servers.</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-54238170324324011412013-05-15T21:32:00.000-07:002013-05-15T21:34:05.624-07:00Nintex Workflow 2010 crashes IE unexpectedly during events such as when a new string variable is created in a workflow<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>What?</u></b><br />
<b><u><br /></u></b>
Nintex Workflow 2010 crashes IE unexpectedly and randomly when certain actions are performed such as when a new string variable is created in a workflow<br />
<b><u><br /></u></b>
<b><u>Why?</u></b><br />
<b><u><br /></u></b>
Nintex Workflow 2010 at the time of posting this blog is not fully compatible with IE 10. It works perfectly with IE 9 and IE 8.<br />
<b><u></u></b><br />
<a name='more'></a><b><u>How?</u></b><br />
<br />
In my case, an automatic update from windows has updated IE in my machine from version 9 to 10 and as a result, Nintex Workflow 2010 has started to crash IE unexpectedly.<br />
<br />
Check the version of IE in your machine to see if it happens to be IE 10 and if you are keen on getting Nintex 2010 to work, you can either use the compatibility mode settings in IE 10 as suggested by someone from Nintex in a post.<br />
<br />
It did not work for me. So I had to uninstall the Windows Update that updated IE 9 to IE 10.<br />
You can do that by going to Control Panel > Programs & Features > View Installed Updates.<br />
<br />
Under the group "Microsoft Windows", you should find "Internet Explorer 10". Uninstall it and Nintex Workflow 2010 should work fine.</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-60157601567733241242012-11-19T17:24:00.001-08:002013-05-15T21:35:56.286-07:00SharePoint 2010: User Profile Synchronization Service fails to start with a message "Failed to configure ILM" in ULS<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>What?</u></b><br />
<br />
I have setup a new SharePoint 2010 non-production farm in a single server environment with Active Directory, SQL Server 2008 and SharePoint 2010 installed. (Not stand-alone installation)<br />
The dreaded User Profile Synchronization Service fails to start as usual in a newly setup SharePoint 2010 farm.<br />
<br />
The following error was found in the ULS logs:<br />
<br />
<span style="color: red; font-family: Courier New, Courier, monospace;"><i>UserProfileApplication.SynchronizeMIIS: Failed to configure ILM, will attempt during next rerun. Exception: System.Data.SqlClient.SqlException: Specified collection 'StringSchemaCollection' cannot be dropped because it is used by object...</i></span><br />
<br />
Note that the above message shows up as an entry with High priority and not as an exception in ULS log.<br />
<br />
<b><u>Why?</u></b><br />
<br />
There could be hell a lot of reasons why the User Profile Synchronization Service fails to start. First of all, it does not work in a single server stand alone installation with inbuilt database.<br />
<br />
In my case, there were a couple of issues and I will try to explain how I fixed them in this post.<br />
<br />
<a name='more'></a><br />
<b><u>How?</u></b><br />
<br />
User Profile Synchronization Service does not like fully qualified name for the database and therefore we got to be careful to not provide a fully qualified database name when running SharePoint 2010 Products Configuration Wizard for the first time.<br />
<br />
<span style="color: red;">For example<b> DO NOT</b> use DBSP01.DOMAINNAME.COM instead use DBSP01.</span><br />
<span style="color: red;"><br /></span>
Add the User profile Synchronization user to Farm Administration Group.<br />
<br />
Make sure the User profile Synchronization user in the Local Administrator Group.<br />
<br />
Delegate the User profile Synchronization user to have Active directory access.<br />
<br />
Melick has explained all the delegation process <a href="http://www.codeproject.com/Articles/358855/user-profile-synchronization-service-not-starting" target="_blank">with nice screenshots here</a>. Please follow the steps as he mentioned.<br />
<br />
Execute the below command:<br />
<br />
<pre class="csharp" name="code">setspn –a NONE/NONE UserProfileSyncUserAccount
</pre>
<br />
Restart SharePoint Timer Service<br />
<br />
Run the below PowerShell script:<br />
<br />
<pre class="csharp" name="code">$sync_db = "Sync DB Name here (User Profile Service Application_SyncDB)"
$ups_service_app_name = "User Profile Service Application"
$syncdb=Get-SPDatabase | where {$_.Name -eq $sync_db}
$syncdb.Unprovision()
$syncdb.Status='Offline'
$ups = Get-SPServiceApplication | where {$_.Displayname -eq $ups_service_app_name }
$ups.ResetSynchronizationMachine()
$ups.ResetSynchronizationDatabase()
$syncdb.Provision()
</pre>
Restart SharePoint Timer Service<br />
<br />
Change the 2 Forefont Identity Manager services to run using the appropriate account (if the UP sync still does not start) and start User Profile Synchronization Service again.<br />
<br />
Depending on the CU that has been applied in your SharePoint server, you may have to recreate the User Profile Application.</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-50597294420383211572012-11-14T21:41:00.001-08:002013-05-15T21:35:25.326-07:00Access denied for all users except Farm Account after a SharePoint 2010 content database restore<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>What?</u></b><br />
<br />
I successfully did a restore of a SharePoint 2010 site from production into a dev farm which is in a different domain. I am able to access the site normally using the farm account. All other accounts got access denied including the Setup Account.<br />
<br />
I verified that the correct application pool is being used, tried to grant access to the setup account as well as the search account at web application level as well but no use.<br />
<br />
<b><u>Why?</u></b><br />
<br />
The super reader and writer accounts are required to be configured in order for permissions to work normally.<br />
<br />
<a name='more'></a><br />
<b><u>How?</u></b><br />
<br />
The whole process is detailed here: <a href="http://technet.microsoft.com/en-us/library/ff758656.aspx">http://technet.microsoft.com/en-us/library/ff758656.aspx</a><br />
<br />
Create 2 new managed service accounts for super reader and writer accounts if you don't have them already.<br />
<br />
Grant full control access at web application level for the super writer account<br />
Grant full read access at web application level for the super reader account<br />
<br />
Then run the below powershell script.<br />
<br />
<pre class="csharp" name="code">$wa = Get-SPWebApplication -Identity "<WebApplication>"
$wa.Properties["portalsuperuseraccount"] = "<SuperUser>"
$wa.Properties["portalsuperreaderaccount"] = "<SuperReader>"
$wa.Update()
</pre>
<br />
The deadly access denied error disappeared :)</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com4tag:blogger.com,1999:blog-7531459993417803686.post-91610881896916890542012-09-14T10:06:00.001-07:002012-09-14T10:09:08.016-07:00SharePoint 2010 Managed Metadata Import Error "Bulk load data conversion error (CustomSortOrder)"<div dir="ltr" style="text-align: left;" trbidi="on">
<u><b>What?</b></u><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjpR8S8uchbz4Ki1j8RzI8mvn2866BXPrdP2TVzQyUQVgcTacu6z5hsV4xWP9vBb6JHhK8GARM4eCDob5H60okhbLc5eaG61-G3k45nN71REUwqfK8MrkO3I1FKQQAhhuSyhwR6RIwSZE/s1600/Error.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="92" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjpR8S8uchbz4Ki1j8RzI8mvn2866BXPrdP2TVzQyUQVgcTacu6z5hsV4xWP9vBb6JHhK8GARM4eCDob5H60okhbLc5eaG61-G3k45nN71REUwqfK8MrkO3I1FKQQAhhuSyhwR6RIwSZE/s320/Error.png" width="320" /></a></div>
You receive the below error when you try to Export/Import Managed Metadata Service Application from one farm to another.<br />
<br />
<br />
<br />
<div style="color: blue; font-family: "Courier New",Courier,monospace;">
<span style="font-size: x-small;"><i>Import-SPMetadataWebServicePartitionData : Bulk load data conversion error (tru</i></span></div>
<div style="color: blue; font-family: "Courier New",Courier,monospace;">
<span style="font-size: x-small;"><i>ncation) for row 11, column 7 (CustomSortOrder).</i></span></div>
<br />
One of the easiest ways to backup/restore Managed Metadata Service Application from one farm/environment to another is using import/export functionality.<br />
<br />
I have explained this procedure a little while ago in <a href="http://www.chaitumadala.com/2011/10/sharepoint-2010-how-to-backuprestore.html" target="_blank">this blog post</a> <br />
<br />
I have been successfully using the Import/Export method with no issues until I stumbled across this error today.<br />
<br />
<u><b>Why?</b></u><br />
<br />
As the error hints, the error occurred due to specifying custom sort order in one of the term sets.<u><b><br /></b></u><br />
<br />
<a name='more'></a><u><b>How?</b></u><br />
<br />
When I exported the managed metadata service application from one farm and tried to import it in a different farm, I received the below error:<br />
<br />
<div style="color: blue; font-family: "Courier New",Courier,monospace;">
<span style="font-size: x-small;"><i>Import-SPMetadataWebServicePartitionData : Bulk load data conversion error (tru</i></span></div>
<div style="color: blue; font-family: "Courier New",Courier,monospace;">
<span style="font-size: x-small;"><i>ncation) for row 11, column 7 (CustomSortOrder).</i></span></div>
<div style="color: blue; font-family: "Courier New",Courier,monospace;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx9jMhRYpvIGUgQy4WOgciGa0C4UpQkSSGypOVIDf-oGzFV4JDrvNiYX1MMgi19ZbPgReTKwrdQAO-bFCfUJUVFaazMrwu5klRhY-hKgEzSyzzrClVWMkdZXYmG9Styqe6yEPHklMJ0h8/s1600/Bulk+load+data+conversion+error.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="456" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx9jMhRYpvIGUgQy4WOgciGa0C4UpQkSSGypOVIDf-oGzFV4JDrvNiYX1MMgi19ZbPgReTKwrdQAO-bFCfUJUVFaazMrwu5klRhY-hKgEzSyzzrClVWMkdZXYmG9Styqe6yEPHklMJ0h8/s640/Bulk+load+data+conversion+error.PNG" width="640" /></a></div>
<div style="color: blue; font-family: "Courier New",Courier,monospace;">
<br /></div>
<u><b> </b></u>As shown in the screenshot below, a term set has custom sort order specified to always show "USA" at the top of the countries list.<u><b> </b></u><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsQv5LjAZ0ZbsDuko2OoUHkcsDqDw1x5MDKWcp5BAfnHabgGaL7uibj0XIjCRe3qJl_n-sHGe5jASaasiPZIAIo8Uu3OgEXimdu4s1yBzdvlCWz0ydV6OZToJuUzCqpO-FgldEixDGmjs/s1600/Managed+Metadata+Term+Store+with+Custom+Sort+Order.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsQv5LjAZ0ZbsDuko2OoUHkcsDqDw1x5MDKWcp5BAfnHabgGaL7uibj0XIjCRe3qJl_n-sHGe5jASaasiPZIAIo8Uu3OgEXimdu4s1yBzdvlCWz0ydV6OZToJuUzCqpO-FgldEixDGmjs/s640/Managed+Metadata+Term+Store+with+Custom+Sort+Order.PNG" width="640" /></a></div>
<br />
To resolve the issue, choose the option "Use default sort order according to current language." and the term store will default to use the default sort order which is ascending order.<br />
<br />
Then run the command Export-SPMetadataWebServicePartitionData to export the Managed Metadata Service Application.<br />
<br />
Once the export process completes successfully, specify the custom sort order on the term set(s) again in the farm where the backup was taken. <br />
<br />
Now run the Import-SPMetadataWebServicePartitionData in the target farm and the import process should be successful.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKjLd-AVcrBUZveoyP4LBREBNOBdlBP2hu732y0Mf6Q3xEoUrCP6Or0WQH4OIfDKbRo7kU5bqL_E45aUREfzt2IbusEKgCc8KuwftmLmkPgthTEelvSYXifjwTKwTnepx_KJiCMtSBiWc/s1600/Managed+Metadata+Service+Import+Successfull.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="456" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKjLd-AVcrBUZveoyP4LBREBNOBdlBP2hu732y0Mf6Q3xEoUrCP6Or0WQH4OIfDKbRo7kU5bqL_E45aUREfzt2IbusEKgCc8KuwftmLmkPgthTEelvSYXifjwTKwTnepx_KJiCMtSBiWc/s640/Managed+Metadata+Service+Import+Successfull.PNG" width="640" /></a></div>
<br />
Specify the term store administrator(s) and navigate to the term set(s) to which custom sort order must be specified.<br />
<br />
You will see that the owner of the term set(s) will be set to the user from the farm where the backup has been taken (devspconfig is the owner of the term set in the source farm):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNzO1NngiFJ_TselfcRwvTmjHi7frzA06V9CpRzFZ3IpLU93cdlf_UhtasicJ6cQbtCu2oRiQG_jtynTgwGZqnbXnZN-VDb8CRbiEoKuaVfLkxM3l5z0l-7KGgndT3_g0bfyQH54Fql-k/s1600/Managed+Metadata+Term+Change+Owner.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNzO1NngiFJ_TselfcRwvTmjHi7frzA06V9CpRzFZ3IpLU93cdlf_UhtasicJ6cQbtCu2oRiQG_jtynTgwGZqnbXnZN-VDb8CRbiEoKuaVfLkxM3l5z0l-7KGgndT3_g0bfyQH54Fql-k/s640/Managed+Metadata+Term+Change+Owner.PNG" width="640" /></a></div>
<br />
We need to change the owner of the term set in the destination farm to SP_Connect. Replace the old owner with the new owner (SP_Connect):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZJA5t7okr-DyLQxH1T514ILwDGRaoEoFXvKUtqykpVtQW3d-qfrU6vzx6jFHB_UbD2DxfPbOo4TDiC8poDLcB8Wyl4U4yVzn-8V2Nq7I7WXHUN3PdyqKYdFsStWglG-qFHyFPCfefFYQ/s1600/Managed+Metadata+Term+Changed+Owner.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="408" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZJA5t7okr-DyLQxH1T514ILwDGRaoEoFXvKUtqykpVtQW3d-qfrU6vzx6jFHB_UbD2DxfPbOo4TDiC8poDLcB8Wyl4U4yVzn-8V2Nq7I7WXHUN3PdyqKYdFsStWglG-qFHyFPCfefFYQ/s640/Managed+Metadata+Term+Changed+Owner.PNG" width="640" /></a></div>
<br />
Next step would be to specify the custom sort order again on the term set(s). Click on the term set(s) and then click on the tab "Custom Sort".Choose "Use custom sort order". The page will reload and will display all the terms in the term set. Specify the sort order for labels as needed.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYQlDWhBE05D1pRMKX8ZSrZe8QeQ9lGOMA-m7blQnPPRPrXJnj1UsV-ckncVglPAT3sf8zWSUdwnh7-T8b2ASVPqApTZ8h5BP_dlRiBeV8vFO8HcRYcsRiqQpTwkG7aC9uEZFoVwJ6_0s/s1600/Managed+Metadata+Term+Store+Set+Custom+Sort+Order.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYQlDWhBE05D1pRMKX8ZSrZe8QeQ9lGOMA-m7blQnPPRPrXJnj1UsV-ckncVglPAT3sf8zWSUdwnh7-T8b2ASVPqApTZ8h5BP_dlRiBeV8vFO8HcRYcsRiqQpTwkG7aC9uEZFoVwJ6_0s/s640/Managed+Metadata+Term+Store+Set+Custom+Sort+Order.PNG" width="640" /></a></div>
<br />
Good luck :)</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-85245218975724026032012-09-10T09:38:00.000-07:002012-09-10T09:38:30.806-07:00Speaking at Melbourne SharePoint User Group (MSPUG) on the 26th September 2012<div dir="ltr" style="text-align: left;" trbidi="on">
<b>What?</b><br />
<br />
<span class="share-body">I am going to speak at Melbourne SharePoint User Group (MSPUG) - <a href="http://mspuginfo.wordpress.com/">http://mspuginfo.wordpress.com</a></span><br />
<br />
<b>When?</b><br />
<br />
<span class="share-body">On </span><span class="share-body"></span><strong style="font-weight: normal;">Wednesday<span style="font-family: "Calibri","sans-serif"; font-size: 10.0pt;">,</span></strong><span class="share-body"> September 26th 2012 </span><strong style="font-weight: normal;"><span style="font-family: "Calibri","sans-serif"; font-size: 10.0pt;"><span style="font-family: "Calibri","sans-serif";"></span></span>5:30PM
(for 6pm start)</strong><br />
<span class="share-body"><br /></span>
<b><span class="share-body">Where?</span></b><br />
<span class="share-body"><br /></span>
<span class="share-body">Microsoft Melbourne, </span><br />
<span class="share-body">Level 5, 4 Freshwater Place,</span><br />
<span class="share-body">SouthBank, Melbourne,</span><br />
<span class="share-body">Australia</span><br />
<span class="share-body"></span><br />
<a name='more'></a><b>Presentation Title: </b><br />
<br />
<span class="share-body">Get the most out of Search in SharePoint 2010</span><br />
<span class="share-body"><br /></span>
<span class="share-body"><b>Topics Covered:</b></span><br />
<span class="share-body"></span><br />
<ul style="text-align: left;">
<li><span class="share-body">The value of SharePoint search</span></li>
<li><span class="share-body">Optimizing out of the box search.</span></li>
<li><span class="share-body">Leveraging the Search Core Results webpart.</span></li>
<li><span class="share-body">Advantages of Search Results webpart over Content Query webpart.</span></li>
<li><span class="share-body">Using Search Results webpart for aggregating data.</span></li>
<li><span class="share-body">Building your own Search Results webpart</span></li>
<li><span class="share-body">Excluding parts of pages from Crawl</span></li>
<li><span class="share-body">Exploring other search features</span></li>
<li><span class="share-body">Crawling PDF and TIFF images (OCR)</span></li>
<li><span class="share-body">Life in the FAST lane.</span></li>
</ul>
</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-3954694568998159052012-09-04T01:44:00.000-07:002012-09-04T01:48:09.550-07:00How to mix HTTP and HTTPS pages in a SharePoint 2010 site?<div dir="ltr" style="text-align: left;" trbidi="on">
<b>What?</b><br />
<br />
How to have a combination of both HTTP and HTTPS pages in the same SharePoint 2010 site with configuration only without writing code?<br />
<br />
<b>Why?</b><br />
<br />
It is a very common requirement to have a mix of HTTP and HTTPS pages in public
facing SharePoint sites. Examples of such pages generally are login
pages, contact forms, new testimonial form pages, new user review form pages and any other pages that capture sensitive data
from users. In these cases, only those specific pages must be loaded as HTTPS pages where as the rest of the pages in the site must be loaded as HTTP pages.<br />
<br />
<a name='more'></a><b>How?</b><br />
<br />
This article assumes that a SharePoint 2010 publishing site is up and running with anonymous access turned on and that the site is configured properly to run on HTTPS. <a href="http://blogs.visigo.com/chriscoulson/mixed-anonymous-and-secure-content-with-sharepoint-2010/" target="_blank">This article here</a> can be a good starting point. <a href="http://www.chaitumadala.com/2010/06/making-sharepoint-2010-site-externally.html" target="_blank">This previous article</a> written by me in the past can also be helpful.<br />
<br />
I am not going to emphasize on how to setup HTTPS, configure SharePoint to use HTTPS and configuring SharePoint's Authentication Cookie as Chris Coulson and Tim Nugiel have already covered them <a href="http://blogs.visigo.com/chriscoulson/mixed-http-and-https-content-with-sharepoint-2010/" target="_blank">here</a> and <a href="http://www.sp2010hosting.com/Lists/Posts/Post.aspx?ID=5" target="_blank">here</a><br />
<br />
My primary focus is going to be on how to use configure URL Redirect module in IIS 7 to get desired results.<br />
<br />
<b><u>Redirecting users to HTTPS for specific pages:</u></b><br />
<br />
We cannot just enable SSL / HTTPS on specific pages only. The whole site has to be configured with HTTP as well as HTTPS first. Once that is done, we will then create rules and instruct IIS<u><b> </b></u>to load all pages in HTTP except the specific pages that we want to load in HTTPS.<b><u><br /></u></b><br />
<br />
Here are the steps:<br />
<br />
<ol style="text-align: left;">
<li>Install the IIS7 URL Rewrite module. You can download it from here: <a href="http://www.iis.net/download/urlrewrite">http://www.iis.net/download/urlrewrite</a></li>
<li>Open IIS and select your SharePoint Web Application from the list of sites.</li>
<li>Open the Url Rewrite module from the Features View.</li>
</ol>
<div style="text-align: left;">
We will now create a rule to redirect specific pages to HTTPS. Let us assume that we have a site called "contact-us" and that we need to redirect the default.aspx page (landing page) in that site to HTTPS.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So the goal is to redirect http://site/contact-us/pages/default.aspx to https://site/contact-us/pages/default.aspx </div>
<ul style="text-align: left;">
<li>Click Add Rules…</li>
<li>Select ‘Blank Rule’ under ‘Inbound Rules’ and click OK. </li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPfxetnVqEB4pOAp3FDkU61lVlJwOQ-oh1ItwZ-7KVbWK_pUSwWOoZDF6ITaYlexB52oZ64dgVsNlZk9wxzPte0bg7o5ozbkLbap_crVhPe0o1sK1ivXkJvAwSiEhE6fbMooLzTjdimXE/s1600/Create+new+rule.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="335" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPfxetnVqEB4pOAp3FDkU61lVlJwOQ-oh1ItwZ-7KVbWK_pUSwWOoZDF6ITaYlexB52oZ64dgVsNlZk9wxzPte0bg7o5ozbkLbap_crVhPe0o1sK1ivXkJvAwSiEhE6fbMooLzTjdimXE/s640/Create+new+rule.PNG" width="640" /></a></div>
<br />
<ul style="text-align: left;">
<li>Fill in the name with ‘HTTP to HTTPS Redirect’.</li>
<li>Set the Pattern to: <i style="color: red;">^(contact-us/pages/default.aspx/{0,1}$|contact-us/{0,1}$) </i>\</li>
<li>Add the condition: Input: {HTTPS} Check if input string: ‘Matches the Pattern’ Pattern: off</li>
<li>Set the Action Type to ‘Redirect’</li>
<li>Set the Redirect Rule to: <i style="color: red;">https://site.com/{R:0}</i> (Substitute for your own url)</li>
<li>Set the Redirect Type to ‘Permanent (301)’</li>
<li>Click ‘Apply’ and click ‘Back to Rules’.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiSzHII_NPcJ6-rnJzaNHkwHvoqP_gO9Y4qgnOAlMwBo4FDnOhlak5VlvKMYpt3_0gMWuLrvM6NLkTOHR6gSif11e7FLJCIei7VhMXHGAbtcxAuoJzDzHoaB2I1_L4_KNeNnGQdaMDGEU/s1600/Http+to+Https+1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="433" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiSzHII_NPcJ6-rnJzaNHkwHvoqP_gO9Y4qgnOAlMwBo4FDnOhlak5VlvKMYpt3_0gMWuLrvM6NLkTOHR6gSif11e7FLJCIei7VhMXHGAbtcxAuoJzDzHoaB2I1_L4_KNeNnGQdaMDGEU/s640/Http+to+Https+1.PNG" width="640" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtVD0B5YVIRwvgdqSid8uFKCmsH5w3Wyknf-edSBk0Zu_ARBWuIElNx-sU6Qy_Wv2V3vBGPLBGYVj6VcvHWwYpXwOEVvijf6hhC0W7MBeNHpT93hzAqaUS30OMqvrFi5tOfDsYYXJ9ZCo/s1600/Http+to+Https+2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="468" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtVD0B5YVIRwvgdqSid8uFKCmsH5w3Wyknf-edSBk0Zu_ARBWuIElNx-sU6Qy_Wv2V3vBGPLBGYVj6VcvHWwYpXwOEVvijf6hhC0W7MBeNHpT93hzAqaUS30OMqvrFi5tOfDsYYXJ9ZCo/s640/Http+to+Https+2.PNG" width="640" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<u><b>Note:</b></u> The regular expression pattern must not include the root site url (http://site.com)<br />
<br />
<i style="color: red;">^(contact-us/pages/default.aspx/{0,1}$|contact-us/{0,1}$)</i><br />
<br />
The above rule says:<br />
<br />
IF <i style="color: blue;">The url is /contact-us/pages/default.aspx <u><b>OR</b></u> /contact-us/ (The default.aspx is landing page for this site too) <u><b>AND</b></u> if https is not being used </i>THEN <br />
<i style="color: blue;">Send back a Permanent Redirect to the https URL, using the original URL after the server address.</i><br />
<br />
Now we’ll create a second rule that says all of the pages on the main site should be accessed via HTTP. The reason we need this rule is because once we’re browsing over HTTPS, any relative URLs in the page will also be accessed over HTTPS. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
That means all the primary/secondary navigation links and any other relative links in the contact-us landing page become HTTPS. So if we want all pages to be consistently delivered over HTTP, we need a rule to force this:</div>
<ul style="text-align: left;">
<li>From the IIS Rewrite module, add another blank inbound rule.</li>
<li>Fill in the name with ‘HTTPS to HTTP Redirect’.</li>
<li>Set the Pattern to: <i style="color: red;">^(.*)$</i> (All pages in the site)</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Sc9_-sRVCwhprqXVsudBPrm7KKByGTe6nEmHMiY6Jx0hOEBbtCRpYndwl2rIThx4Ff_SKFR0xIaFQFnLoVXTp_gNNrg38WoUIO4-brWQbvmcEiJg1gWdneKbSA5xqqDktAhfcJLI38U/s1600/Https+to+Http+1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Sc9_-sRVCwhprqXVsudBPrm7KKByGTe6nEmHMiY6Jx0hOEBbtCRpYndwl2rIThx4Ff_SKFR0xIaFQFnLoVXTp_gNNrg38WoUIO4-brWQbvmcEiJg1gWdneKbSA5xqqDktAhfcJLI38U/s640/Https+to+Http+1.PNG" width="628" /></a></div>
<br />
<ul style="text-align: left;">
<li>Add a condition: Input: {HTTPS} 'Matches the Pattern' Pattern: on</li>
<li>Add another condition: Input: {R:0} 'Does Not Match the Pattern' Pattern: <i style="color: red;">^(contact-us/pages/default.aspx/{0,1}$|contact-us/{0,1}$) </i></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbGYea1MIioEfcm5QBCjvMsiWRjRqQTRmwfh0sC3f1ZP4b93OVDAqmeq0Sk8lQikRCmaVzf9paRb1O8VTIgrt2RxGK1l68cKJ8DgZPCTLtP60n3zusyvBVrN_BsfYEilygB4lb6YoZYSg/s1600/Https+to+Http+2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbGYea1MIioEfcm5QBCjvMsiWRjRqQTRmwfh0sC3f1ZP4b93OVDAqmeq0Sk8lQikRCmaVzf9paRb1O8VTIgrt2RxGK1l68cKJ8DgZPCTLtP60n3zusyvBVrN_BsfYEilygB4lb6YoZYSg/s640/Https+to+Http+2.PNG" width="640" /></a></div>
<br />
The above condition says:<br />
<br />
For all pages in the site<br />
IF <i style="color: blue;">HTTPS is being used and if the url is NOT /contact-us/pages/default.aspx OR /contact-us/</i><br />
THEN <i><span style="color: blue;">send back a Permanent Redirect to the HTTP URL, using the original URL after the server address</span></i><br />
<ul style="text-align: left;">
<li> Set the Action Type to ‘Redirect’</li>
<li>Set the Redirect Rule to: <i style="color: red;">http://site.com/{R:0}</i> (Substitute for your own url)</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg17WroE2lqzVgGV8Jv1LVjHToaLlAasIYiy28VVmD1W1XxsPWEuxHofn5qHULTrFKNn-0w_hUTtjhWEmmtnzvlN1l6koJS4hLDzd2EMrUlUfSq1kaQ9NdaXqpdGPqOa5tvvIFUDtxlBUI/s1600/Https+to+Http+4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg17WroE2lqzVgGV8Jv1LVjHToaLlAasIYiy28VVmD1W1XxsPWEuxHofn5qHULTrFKNn-0w_hUTtjhWEmmtnzvlN1l6koJS4hLDzd2EMrUlUfSq1kaQ9NdaXqpdGPqOa5tvvIFUDtxlBUI/s640/Https+to+Http+4.PNG" width="628" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUTLI_xe_MG2Arb1Mj3Xndi8EKrq-KPeYiulxpIpxKXwHhcZETagea6NSXm7fEipoy9Xc4dGrlSpGJJrR7kqa7aWEI73GwVqrghPzMf9Cggad8YVAmtL1drHbSll08Qs2a1rJ0u52T5Gg/s1600/Https+to+Http+3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<ul style="text-align: left;">
<li>Set the Redirect Type to ‘Permanent (301)’</li>
<li>Click ‘Apply’ and click ‘Back to Rules’.</li>
</ul>
<div style="text-align: left;">
That’s all! Users accessing contact-us landing page on your site over http will be forced over to https.<br />
<br />
If you want to make more HTTP pages load over HTTPS you may create new Url Redirect rules or just use one rule and use it for multiple urls depending on your Regex skills :)</div>
</div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-36420736912416785192012-08-07T22:40:00.001-07:002012-08-07T22:40:18.800-07:00How to fix SharePoint Designer 2010 error "The URL '_catalogs/masterpage/page layout.aspx' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current web."<div dir="ltr" style="text-align: left;" trbidi="on">
<b>What?</b><br />
<br />
SharePoint Designer 2010 throws error "The URL '_catalogs/masterpage/page layout.aspx' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current web." when you attempt to update an existing page layout. All other page layouts can be updated normally.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmbEmUezXxSPTCAWwfSCG5I7c6DHR7jAxuQP1NBm8F4vO6M2WtunvcSvN1PD7msNYUy6ZTGcR5eW9wN12jhOk91catTxyPHrBDv3oLM7UnWddnJUPxQWRiAjuLxw57DAQD6I37K4kM7Lw/s1600/SPD+Error.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="99" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmbEmUezXxSPTCAWwfSCG5I7c6DHR7jAxuQP1NBm8F4vO6M2WtunvcSvN1PD7msNYUy6ZTGcR5eW9wN12jhOk91catTxyPHrBDv3oLM7UnWddnJUPxQWRiAjuLxw57DAQD6I37K4kM7Lw/s640/SPD+Error.PNG" width="640" /></a></div>
<br />
<b>Why?</b><br />
<br />
There could be various reasons for this error. I have already explained about one of the various reasons that could trigger this error in <a href="http://www.chaitumadala.com/2011/05/sharepoint-2010-server-error-url-is.html" target="_blank">this blog post</a> earlier.<br />
<br />
<b>How?</b><br />
<br />
This error<b> </b>occurs when there is an error in the page layout that is being modified. Clearly the error description is wrong and misleading :)<br />
<br />
<a name='more'></a>I have switched the publishing master page from our custom master page to a different master page. The current page layout being modified has a ContentPlaceHolder called "PlaceHolderBreadcrumb" that does not exist in the new.master page.<br /><br />
<br />
In my case I have noticed the below in ULS logs:<br />
<br />
<span style="color: blue; font-family: "Courier New",Courier,monospace; font-size: small;"><i>System.Web.HttpException: Cannot find ContentPlaceHolder 'PlaceHolderBreadcrumb' in the master page '/_catalogs/masterpage/v4.master', verify content control's ContentPlaceHolderID attribute in the content page. at System.Web.UI.MasterPage.CreateMaster</i></span><br />
<br />
After adding the missing ContentPlaceHolder to the master page and restarting SharePoint Designer, the error has disappeared.</div>Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-46111322283197593522012-08-07T04:57:00.001-07:002012-08-16T22:25:40.524-07:00SharePoint 2010 - How to easily create links to existing SharePoint content in HTML Editor<div dir="ltr" style="text-align: left;" trbidi="on">
<u><b>What?</b></u><br />
<br />
How to easily create links to existing SharePoint content in HTML Editor using [[ and Ctrl+Space?<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmifAZjtQK9l0-mMoXUFpJEyK9ptKM9IqgrDgvrh-BBltzCiCT3gbuE25enwrps_lkUvoMHbpoytcIYCigftbIcSJfT4yWkxNGAY1DP-IMVB5IN6q7BDRTUQbzPZX15juUL7TMGxL-h5A/s1600/Syntax.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmifAZjtQK9l0-mMoXUFpJEyK9ptKM9IqgrDgvrh-BBltzCiCT3gbuE25enwrps_lkUvoMHbpoytcIYCigftbIcSJfT4yWkxNGAY1DP-IMVB5IN6q7BDRTUQbzPZX15juUL7TMGxL-h5A/s320/Syntax.PNG" width="320" /></a></div>
<u><b>Why?</b></u><br />
<br />
It is a common requirement to provide links to existing pages/documents/list items in SharePoint sites. This is especially true with wikis and publishing sites.<br />
<br />
<u><b>How? </b></u><br />
<br />
While it is not difficult to copy the actual content urls manually, SharePoint 2010's HTML Editor offers a quick and convenient way to create links to existing content. This is especially useful when there is a need to create a new page during content contribution.<br />
<br />
<a name='more'></a>SharePoint offers quick and easy ways to link to existing content and also to mark a piece of text as one that should have a page created for it. SharePoint then turns terms into special links, that, when clicked, allow the user to create pages for the terms. The following sections explain how to use wiki notation to achieve these two simple tasks.<br />
<br />
<u style="color: red;"><i>Limitation: This feature does not work within Content Editor Web Parts!</i></u><br />
<br />
<b>Linking to Existing Content</b><br />
<br />
To link to existing content while typing text in a wiki page, type [[. This opens a pop-up menu that shows a list of existing pages available in the site (see Figure 1). To link to one of these pages, simply select it from the menu and add ]]. The item is added to the text as [[pagename]], and when you save the document, this is transformed into a link to that page.<br />
<br />
Figure 1. Typing [[ a wiki page opens a pop-up menu that allows you to quickly link to another page.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7eKX6kmeq_aR72HJmr8VwJpr6R9834S1n8b9Q6ffNOiI8qUAFmt56iWYCycxlal3LqBlOWmiZ-yTdoftKJabgbC6NNJhFEjZsq8EdFloKVp36W2gPJLCvueBAMOp1J_P5oXe7Jz37yLs/s1600/Typing+2+square+brackets.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7eKX6kmeq_aR72HJmr8VwJpr6R9834S1n8b9Q6ffNOiI8qUAFmt56iWYCycxlal3LqBlOWmiZ-yTdoftKJabgbC6NNJhFEjZsq8EdFloKVp36W2gPJLCvueBAMOp1J_P5oXe7Jz37yLs/s1600/Typing+2+square+brackets.jpg" /></a></div>
<br />
The menu also offers two special options at the bottom: List and View. Selecting one of these is the same as typing [[List: or [[View:. You can then start typing either the name of the list or the view that is in the current site, and SharePoint autocompletes the name of the list as you type it or allows you to choose a list and then an item or view (depending on whether you selected List or View in the first level, as shown in Figure 2).<br />
<br />
Figure 2. When you start typing the list name, SharePoint shows you the lists you can choose from.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimn3Z93J3w-iNDrKpy5jPitsLOECLiNQLHlV_HwokBR-LpsPUpbKTi-s-9Jn1aZ1fHWVc2G0W0jpG0A8W5_nE9PA9Hafi3hw9iryCPCRPWcCRa0u_oZ6Qq8-TGMaRlV7VcDJaeIqWha40/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimn3Z93J3w-iNDrKpy5jPitsLOECLiNQLHlV_HwokBR-LpsPUpbKTi-s-9Jn1aZ1fHWVc2G0W0jpG0A8W5_nE9PA9Hafi3hw9iryCPCRPWcCRa0u_oZ6Qq8-TGMaRlV7VcDJaeIqWha40/s1600/2.jpg" /></a></div>
<br />
As before, the text shows as [[List:listname]], and this transforms into a link to the list or view when you save the page. For example, [[List:Sample List]] shows up in the page as the name of the list (Sample List), and it is linked to the list. Typing [[List:Sample List/1|sample item]] links to the item in the list Sample List with the title Sample Item, as shown in Figures 2 and 3.<br />
<br />
Figure 3. The syntax to link to a list item in a list.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtKH8dnzkymqagT6yEKrNxGWgi-C-CVxeE_cSsoKN61elSU12dXp7pR_ZMVywbrA9kQCCtOMZKCRJ31GuoPJSuh6uBzuj27nVDZA9bUMk2c95vNCae7tcp5J-9L4x-dOVv3vLtnNtJyyw/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtKH8dnzkymqagT6yEKrNxGWgi-C-CVxeE_cSsoKN61elSU12dXp7pR_ZMVywbrA9kQCCtOMZKCRJ31GuoPJSuh6uBzuj27nVDZA9bUMk2c95vNCae7tcp5J-9L4x-dOVv3vLtnNtJyyw/s1600/3.jpg" /></a></div>
<br />
<br />
Figure 4. The link is shown as the list item’s title.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvEPeWDTMYLBQS-CORyOpCiRWovivG1gP5hzTVs7D5rY6M3SMpSIiIFachWwvPwkOu2pExfWXrspgdHWThayMePE2A4w3ArYYDPPyL6IDZHLNTTu0SFOeqpzTWLFFZI3erUinvimaueJY/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvEPeWDTMYLBQS-CORyOpCiRWovivG1gP5hzTVs7D5rY6M3SMpSIiIFachWwvPwkOu2pExfWXrspgdHWThayMePE2A4w3ArYYDPPyL6IDZHLNTTu0SFOeqpzTWLFFZI3erUinvimaueJY/s1600/4.jpg" /></a></div>
<br />
<br />
<br />
<i><u>Tip: If the pop-up menu does not appear, press Ctrl+space to force it to show up.</u></i><br />
<br />
<br />
<b>Creating New Pages</b><br />
<br />
If you are writing something and realize that a certain word or term in your text should link to a page that needs to be created, you don’t need to stop and create it right away. Instead, you can use the wiki syntax to mark it as a link and then create it later—or let someone else create it. To do this, simply type the term you want to make into a link inside double square brackets. For example, if you write [[Product X]], the words Product X appear on the page as a link, even if there is no page for that product.<br />
<br />
When you save the page, the link looks different from other links; it is underlined with a black dotted line, as shown in Figure 5. Clicking this link opens the New Page dialog, which allows you (or other users) to quickly create a page for the word (or words) you wrote, as shown in Figure 6a and Figure 6b. The new page dialog is generated based on the kind of the site where the page is created. If the site in which the new page is created is a publishing site / has publishing feature activated, then a new publishing page will be created in the pages library else a wiki page will be created by default in the site pages library.<br />
<br />
Figure 5. A link to a page that doesn’t exist yet is marked with a black dotted underline.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNTDNOrn21Ub8B1EWoDuHEkgOkc8lAJ1FXmXaK6BckxlgZSwxWfx9I3ntvosLU_GeLWvE0gTPcEV-58eaJt3bkMt6HNKIsgQ-zYLdPbogWo9aHiCrTi7v6QHo4JZ_DVA8Zrb0m8gn3rt0/s1600/5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNTDNOrn21Ub8B1EWoDuHEkgOkc8lAJ1FXmXaK6BckxlgZSwxWfx9I3ntvosLU_GeLWvE0gTPcEV-58eaJt3bkMt6HNKIsgQ-zYLdPbogWo9aHiCrTi7v6QHo4JZ_DVA8Zrb0m8gn3rt0/s1600/5.jpg" /></a></div>
<br />
Figure 6a. The New Page Dialog for a new page link.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVu0BJQrhqi3Rj2YvsWYjEppDsleYB7SusB5yMi5UzqjMGBXypQJTlmGG_0g3jrvKPtglBbu7W2hH8Grcsq01weHvQX12cvKAywhkCHYj9dEd9mdbCkLNI3FrVzF7H5TmPDPnL_8vO9UI/s1600/7.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVu0BJQrhqi3Rj2YvsWYjEppDsleYB7SusB5yMi5UzqjMGBXypQJTlmGG_0g3jrvKPtglBbu7W2hH8Grcsq01weHvQX12cvKAywhkCHYj9dEd9mdbCkLNI3FrVzF7H5TmPDPnL_8vO9UI/s1600/7.PNG" /></a></div>
<br />
<br />
Figure 6b. The New Page dialog for a wiki link.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7q5ZRqpYdpFQXLC7tLvMHFOaj3WaGktFQEpcjQHMLiEPKUKhVfMCocRjx-5NaOo-XiFes3QnaH44_ei_vM87wxZ25yUloAdKhV3zgZbFTFiNRCZ_73M8FaHWOBnaRQ-AsF7hk-MHETkc/s1600/6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7q5ZRqpYdpFQXLC7tLvMHFOaj3WaGktFQEpcjQHMLiEPKUKhVfMCocRjx-5NaOo-XiFes3QnaH44_ei_vM87wxZ25yUloAdKhV3zgZbFTFiNRCZ_73M8FaHWOBnaRQ-AsF7hk-MHETkc/s1600/6.jpg" /></a></div>
<br />
References: <a href="http://mscerts.programming4.us/sharepoint/SharePoint%202010%20%20%20Use%20Wiki%20Syntax%20to%20Link%20to%20Existing%20Content%20and%20Create%20Pages.aspx">http://mscerts.programming4.us/sharepoint/SharePoint%202010%20%20%20Use%20Wiki%20Syntax%20to%20Link%20to%20Existing%20Content%20and%20Create%20Pages.aspx</a></div>
Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com1tag:blogger.com,1999:blog-7531459993417803686.post-53778681788965895962012-06-12T09:30:00.002-07:002012-06-12T09:30:33.908-07:00How to fix "System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.SPField.GetTypeOrBaseTypeIfTypeIsInvalid" ?<div dir="ltr" style="text-align: left;" trbidi="on">
<b>What?</b><br />
<br />
I suddenly started to see an exception "An unexpected error has occurred" in our SharePoint 2010 site when I tried to access the site's landing page.<br />
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzldFAiB73oFW6AVE2NgUjyzpou4kreob0sVJDjR8WSeDI7XzSKghyT7f7ZycMVjDprXAwzdFLZwf_tUZMyKWvEIijDklqMqulSoL4YP8q-9grL9zk5x2SfCKMb86t5BjeFVIQcj7r_lo/s1600/Exception.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzldFAiB73oFW6AVE2NgUjyzpou4kreob0sVJDjR8WSeDI7XzSKghyT7f7ZycMVjDprXAwzdFLZwf_tUZMyKWvEIijDklqMqulSoL4YP8q-9grL9zk5x2SfCKMb86t5BjeFVIQcj7r_lo/s400/Exception.PNG" width="400" /></a></div>
<br />
<br />
<a name='more'></a>After digging through the logs, the exception actually is:<br />
<br />
<span style="font-size: x-small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;">"System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.SPField.GetTypeOrBaseTypeIfTypeIsInvalid"</span></span><br />
Google has returned no results for this unique exception.<br />
<br />
The same exception has shown up on every page in the root site. All the sub-sites were doing fine.<br />
<br />
<b>Why?</b><br />
<br />
It is obvious that this exception is specific to one site's pages library. All the pages in other sub-sites are working fine.<br />
<br />
<b>How?</b><br />
<br />
I went into the pages library settings and then found that there are number of invalid fields.<br />
<br />
I have also seen a strange link that appeared next to each invalid field that says "Delete this invalid field".<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikvKUjt9P0nS6GaoU5qT23l2jvZAqzFbXokGiEF8lvdLEEIIfaVK-B66nni8njbkqUFxrNGKjy7Yt9ZGSErrv-qGRxvoSJqPFKfWHjquxVskWUxqi3QJ8Ht3UsuH7ce6SLnc4c5IeTWj0/s1600/Delete+This+invalid+field.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="273" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikvKUjt9P0nS6GaoU5qT23l2jvZAqzFbXokGiEF8lvdLEEIIfaVK-B66nni8njbkqUFxrNGKjy7Yt9ZGSErrv-qGRxvoSJqPFKfWHjquxVskWUxqi3QJ8Ht3UsuH7ce6SLnc4c5IeTWj0/s640/Delete+This+invalid+field.PNG" width="640" /></a></div>
I went ahead and deleted all the invalid fields and woohoo all the pages in the root site are back and working properly.</div>Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-46368424441423459112012-05-30T11:04:00.000-07:002012-05-30T11:05:52.559-07:00SharePoint 2010 - How to configure multiple search core results web parts on a page?<div dir="ltr" style="text-align: left;" trbidi="on">
<b>What?</b><br />
<br />
How to configure multiple search core results web parts on a SharePoint 2010 page?<br />
<br />
<b>Why?</b><br />
<br />
So what's a big deal in dropping multiple search core results web parts on one page?<br />
<br />
When multiple search core results web parts exist on a page each with own query specified in either "Append Text To Query" or "Fixed Keyword Query", then one of the search core results web parts returns wrong results.<br />
<b></b><br />
<br />
<a name='more'></a><b>How?</b><br />
<br />
In order to segregate the results for the two search core results web parts, we need to use a property called “<i>Cross Web Part Query ID</i>” on the basis of
which the search results are rendered. Whenever multiple search web
parts are configured and we want them to display different query
results, then we should make sure to change the “Cross Web Part Query
ID” for each web part.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgooiNortd-yPUs_XJ3n646_ml7uFeNAuDNpJqrqXtqoJyPbPZb7qMBsTUkFpKeS1mkehGev6OIYQiVkHMTzCK7ATu2u9L25RYz8HV6QRuruMO7i6cK9ZTE9J74qfqNjBFR4ZzI_VKrHPg/s1600/Search+Properties.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgooiNortd-yPUs_XJ3n646_ml7uFeNAuDNpJqrqXtqoJyPbPZb7qMBsTUkFpKeS1mkehGev6OIYQiVkHMTzCK7ATu2u9L25RYz8HV6QRuruMO7i6cK9ZTE9J74qfqNjBFR4ZzI_VKrHPg/s1600/Search+Properties.PNG" /></a></div>
<br />
<br />
References: <a href="http://technet.microsoft.com/en-us/library/gg549987.aspx">http://technet.microsoft.com/en-us/library/gg549987.aspx</a> and <a href="http://joeprakash.wordpress.com/2011/11/01/configuring-multiple-search-core-results-web-part-on-a-sharpoint-2010-page/">http://joeprakash.wordpress.com/2011/11/01/configuring-multiple-search-core-results-web-part-on-a-sharpoint-2010-page/</a><br />
<b></b><br />
<br /></div>Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-88112404338323263242012-05-21T11:09:00.000-07:002012-05-21T11:11:58.633-07:00SharePoint 2010 pages throw JavaScript error "SP.Ribbon.PageState is null" when we try to connect 2 web parts on a publishing page<div dir="ltr" style="text-align: left;" trbidi="on">
<u><b>What?</b></u><br />
<br />
SharePoint 2010 pages throw JavaScript error "SP.Ribbon.PageState is null" when we try to connect 2 web parts on a publishing page<br />
<br />
<u><b>Why?</b></u><br />
<br />
Don't know :) but I know a fix<br />
<br />
<a name='more'></a><u><b>How?</b></u><br />
<br />
Adding the "Page Content" field to the page layout (add it to the content type that the page layout is tagged to) has fixed the issue.<br />
<pre class="csharp" name="code">
<PublishingWebControls:RichHtmlField id="PageContent" FieldName="PublishingPageContent" runat="server">
</PublishingWebControls:RichHtmlField>
</pre>
</div>Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-6750472664513259042012-05-16T21:37:00.001-07:002012-05-16T22:21:57.551-07:00SharePoint 2010 - Unable to attach debugger to custom workflow built using Visual Studio<div dir="ltr" style="text-align: left;" trbidi="on">
<strong><u>What?</u></strong><br />
<br />
I have been developing a custom workflow for SharePoint 2010 using Visual Studio 2010. I have attached it to a library and started to debug it. The debugger got attached right the first time. But after making some code changes and redeploying the workflow, I was unable to attach debugger to my custom workflow anymore!<br />
<br />
<a name='more'></a><br />
<strong><u>How?</u></strong><br />
<strong><u></u></strong><br /><br />
I have tried a number of solutions: restarted Visual Studio, restarted the server, changed the debug type to Workflow when I attach the debugger, removed the assembly from GAC by force manually and redeployed the workflow etc. No luck.<br />
<br />
Finally after removing the workflow association from the library and adding it again solved the problem. Now Visual Studio successfully debugs my workflow again.</div>Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com0tag:blogger.com,1999:blog-7531459993417803686.post-56875630697634297922012-04-16T09:54:00.002-07:002012-04-16T09:54:33.317-07:00SharePoint 2010 - How to calculate the number of Web Front Servers (WFEs) / Web Servers required for my sharePoint 2010 site?<div dir="ltr" style="text-align: left;" trbidi="on">
<strong>What?</strong><br />
How to calculate the number of Web Front Servers (WFEs) / Web Servers required for a SharePoint 2010 site?<br />
<br />
<strong>Why?</strong><br />
<br />
Capacity Planning in SharePoint 2010 is a complicated and confusing topic and there's not a whole lot of really good documentation around it. <br />
<br />
There are so many factors that affect your planning in this area that it is almost impossible for anyone to come up with a solid number. Your performance would be affected by the server hardware, the client hardware, the concurrency rate of your users, the throughput rate required, the response time your organization deems acceptable etc. <br />
<br />
<a name='more'></a>These are just the factors that we actually CAN calculate into our formulae. Additionally, your general network load and other factors that could cause interference with your expected performance will from time to time wreck havoc with your stats, but for the most part we can make a good judgment call as to the type of farm setup that would be required in most cases. <br />
<br />
<strong>How?</strong><br />
<br />
Planning capacity is different for intranet/collaboration portals (that require a lot of read/write operations) from public facing sites built on SharePoint 2010 (that only require a lot of read operations).<br />
<br />
There are a number of excellent blog posts and documentation from Microsoft that explains about capacity planing for SharePoint 2010 sites.<br />
<br />
Here are a few of the best posts that I have come across:<br />
<ul style="text-align: left;">
<li><a href="http://technet.microsoft.com/en-US/library/031b0634-bf99-4c23-8ebf-9d58b6a8e6ce.aspx">http://technet.microsoft.com/en-US/library/031b0634-bf99-4c23-8ebf-9d58b6a8e6ce.aspx</a></li>
<li><a href="http://www.cjvandyk.com/blog/Lists/Posts/Post.aspx?ID=100">http://www.cjvandyk.com/blog/Lists/Posts/Post.aspx?ID=100</a></li>
<li><a href="http://blogs.technet.com/b/wbaer/archive/2007/07/06/requests-per-second-required-for-sharepoint-products-and-technologies.aspx">http://blogs.technet.com/b/wbaer/archive/2007/07/06/requests-per-second-required-for-sharepoint-products-and-technologies.aspx</a></li>
<li><a href="https://skydrive.live.com/view.aspx/Public-presentations/Sharepoint%202010%20capacity%20planning%20and%20sizing%20sheet.xlsx?cid=71febae9593b0994">https://skydrive.live.com/view.aspx/Public-presentations/Sharepoint%202010%20capacity%20planning%20and%20sizing%20sheet.xlsx?cid=71febae9593b0994</a></li>
</ul>
There are a number of variables such as the number of documents, estimated growth in the future, average size of documents, number of concurrent users, number of requests per second and calculations involved in determining the number of WFEs required for an intranet / collaboration site that involves a lot of documents. Therefore as far as I know there is no hard and fast rule to recommend the number of WFEs for an intranet / collaboration site built on SharePoint 2010.<br />
<br />
For a public facing site, the main driving factors are requests/views per second (RPS) and total number of concurrent users.<br />
<br />
An experienced solutions architect has adviced me that a typical WFE with <strong>4 Core CPUs and 16 GB RAM</strong> which is the recommended hardware for a public facing SharePoint 2010 site in a production environment can handle <strong>200-300 concurrent users with 300-500 page views per sec</strong> for a public facing site. </div>Anonymoushttp://www.blogger.com/profile/10868654749994006142noreply@blogger.com1