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 am making a website in asp.net. So my question is, which database is
Hey im making a website were you can send other users emails. My problem
I am making a automation website to send multiple files to an another site
I'm integrating my site with another website using their API. From one of the
I need to be able to send a file to another website from server-side
I need to display the wall posts from Facebook page to another website's social
I see another thread somewhat like my question at: ASP.NET GridView Column - formatting
I'm making a website for a friend who gave me a reference to another
What I am making is a weather forecast website, and what I need is
I am making a website where you can like blog posts as well as

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.