.Net 3.5 ADO.Net Data Service & Ajax


I was trying to use the example in the following video and I keep getting "Server Method "Categories" failed" error. I have .Net 3.5 SP1 and VS 2008, is there any workable example out there? 
I also added the Entity Data Model.


I really like the way how you can access data in the database using javascript. Any help on this code? thx

    <input id="ButtonQuery" type="button" value="Perform Query" onclick="return ButtonQuery_onclick()" />
    <br />
    <ul id="resultList"></ul


"javascript" type="text/javascript">
// <!CDATA[

function ButtonQuery_onclick() {

    var ds = new Sys.Data.DataService("Northwind.svc");
    ds.query("Categories", cbSuccess, cbFailure,);

function cbSuccess(result, context, operation) {
    var rList = document.getElementById("resultList");
    for (var i in result) {
        var thisCat = result[i];
        var li = document.createElement("li");
        li.appendChild(document.createTextNode(thisCat.CategoryName + ": " + thisCat.Description));

function cbFailure(error, context, operation) {

// ]]>
public class Northwind : DataService
    // This method is called once during service initialization to allow
    // service-specific policies to be set
    public static void InitializeService(IDataServiceConfiguration config)
        config.SetEntitySetAccessRule("*", EntitySetRights.All);
Please be sure to click "Mark as Answer" on the post that helped you.
9/24/2008 11:04:47 PM
asp.net.networking-webservices 2181 articles. 0 followers. Follow

5 Replies

Similar Articles

[PageSpeed] 19

This is what I have for the script reference:

<asp:ScriptManager ID="ScriptManager1" runat="server">


<asp:ScriptReference Name="MicrosoftAjaxDataService.js" />



Anyone have a working example of this?

Please be sure to click "Mark as Answer" on the post that helped you.
9/25/2008 7:09:02 PM

Anyone worked this example?

Please be sure to click "Mark as Answer" on the post that helped you.
9/26/2008 10:08:13 PM


Intially you have create a ado.net data service and refer the svc to the client 


10/14/2008 12:02:38 PM

Do you have an entity model file and, as suggested above, a corresponding svc file?  You need to create an entity model to wrap the database, and then point to that model in your code-behind.

Jim Wang
Microsoft (ASP.NET)
10/18/2008 1:52:35 AM

Hi officialboss,  I actaully have a blog post which walks through this topic in the new ADO.NET AJAX Library at http://weblogs.asp.net/jimwang/archive/2008/11/05/working-with-ado-net-data-services-in-ajax.aspx.  There's working sample code you can download there.  Hope that helps!

Jim Wang
Microsoft (ASP.NET)
11/12/2008 1:42:05 AM

Similar Artilces:

.NET 3.5 SP1 & ADO.NET Entity Framework Clarification
I'm a little confused, can someone please clarify, with the recent release of .NET 3.5 SP1....  does that include an official "release" of the ADO.NET Entity Framework?  Or is the framework still in early pre-release stages?Thanks,Matt BrownMetalReview.com - Metal music community and reviewsHaulix - Easy promotional media distribution for the music industry Entity Framework is officially released and is part of SP1. Sweet times, sweet times. This is the official forum for it: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=533&SiteID=1 The forum was no...

Can I switch from .Net 3.5 to .Net 3
After finishing the website that I built in VS 2008 and has AjaxControlToolkit controls. I was informed by the network admin that the server has .Net 3 and that we can't install .Net 3.5. I tried to change the application settings from Property Page --> Build node, and then select .Net Framework 3.0 from Target Framework Dropdownlist, and then click OK BUT then I can't run my application I get error message and the     <asp:ScriptManager ID="ScriptManager1" runat="server" />   is unknown even when I try ...

Can we replace Microsoft .Net framework 3.5 with Microsoft .NET Compact Framework 3.5
Hi, I have installed vs2008 in C drive and removed it from there  including Microsoft .Net framework 3.5, due to space crunch, then I started installing it in D drive, in this case it did not install .Microsoft .Net framework 3.5 and now it does not show me Microsoft .Net framework 3.5 it shows .NET Compact Framework 3.5 in Add remove program list. My question is will VS2008 work fine with .NET Compact Framework 3.5. apart from it it also has .NET Framework 3.5 SP1 in the list, all what is missing is microsoft .net framework 3.5  Please let me know ...

How do I connect to SAW 5.5 with VB.NET/ADO.NET?
I want to connect to a SQL Anywhere 5.5 database running on a W2K Pro server, using VB.NET and ADO.NET. Here's how I connect to MS SQL Server with VB.NET and ADO.NET: gstrADOConnectionString = "Data Source=" & gstrServerName & ";" & _ "Initial Catalog=" & gstrDatabase & ";" & "Integrated Security=SSPI;" & _ "Connect Timeout=" & Convert.ToString(gshoADOConnectTimeout) Example: Data Source=PSI_Dell;Initial Catalog=BRM;Integrated Security=SSPI;Connect Timeout=60 Here's how I did it...

setup AP.NET membership database & web.config in .NET 3.5?
 A long time ago I setup an ASP.NET security database using aspnet_regsql.exe. I noticed this utility doesn't ship with .NET 3.5. Can anyone direct me to a writeup of how to create the security database and modify the web.config for membership? Thanks! Michael  Hello Michael, You still use the .net framework version 2 version of aspnet_regsql.exe in something like C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727As I understand it ver 3.5 is just adding new features onto the version 2 framework but mostly asp.net is just the same. Hope it helps JeremyRegardsJeremyIf ...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links http://en.wikipedia.org/wiki/.NET_Framework http://blogs.msdn.com/mohammadakif/archive/2006/12/03/net-3-0-different-versions-of-the-net-framework.aspx http://www.codeproject.com/aspnet/ComparisonASP1xASP20.aspAshok Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

Issue with clients consuming a web service that was upgraded from .NET 1.1 to .NET 3.5
I am currently working with an application that was converted from Visual Studio 2003 to Visual Studio 2008 and we are having issues with a client consuming the web service portion of the application.  The web services were written in .NET 1.1 using the Web Services Enhancements 2.0 and was upgraded to use the .NET 3.5 framework.  One of our clients application, which is still written in .NET 1.1 was reference the upgraded web service and tried to consume the web service and received the following error: System.Web.Services.Protocols.SoapException: Se...

Difference between var type of .NET 3.5 and object Data Type in .NET 2.0?
Hi All,With .NET 3.5 a new feature is introduced of defining Anonymous Type.You can achieve this with keyword "var".We can achieve the same functionality in .NET 2.0 with object type.What is the difference between var type of .NET 3.5 and object Data Type in .NET 2.0?Virendra (MCTS)My Site, Blog virendra1983:With .NET 3.5 a new feature is introduced of defining Anonymous Type. var types are actually strongly typed in design time. What happens in the IDE infers the type of the object based on its initialisation so you get strong typing and intellisensee.g.var i = 9...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

ado.net data services and ajax
I'm trying to do this quickstart: http://quickstarts.asp.net/3-5-extensions/adonetdataservice/QueryDataServiceAndAJAX.aspx  I downloaded the extensions, but it's just two javascript files??? How do I install this??/ I've read about twenty articles written between january and now, and the best I can figure is I need the 3.6 version assembly of System.Web.Extensions? If so, why do I need these javascript files if they need to be embedded as a resource in a sealed assembly? I'm goin nuts over this, if someone could please help me setup for this. The furthest I've ...

.net 3.5 convert to .net 2?
 how can i convert in Web Developer 2008 .net framework 3.5   to .net 2 ? KAHREDEN HAREKET ENGELLENNEMEZ  Hi,If you have not used any .NET 3.5 controls, you simply need to remove all references to .NET 3.5 within the web.config. I hope this helps, if it answers your question, don't forget to mark it as such for those who come afterwards.Regards,Gareth ChidgeyManaging DirectorPushInternet Ltd  ok.how  can i create new web site in web developer 2008 at .net framework 2  .    KAHREDEN HAREKET ENGELLENNEMEZ  try this http://we...

ajax 3.5 extensions preview and .NET 3.5
I'm a little bit confused.On one hand you say the AJAX framework is included in .NET 3.5. On the other hand there's an ajax extensions preview which "provides new functionality being added to ASP.NET 3.5 and ADO.NET in 2008." Is the latter like an addon to the .NET 3.5 built-in framework? Out of a developer perspective I would like to know if it is "safe" to develop with the 3.5 extension preview.. and if at any state its functionality is added to the .NET framework. Do I need to install the 3.5 extension preview on my host running IIS, too? Or i...

Upgraded to VS2008 & .NET 3.5 ... 3.0 Web services no longer working
Hi guys. We've just upgraded to to VS2008 and .NET 3.5 and found that 3.0 web services that where running on the machine we did the install on are no longer working or showing up as web services during discovery. Are there any common causes for this? Thanks. ...

Web resources about - .Net 3.5 ADO.Net Data Service & Ajax - asp.net.networking-webservices

Public Broadcasting Service - Wikipedia, the free encyclopedia
... such as PBS NewsHour , Masterpiece , and Frontline . Since the mid-2000s, Roper polls commissioned by PBS have consistently placed the service ...

Public service departments told where to improve
An annual review of the federal bureaucracy has identified what areas departments need to improve.

Uber begins 'summer service' ride-sharing on the Sunshine Coast
Uber began operating on the Sunshine Coast from noon on Monday as the ride-sharing firm grows further.

This Chinese Public Service Ad Brought to You By a Talking Fetus
The environment, especially air pollution, can be a sensitive topic in China. So it's interesting to see a public service message from the state-owned ...

Researchers poke hole in custom crypto protecting Amazon Web Services
... cryptographic software, academic researchers recently uncovered a potentially game-over weakness in a code library protecting Amazon Web Services. ...

Ultimate pirate TV streaming service returns with hundreds of channels and new features
This past May, we were among the first to tell the world about a pirate TV service called cCloud TV . The service made a name for itself by collecting ...

Alphabet is reportedly going to make its subsidiaries pay for Google's services
... to do their own recruiting or build their own technical infrastructure if they feel up to it. But if they want to use the established services ...

Frontier To Launch IPTV Service in Durham in January -
... in January, the company has announced. It's notable for the fact that it's the first time that Frontier has offered fixed-line TV services outside ...

CBS' streaming video service comes to Amazon's Fire TV
... a cord-cutting device... at least, if you watch a lot of CBS shows. The TV network has launched an Amazon-native app for its All Access service, ...

Customer Service Secrets For Millennial Customers, That Help You Serve Boomer Customers Too
Want to succeed in building a superior customer service experience for customers of all ages? Start by learning the new customer service principles ...

Resources last updated: 11/24/2015 8:45:47 PM