|
![]() |
|
| Author |
|
|||||||
|
mooby
Posts: 3656
Location: UK
|
hello. im trying to post a form to an php / apache site from a dot net project. the site is sercured by a username / password. everytime i try to post i get a permission error. ive done this before to an IIS server without an IIS server no worries.
anyone tried this before? |
|||||||
| #0 06:06am 26/10/07 |
|
|||||||
|
system
|
--
|
|||||||
| #0 |
|
|||||||
|
Jim
Posts: 6689
Location: Brisbane, Queensland
|
are you passing the username/password in the post target?
at a guess this doesn't have anything to do with .net or php unless it's php that's printing out the http auth headers |
|||||||
| #1 07:28am 26/10/07 |
|
|||||||
|
whoop
Posts: 11885
Location: Brisbane, Queensland
|
ive done this before to an IIS server without an IIS server no worries. This statement makes me http://users.bigpond.net.au/ritsuko/emoticons/psyduck.gif I've been confused by php/apache not working before and it turned out I had a _GET where I should have had a _POST so make sure you're using the correct method of receiving the password/variables. |
|||||||
| #2 06:13pm 26/10/07 |
|
|||||||
|
mooby
Posts: 3658
Location: UK
|
This statement makes me least it works! :P why underscore post? ive tried passing creds with tne net.credentialcache class or as postdata "password=xx" ect no luck. |
|||||||
| #3 07:40pm 26/10/07 |
|
|||||||
|
Jim
Posts: 6699
Location: Brisbane, Queensland
|
_GET is for query string vars, _POST is for formfield vars, _REQUEST will catch either and conflicts will be resolved according to your variables_order setting
mooby this password-protected thing you're posting to - is the password protection provided by http basic auth or not? if it's provided by http basic auth you need to pass the username and password in the url like this: <form ... action="http://user:pass@the.url/whatever"> if it's some custom acl type thing you'll need to provide more info about the login process on the php end. do you have access to it's code, or are you just trying to figure out how to make your .net app log into a site you don't have any access to other than a valid user/pass? |
|||||||
| #4 09:09pm 26/10/07 |
|
|||||||
|
system
|
--
|
|||||||
| #4 |
|
|||||||
|
| ||||||||