Using a REST API using "Astoria" (with .NET Framework 3.5 and VS.NET 2008 SP1)

Hello! I'm really interested in learning how to work with the new .NET Framework 3.5 and VS.NET 2008 SP1 (still beta).

Here is my question:
I would like to use a REST API that is not made by me. I'm talking about the REST API of Community Server 2008 ( I've got the full specification of the API. They have it well documented and ready to go. It appears to be very easy to use, but... HOW? How to connect the web services with the new .NET 3.5 properly?

The full specification can be read here:

I've successully used a DataServiceContext and added a custom HTTP header to use its token-based authentication. The problem comes when I want to, for example, insert a new blog post. How do I invoke the method? Have I to create some kind of query? How do I pass the new element to the service??

The documentation about the method to create a new blog post is as follows (extracted from the website above).

Create Post

POST /api/blogs.ashx/posts/



Note the BlogInfo object can be omitted if you pass the desired Blog Id into the URI Context by posting to /api/blogs.ashx/blogs/{BlogId}/posts

Minimum required fields (Title, Body, and Date)


Status: 201 CREATED
<BlogPost> ...

Can somebody give some example of how to call any of the REST methods using the new Framework?

7/2/2008 12:49:21 AM 7071 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 11


Similar Artilces:

How to add .Net Framework 3.5 to IIS Properties tab? How to show "shortcut" or "Confiure" 3.5 icon on Control Panel?
I have installed VS 2008 Express, SQL 2005 Express and .Net Framework 3.5.   On IIS Properties, the web sites I have created, on the ASPnet tab of the Properties dialog desktop, clicking the NetFramework dropdown arrow, showed only the .NetFrameowrk 1.1 and 2.0.  How can I add the .Net Framework 3.5 to the dropdown list?   Why I can not see the "short-cut" or "Configuration"icon for .NetFramework 3.5?  Only those for 1.1 and 2.0 were shown.  Thanks,  Hi Read the Following,What exactly is ASP.NET 3.5 ? Take a look at the v3.5 framework...

mapping a drive using "net use" w/no password"
duplicate. -- Regards, Kai Reichert Novell Support Forums Sysop Usually the faulty interface lies between the chair and the keyboard. ...

"Sys is undefined" using VS2008, .NET 3.5
Ok, first of all: I have searched forever and read countless articles on this problem. Most of them reference the 1.0 or 2.0 frameworks--but I tried them anyway. My web.config is NOT the problem. The web.config on my Production server is the same as on my Development server. The Prod server has 3.5 framework installed, as well as the Dev server. Everything works as it should on the Dev server, but I get "Sys is undefined" when trying the EXACT SAME web application on the Prod server. On my Dev server, the folder is NOT flagged as a Web Application--and yet it runs fine, so the...

"□" character is not taken by the XML web service in .net framework??
Dear all, I am developing a simple smart device application using XML web services for Oracle database connection with smart devices.In this application I am simply taking the data from the textbox in the mobile,encrypting it & finally sending it to the oracle database using XML web services.i am using .net framework for the whole.But the problem is that as I am trying to send the data to the oracle database after encryption of some strings/characters,one special character "□" is not taken by the XML format in the web service.It is giving error by saying that it is invalid character for...

mapping a drive using "net use" w/no password" #2
I want to set up a test scenario where I have a bunch of clients logging into a Netware server using native file access. My clients use a script file which maps shares to the server using the "net use \\server\share /p=no" (for no password). I keep getting "system error 5 - access is denied". What am I doing wrong and what can I do to fix it? Thanks for your help Assuming you're using Local mode, you must assign a Simple password. Note that a blank Simple password is not the same as never assigning a Simple password. bd NSC Voluntee...

It is showing invalid character "□" by the XML web services in .net framework
 Hi, I am developing an smart device application where I am taking some data through mobile device,encrypting it & finally trying to insert it to the Oracle database by using XML web services.But my problem is that after encrypting the data & taking ASCII encoding of that data,I am getting one special symbol "□" which is not taken by the XML web services by showing the error that its invalid character for the XML format.SO as a result I am not able to insert the encrypted data into the Oracle Database. Can anyone give any solution of this problem? Waiting for your r...

