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 195635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:41:56+00:00 2026-05-11T16:41:56+00:00

After wasting two days with this question (and trying to make it work), I’ve

  • 0

After wasting two days with this question (and trying to make it work), I’ve decided to take a step back and ask a more basic question, because apparently there’s something I don’t know or I’m doing wrong.

The requirements are simple, I need to make an HTTP post (passing a few values) over https from C#.

The website (if given the appropriate values) will return some simple html and a response code. (i’ll show these later).

It’s really that simple. The “webservice” works. I have a php sample that works and successfully connects to it. I also have a Dephi “demo” application (with source code) that also works. And finally I have the demo application (binary) from the company that has the “service”, that also works of course.

But I need to do it through C#. That that sounds so simple, it is not working.

For testing purposes I’ve created a simple console app and a simple connect method. I’ve tried like 7 different ways to create an HTTP request, all more or less the same thing, different implementation (Using WebClient, using HttpWebRequest, etc).

Every method works, except when the URI begins with ‘https’.

I get a webexception saying that the remote server returned 404. I’ve installed Fiddler (as suggested by a SO user), and investigated a little bit the traffic. The 404 is because I am passing something wrong, because as I mentioned later, the ‘service’ works. I’ll talk about the fiddler results later.

The URL where I have to POST the data is: https://servicios.mensario.com/enviomasivo/apip/

And this is the POST data: (the values are fakes)

usuario=SomeUser&clave=SomePassword&nserie=01234567890123456789&version=01010000&operacion=220

The server might return a two/three lines response (sorry about the spanish, but the company is from Spain). Here’s a sample of a possible response:

HTTP/1.1 200 OK
Content-Type: text/plain

01010000 100 BIEN
998

And here’s another

HTTP/1.1 200 OK
Content-Type: text/plain

01010000 20 AUTENTIFICACION NEGATIVA
Ha habido un problema en la identificación ante el servidor. Corrija sus datos de autentificacion.

The 1st one means OK, and the 2nd one is Auth Failure.

As you can see the task is quite easy, only it doesn’t work. If I use fiddler, I see that there’s some sort of SSL stuff going on in the connection and then everything works fine. However, as far as I’ve read, .NET handles all that stuff for us (yes, i’ve added the callback to always validate invalid certs). I don’t understand what I’m doing wrong. I can post/email the code, but what I’d like to know is very simple:

How can you make a POST over SSL using C# and a “simple” HttpWebRequest and later have the response in a string/array/Whatever for processing?

Trust me when I say I’ve been googling and Stackoverflowing for two days. I don’t have any sort of proxy. The connection passes through my router. Standard ports. Nothing fancy. My Machine is inside a VMWare virtual machine and is Windows Vista, but given that the sample applications (php, delphi, binary) all work without an issue, I cannot see that as a problem).

The different samples (sans the binary) are available here if anyone wants to take a look at them.

I’d appreciate any help. If anyone wants to try with a “real” username, I have a demo user and I could pass you the user/pass for testing purposes. I only have one demo user (the one they gave me) and that’s why I’m not pasting it here. I don’t want to flood the user with tests 😉

I’ve tried (within the samples) using UTF8 and ASCII, but that didn’t change anything.

I am 100% positive that there’s something I have to do with SSL and I am not doing it because I don’t know about it.

Thanks in advance.

Martín.

  • 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-11T16:41:57+00:00Added an answer on May 11, 2026 at 4:41 pm

    see my answer to your other question. I believe your problem may not be your C# code. The web service URL accually returns a 404 with several other tools I used, but it returns the response you indicated if you leave off the trailing slash from the web service URL, so I suggest trying that.

    Oddly, it doesn’t seem to matter if the trailing URL is there when not doing SSL. Something strange with that web server, I guess.

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

Sidebar

Ask A Question

Stats

  • Questions 112k
  • Answers 112k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I have implemented with success the prototype to work-around this… May 11, 2026 at 9:55 pm
  • Editorial Team
    Editorial Team added an answer here is a clue that helped me solve the question.… May 11, 2026 at 9:55 pm
  • Editorial Team
    Editorial Team added an answer In my personal opinion in your described situation is a… May 11, 2026 at 9:55 pm

Related Questions

I have set up transactional replication between two SQL Servers on different ends of
In the Apple documentation for NSRunLoop there is sample code demonstrating suspending execution while
I'm just wondering what others do in this respect: Do you try to keep
The Code Snippet is as follwos namespace RecruiterWebService { /// <summary> /// Summary description
In C#, if you have multiple constructors, you can do something like this: public

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.