Skip to main content

Ajax Integration with sharepoint


Master Page

1. Add the following tag just below the form tag of master page

<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />

Web.Config
1. Add safe control

<SafeControl Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TypeName="*" Safe="True" />

2. Add the http handler inside <httpHandlers> tag of web.config

<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
3. Add the HttpModule inside <httpModules> tag of web.config

<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
4. Add the assembly inside <assembly> tag of web.config

<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

5. Add controls Tag inside <pages> tag of web.config
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>
If you are adding <system.webServer> tag inside <configuration> like following then you could avoid step 2 and 3


<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
</system.webServer>



Comments

  1. Hi,The first step in website development process is information gathering, as well as putting your and our ideas sketches onto paper. Defining Web Design Cochin and development concept and requirements is a very important step before planning the phases and tasks of the process.Thanks........

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Nice blog..! I really loved reading through this article. Thanks for sharing such
    a amazing post with us and keep blogging...Well written article Thank You for Sharing with Us pmp training in velachery | project management certfication in chennai | project management training institute in chennai | pmp training fee | pmp certification course in chennai

    ReplyDelete

Post a Comment

Popular posts from this blog

How to find Sharepoint DB

In sharepoint world you should know where the sharepoint database is to trouble shoot database related issues.Some one come to you and say i am getting unable to connect to database error or my sharepoint is down.So you may not know the details of the environment.In first step you need to identify the  servers so you have to find the configdb and content db servers. How to find the Config DB Configuration database connection string is stored in Registry key. So sharepoint look for that entry to identify the database. In Sharepoint 2007 you could see the config DB conection string in Following Registry Key My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDb In Sharepoint 2010 you could see the config DB conection string in Following Registry Key My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Secure\ConfigDb The Next thing you have to find the Content DB attached to Web application.

Creating Custom Timer Job

Timer Job is something which comes into mind when you are looking for batch process in sharepoint.In most of the realtime sharepoint site requires Pulling data from some other application and update the data in sharepoint.In some other scenario we need to synchronize information or Updata date in every day, or give the admin a flexibility execute some batch processing.Its realy good idea to create a Custom Scheduled Job.Let see a Basic skelton code. using Microsoft.SharePoint; using Microsoft.SharePoint.Administration; //Class should inherit from  SPJobDefinition Public class SampleJob :  SPJobDefinition {        //You could Define Custom properties         [Persisted()]         public string MyCustomProperty; ///Implement Following three constructors public SampleJob (): base(){  } public SampleJob (string jobName, SPService service, SPServer server, SPJobLockType targetType): base (jobName, service, server, targetType) { } public SampleJob (string jobName, SPWebAp