Tuesday, March 16, 2010

SharePoint + InfoPath : An error occurred accessing data source

InfoPath forms and SharePoint are a deadly combination. Only with long association with these two does one understand how both need to be configured to work in harmony !

Here is an example of an error one gets many times while working with these two and webservices. I got "an error occurred while accessing a data source" while accessing my InfoPath forms on SharePoint 2007 site from any machine on the domain other than my SharePoint server where I had deployed my forms.

My forms were accessing a web service deployed onto the server and I was trying to access my SharePoint site from any other machine on the domain.

How I resolved it
Set the Security and Trust to "Domain" . It was set to "automatically determine security level".
you can do this by going to :
Tools -->Form Options -->Security and Trust

Cheers :)!

Friday, February 19, 2010

Portal Listings : migration nightmare from Sharepoint 2003 to 2007

A client of mine had extensively used a less known list of Sharepoint 2003 called "Portal Listings". I researched a lot and found that it was kind of an admin feature to regulate what content could be published and what should not be. A portal listing is typically a combination of a document library and a links list. The Link's list serves as the interface linking to documents and metadata at the back.

In our case, the portal listings were used in almost every page of the intranet we had to find a way to migrate it to the new SharePoint 2007. MOSS has nothing called portal listing, a partial replacement is the content by query webpart since it doesn't roll up content as easily as the portal listing.
We first used Quest to migrate the listings but it just wouldn't migrate.AvePoint from DocAve made progress by migrating the Portal Listing content to a Document Library and a link list.

So, now the challenge was to display the data the same way as the portal listing in 2003.

Since, the portal listing used to roll up content from sites and sub sites and have publishing features for every link (ie; start date,expiration date etc ) we needed a web part to have content roll up features and ability to filter on migrated metadata like start date, expiration date etc.

The Content By Query WebPart would roll up content by browsing to a list but the filters would work only if the columns are Site Columns. There is no way to directly make an existing column a Site Column so we had to find another way.

The Solution: Data View
  • Open the page in SharePoint Designer
  • Insert a Data View in a web part zone
  • Add a new data connection by connecting to the portal listing
  • You can change the UI, make it link to documents and have all the fun
The only change is that the UI is the SharePoint Designer interface and directly from the SharePoint Site.

However, it is a robust solution and replacement to the antiquated Portal Listing !#@@##

Monday, January 18, 2010

SharePoint element styles: a good link

http://sharepoint.microsoft.com/blogs/zach/Master%20Page%20Cheat%20Sheet/Forms/Master%20Page%20Elements.aspx

Tuesday, December 29, 2009

asp.net email +Transaction failed. The server response was: Sending address not accepted due to spam filter

A very common error while sending email through ASP.Net code :
"Sending address not accepted due to spam filter"
To resolve this just pass the network credentials for a user and it will work.

Tuesday, December 15, 2009

FileUpload control does not work in Update Panel : solution

All file upload controls (includes asp, telerik, componentart, component factory and others) does not working in any AJAX update panels. This means if your upload control located in an update panel, control does not post the file. If you look to the posted file property of the control, you will see it null.

This is a limitation comes from the XmlHttpRequest component, used in all AJAX frameworks for asynchronous calls to the application. In order to upload a file you should perform a full page postback.

The solution is to add a Triggers tag:

<asp:UpdatePanel ID="upFileUpload" runat="server" >

<Triggers>

<asp:PostBackTrigger ControlID="btnUpload" />

</Triggers>

<ContentTemplate > .....

</ContentTemplate>

</asp:UpdatePanel>

See it work like a charm!!

Saturday, December 5, 2009

Issue with the ajax tab panel

In case your AJAX Tabs are not rendered properly and you get white line/space then quick fix will be to define the height of Tabs.


Define the following CSS below and reference in your TabContainer and things will work well .

<style type="text/css">

.ajax__tab_xp .ajax__tab_tab

{

height: 21px;

}

</style>