Support for dw.NET 2.5 in VS 2008, .NET framework 3.5 and Oracle 10.2g
Hi, I intend to use the datawindow.NET 2.5 in VS 2008 (.NET framework 3.5) using a Oracle 10.2g database as a backend and later using Oracle 11g as backend. Can someone please let me know if the product is supported in the environments mentioned. All help will be highly appreciated and many thanks in advance. Regards Hasan Kasamali On Nov 24, 3:06=A0am, Hasan Kasamali wrote: > Hi, > > I intend to use the datawindow.NET 2.5 in VS 2008 (.NET > framework 3.5) using a Oracle 10.2g database as a backend > and later using Oracle 11g as backend. > > Can ...

Hide "NET USE" C:\Windows\System32\net.exe prompt
--____HXVYWAWXUSKEVXKBAEOI____ Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On our logon script I'm currently mapping NetWare shares using the MAP = command and Windows shares using the NET USE command. Everything is = working fine and well its just that I'd like to completely hide the = windows command prompt box at login. Close as I've come to a recommendation= was to minimize it but not to completely hide it. as a example of what I'm currently doing: @CMD /C START /M NET USE R: = \\servername\sharename "@C...

Sending SMS using or using or
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

C#.Net "Double" and "double" When/Where to use?
Hi all     Please let me know the difference between "Double" and "double" in c#.Net (I understand that "Double" is structure      and "double" is an instance to that structure) differences if any thing else.     Also the context in which both has been used.(When/Where to use both). thanks all...      hi,my brains says Double is reference type & double is value type.regards,satishKind Attn: If a reply to your post helped you, kindly mark it as Answered.__________...

"Net use" not working in application that runs as "system"
Hello, I am trying to create an application object to distribute a program which during the setup procedure creates two local users on the workstation. I tried to set up the application to run as an unsecure system user and start the setup.exe. This method worked fine for quite a number of apps in the past. However this app needs a drive mapping to a windows 2003 server to start the setup.exe. Apparently under windows 2003 it is no longer possible to use the "net use" command when running a script as system user. I get system error 1312 "A specified logon ses...

.Net 1.1 with .Net 2.0 virtual directory using AJAX "Sys undefined"
I'm having an issue running an AJAX app I built, I think I might know what the problem might be, but if so, I am not sure how to fix it. The main site is built with 1.1 and new application is 2.0.  I have the new application configured properly (as far as I can tell) in its own app pool, etc..  The app runs just fine (I have other 2.0 apps that run along side the main 1.1), but I am getting an error: "Sys undefined...."  I've checked to enusre the mappings for the .axd extension for this particular VD are pointing to the correct place as ...

Programatically build Web Service proxies independent of the "Web Reference" in VS.Net?
Can anyone detail for me how to build a proxy for a webservice from its .wsdl without using a "web reference"? Or point me to a hotw-to somewhere? I assume there is an API for this in the Framework, I just cannot find it... Thanks.Thanks,B You have to use WSDL.eXE you can see info on it @ Hope it helps!Sreedharhttp://www.w3coder.orgweblog For complete programmatic use of dynamic Web services by simply feedi...

Consuming Web service from .net 3.5 web application using ajax
Hi , Before in .net 2005 ,I use to consume the  web service from client side via Ajax and java script. that's just adding web service inside the script manger services.But  it was not possible with .net 2008 version WEB APPLICATION   , Even it works well with .net 2008 web sites. Please help me to solve the issue. I have no idea what you mean. Please post the code that "does not work". NC...   I have the same problem.  I have a .NET 3.5 Web Application not Web Site.  I fully qualify the web service with the namespace i,e,  &n...

Web resources about - Using a REST API using "Astoria" (with .NET Framework 3.5 and VS.NET 2008 SP1) -

Resources last updated: 12/17/2015 7:01:58 PM