Infosys Microsoft Alliance and Solutions blog

« Silverlight 2.0 | Main | BizTalk Server and WCF Integration »


We have working on getting AJAX to work on MOSS with a few tweaks here and there. We knew that this wasn't officially supported and there were still a few unresolved issues like Expander control and the !DOCTYPE tag.

However with the release of MOSS SP1, ASP.NET AJAX is now officially supported on MOSS. I am currently in the process of downloading the same and can't wait to try AJAX on MOSS. Hoping that all issues would have been resolved and we will no longer need to do our custom tweaks to get AJAX to work on MOSS.


I've been trying to deploy AJAX code to Sharepoint for some time, and ran into a few problems. Eventually, I gave up on the SmartPart because no matter what I did, I couldn't get an XML object data source to read correctly. However, since I started my solution search here, I thought I'd post some work arounds for some of the common errors I've seen.

I was getting an error about registering scripts before prerender. The solutions I found online were to make sure that the AJAX toolkit was up to date, and that anywhere onprerender was overridden, make sure you call base.onprerender(). This didn't solve my problem. Getting rid of all the UpdateProgress controls did solve the problem.

There's a sporadically reported error that doesn't seem to have a documented solution:

This control does not allow connection strings with the following keywords: ‘Integrated Security’, ‘Trusted_Connection’.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.SharePoint.WebPartPages.DataSourceControlDisabledException: This control does not allow connection strings with the following keywords: ‘Integrated Security’, ‘Trusted_Connection’.

I was able to get rid of this by putting my VS 2005 built ASPX pages in a separate virtual directory (running as an application), and editing the web.config for my new application. Add the following section to the section:

I'm not sure if this would work for the smartpart, but since I had to use a separate web application anyway, it works for me. Essentially, it tells SharePoint to get out of the way when accessing data sources.

Pls Suggest...!

Hi Brajendu,

The problem that you are facing is pretty much related to the way in which you configure your SharePoint Web Application to work with ASP .NET AJAX. From the description of the problem that you have provided above, I see two important points:

1. The security configuration of SharePoint does not allow you to access any data source directly using Integrated Security. Check the security policy set for the SharePoint web application i.e. whether it is WSS_Minimal or WSS_Medium or any other custom policy.

2. As far as AJAX not working with SharePoint is concerned, there have been a few issues related to the UpdatePanel control and a fix for this has been provided by Microsoft. Now, if you are trying to develop custom AJAX web parts on your SharePoint site, the best method for deploying using the related scripts is by embedding them as web resources in web part assembly and using them.

A very important point to remember with deployment of AJAX on MOSS is the sequence of steps being followed to do that. Any change in the specific sequence can lead to unpredictable results.

Could you list down the steps for using Ajax on MOSS. I have read Mike ammerlans article for ajax on moss.

But after the updation of WSS 3.0 and MOSS Service Pack 1, is there any change in the Ajax implementation MOSS.

Specifically I am looking at a solution where we dont have to use ScriptManager Tag in the master pages and the 2nd challenge being the UpdatePanel. The ajax implementation does not work with updatepanel.

Can you provide me with a link or a solution where it takes care of the above two challenges.


Hi Ram,

There isn't much that has changed in terms of the way ajax stuff is hosted on MOSS after the release of MOSS 2007 SP1. A few things to take care of though:

1. Ensure that the configuration is set based on the version of ASP .NET AJAX that you choose. (you have two versions 1.0 and 3.5)

2. It is not necessary that you add Script Manager on the master pages. The script manager can be part of the web part itself. The script manager API will allow you to check whether a script manager exists on the current page and add one based on need. If a script manager already exists on the page, you can add a ScriptManagerProxy to add any further scripts or service references.You can figure this out by playing around with the Script Manager API.

3. To deal with the problem of UpdatePanel, you need to add a fix. Here is a link from Microsoft Support:

The method EnsureUpdatePanelFixup method will allow you to solve the problem.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Please key in the two words you see in the box to validate your identity as an authentic user and reduce spam.

Subscribe to this blog's feed

Follow us on

Blogger Profiles

Infosys on Twitter