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

  • SEARCH
  • Home
  • 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 917601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:14:11+00:00 2026-05-15T18:14:11+00:00

If another website is making a POST to my ASP.NET MVC 2 site, how

  • 0

If another website is making a POST to my ASP.NET MVC 2 site, how can I capture it? Do I need to do anything to the routes?

eg The other site does this:

string url = "https://mvc2-site.com/TestReceive";  // that's my site's controller action

NameValueCollection inputs = new NameValueCollection();
inputs.Add("SessionId", "11111");
System.Net.WebClient Client = new WebClient();
byte[] result = Client.UploadValues(url, inputs);

How do I receive that POST on my site? I have tried:

public ActionResult TestReceive(FormCollection fc) {} // doesn't get hit

public ActionResult TestReceive(string SessionId) {} // method gets hit but session id is null

public ActionResult TestReceive() 
{
    var param = ControllerContext.RouteData.Values["parameter"].ToString(); // Values["parameter"] is null
} 

I do not control the other site and it must be a POST (not a webservice or anything else)

As another twist they will POST around 10 variables, but some are optional, so they may not be in the POST data.

  • 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-15T18:14:12+00:00Added an answer on May 15, 2026 at 6:14 pm
    [HttpPost]
    public ActionResult TestReceive(string sessionId) 
    {
        ...
    }
    

    Also as there’s no controller specified in the url you should make sure that the controller that contains this action is the default controller in the routes.

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

Sidebar

Related Questions

I'm wondering what is the best practice for moving a website to another server
I'm making a website and I have this HTML for a bar chart: <div
I'm having the strangest issue... I have a monorail website (a .NET solution, similar
Another easy one hopefully. Let's say I have a collection like this: List<DateTime> allDates;
Another poster asked about preferred syntax for infinite loops . A follow-up question: Why
Another question asked about determining odd/evenness in C, and the idiomatic (x & 1)
another request sorry.. Right now I am reading the tokens in one by one
another issue in IE 6... link The navbar link list has a border applied
Another basic Rails question: I have a database table that needs to contain references
In another question I posted yesterday, I got very good advice on how a

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.