Ask a Question related to ASP.NET General, Design and Development.
-
Jeff Washburn #1
HttpWebRequest is not posting
Hi All,
I have an HttpWebRequest object that is supposed to post data to a web
page. The server is receiving the data, and I am getting an OK
response. However, the data is not ending up on the server. I put a
test on the server, and it shows that a hit is being made, but that is
all.
Here is the code I am using:
Dim content as string =
"txtName=Fred&txtNumber=123&txtData=ABC123"
Dim wr As HttpWebRequest = WebRequest.Create(url)
Dim s As Stream
wr.Method = "POST"
wr.ContentType = "application/x-www-form-urlencoded"
wr.ContentLength = content.Length
s = wr.GetRequestStream
Dim sw As New StreamWriter(s, Encoding.ASCII)
sw.Write(content)
sw.Close()
sw = Nothing
Dim wRes As HttpWebResponse = CType(wr.GetResponse,
HttpWebResponse)
wr.Abort()
wr = Nothing
s = Nothing
wRes.Close()
wRes = Nothing
Does anyone have any ideas why the data is not ending up on the
server? I have triple checked the spelling of the control names.
Thanks!!
Jeff
Jeff Washburn Guest
-
HttpWebRequest and HttpWebResponse
Hi all: My old application used to POST xml to a remote server using HttpWebRequest from within an aspx page. The process worked like a charm... -
HttpWebRequest and 401
Hello All Here is what I am attempting to do: I have a NTLM protected site. There are some users who are not part of the domain (visitors) get... -
HTTPWebRequest
Well, here's the scenario: In your base app, the user's credentials are verified. If the rest of those apps "hang under" the base app, then you... -
How to authenticate HttpWebRequest?
Hi, i have a protected part of application ("security" subdirectory is protected by authentication mode="Forms"). i'd like to give a user a... -
HttpWebRequest and posting login data
Dear ASP.NET Programmers, How can I post data to an ASP.NET login page and pass authentication? The login page uses forms authentication, users...



Reply With Quote

