Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3680232
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:33:09+00:00 2026-05-19T03:33:09+00:00

Ok, so I can’t seem to find decent Windows Azure examples. I have a

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T03:33:09+00:00Added an answer on May 19, 2026 at 3:33 am

    If you have an HttpContext there may be a Request object that would have the form data. I’m basing part of this off the ASP.Net tag on this question, so if that is incorrect then there may be the need to handle this another way but it looks a lot like a web service to my mind.


    EDIT: HttpRequest is the class that has the Form property that should be where the POST data is stored if this is an HTTP request. This is part of System.Web so it should be ready to be used pretty easily, as I recall.


    Sample code showing the Request.Form property:

    int loop1;
    NameValueCollection coll;
    
    //Load Form variables into NameValueCollection variable.
    coll=Request.Form;
    // Get names of all forms into a string array.
    String[] arr1 = coll.AllKeys;
    for (loop1 = 0; loop1 < arr1.Length; loop1++) 
    {
        Response.Write("Form: " + arr1[loop1] + "<br>");
    }
    

    This presumed there was an HttpRequest instance around.


    WCF Simplified Part 4: Comparing the Request/Reply and One-Way Patterns passes in a parameter so that your “createSession” method would have to take in those strings it would appear. I’m used to the ASP.Net world where there are some built-in objects like Request, Response, Server, Application and Session.


    Yes, if you did try changing the method signature as there are ways to pass in parameters in that last example I linked though I don’t know if that would work in your case or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can somebody point me to a resource that explains how to go about having
Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of
Can a LINQ enabled app run on a machine that only has the .NET
I have a jquery bug and I've been looking for hours now, I can't
I have just tried to save a simple *.rtf file with some websites and
I have text I am displaying in SIlverlight that is coming from a CMS
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I have a Rails
Can I connect to a Ubuntu server, that is running MySQL using ADO.NET or
If all tables I want to delete from have the column gamer_id can i
I have a new web app that is packaged as a WAR as part

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.