TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
raven_Hark
NA
2
0
Lost credentials when post
Aug 9 2004 5:40 AM
Hi, I'm trying to send a post to a form on a webserver that requires credentials. When I log in it works just fine, but when I try to post data to the webserver the credentials aren't transmitted. my source: CredentialCache myCache = new CredentialCache(); webClient.Headers.Add("Content-Type","application/x-www-form-urlencoded"); myCache.Add(new Uri("http://" + ipAdr.Text ),"Basic",new NetworkCredential("xx","xx")); webClient.Credentials = myCache; webClient.UploadValues("http://" + ipAdr.Text + "/form/newData?protocol=2","POST",isdnOppgrader); Is this the right way to do it? I have also tried myCache.Add(new Uri("http://" + ipAdr.Text + "/form/newData?protocol=2"),"Basic",new NetworkCredential("xx","xx")); and myCache.Add(new Uri("http://" + ipAdr.Text/
),"Basic",new NetworkCredential("xx","xx")); any suggestions?
Reply
Answers (
1
)
Empty collections
The underlying connection was closed