Windows Azure access POST data

Posted by Mohamed Nuur on Stack Overflow See other posts from Stack Overflow or by Mohamed Nuur
Published on 2010-12-28T04:34:35Z Indexed on 2010/12/28 9:53 UTC
Read the original article Hit count: 287

Filed under:
|
|

Ok, so I can't seem to find decent Windows Azure examples. I have a simple hello world application that's based on this tutorial. I want to have custom output instead of JSON or XML. So I created my interface like:

[ServiceContract]
public interface IService
{
    [OperationContract]
    [WebInvoke(UriTemplate = "session/create", Method = "POST")]
    string createSession();
}

public class MyService : IService
{
    public string createSession()
    {
        // get access to POST data here: user, pass
        string sessionid = Session.Create(user, pass);
        return "sessionid=" + sessionid;
    }
}

For the life of me, I can't seem to figure out how to access the POST data. Please help. Thanks!

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about post