views:

66

answers:

1

I tried to create a OData web service using VS 2008 without any luck. I downloaded ODataDemo from Odata.org, installed Microsoft .NET Framework 3.5 Service Pack 1, and ADO.NET Data Services Update for .NET Framework 3.5 for Windows XP. However, I don't see any reference to ADO.NET Data Services Framework. When I tried to add a new ADO.Net data services, I cannot find out any templates for this.

For example, I cannot find ADO.Net data web service from Add|New Item...(| Web | WCF Data Service).

Not sure if I miss any packages or libraries? Or if there are any .Net 3.5 or VS 2008 example projects for OData available?

By the way, I tried to download VS2010 Express. It just too slow on my Windows XP and I cannot find out any templates for Web service or ADO.Net wcf data service. I am not sure if there is any other REST web service toolkit available for VS 2008? I think I tried REST WCF Toolkit from CodePlex long time ago, but I cannot find it there. Basically what I need is a tool kit to create REST service to provide a collection of data in xml or json.

+1  A: 

I'm using VS2008 Professional.

I installed the ADO.NET Data Services Update for .NET 3.5 for XP, and was able to add an ADO.NET Data Service to my web application project. What I did was:

  1. Created a new web application project;
  2. Right-clicked on the project and selected Add -> 'New Item...';
  3. In the Add New Item dialog, the third item in the 2nd column (at least for me) was ADO.NET Data Service. I selected that and all was good.

The template for this item can be found on your file system at (based on my machine): c:\program files\microsoft visual studio 9.0\common7\ide\itemtemplates\web\csharp\1033

You should see a ZIP file there named 'AdoNetDataServiceCSharpWebsite.zip'. If you don't, then it's not installed on your machine. If it's there, then there's some other problem. Check permission on that file, also. Make sure you can read it.

Let me know of any other info you have on this so I can help.

Good luck!!

David Hoerster
I don't have ADO.NET Data Services in my VS 2008, however, I do have ADO.NET Web Service Application and ADO.NET Web Application. Not sure which one is for ODATA?
David.Chu.ca
There isn't an ADO.NET Data Services type of project in VS 2008. You just add an item to an existing ASP.NET Web Application (I think this may also apply to ASP.NET Web Site Applications, too). So if you create an ASP.NET Web Application and then right-click on the project in Solution Explorer, select Add New Item, and you should be able to select ADO.NET Data Service as an item to add. It should be a '.svc' file, and then you program the service in the .svc.cs code behind. If you don't see that, follow the steps in my answer above to see if you have the template installed. Good luck!
David Hoerster
Thanks for your answer. I still cannot see ADO.Net Data Services when I try to add a new item to my web application or project. Do you have the link to ADO.NET Data Service Update for .NET 3.5 for XP?
David.Chu.ca
David Hoerster
Thank you, D. Hoerster. I got it. I did not see ADO.NET Data Service when I was not in a web service application. It looks like that the ADO.NET Data Service has some dependency conditions, not a service I can add to another service project. Great!
David.Chu.ca