HTTP POST and GET

  • Thread starter Thread starter Lasse
  • Start date Start date
L

Lasse

I have an MFC application trying to connect to my ASP.NET
application through MFC classes CrfInternetSession and
CHttpFile and functions OpenRequest and EndRequest. I am
using HTTP POST and HTTP GET. After I upgraded to .Net
framework 1.1, this doesn't work anymore. I have searched
for solutions and I have tried to change my
machine.config file back to what was allowed for web
services in previous version of framework:
<add name="HttpPost"/>
<add name="HttpGet"/>
These lines were commented out in version 1.1, but this
didn't help me. And this change would only apply to web
services, I guess, anyhow.

Could someone please help me on this issue.

Kind regards
Lasse
 
Lasse,
I have an MFC application trying to connect to my ASP.NET
application through MFC classes CrfInternetSession and
CHttpFile and functions OpenRequest and EndRequest. I am
using HTTP POST and HTTP GET. After I upgraded to .Net
framework 1.1, this doesn't work anymore.

What error are you getting?
 
Thanks!
Error I get is "500 Internal Server Error."
Very informative!

I tried to uninstall framework 1.1 and reinstall 1.0, then it worked
again. So definetly the upgrade causing it.

Lasse
 
Hi Lasse,
Thanks for showing ineterrest.
Error I get is "500 Internal Server Error."

Indeed it isn't. However, an exception is probably getting thrown... could
you capture the exception information? That should point out a clue....

One question, though: is the GET or the POST that is failing? If is just the
latter, and you're using an aspx page on the server to handle the request,
it might be the script protection built into asp.net 1.1 that's giving you
fits (that can be disable on a per-page basis by setting the page's
ValidateRequest property)
 
Fantastic! You're a star!!

You were right about the GET. Only the POST failed. I never really got
to the GET-s in my MFC code. I put in the validateRequest=false in my
web.config and woooha! it worked. You are definetly today's hero.

Thanks
Lasse
 
Back
Top