Webrequest - Remote Sharepoint credentials
I've got some problems to authenticate on a remote sharepoint server. Im using the FPRPC to manipulte the document library of a sharepoint site. This works fine if theirs no authentication needed. (anonymous/basic authentication, whatever)
Now if you need to login this is where the troubles starts:
If you access the sharepoint site with IE you get a popup to insert your username / password. This works fine if you're doing it manualy.
Now if I try to access the sharepoint site through an httpwebrequest, I get an Webexception with a 401 message. (Means not authenticated). I tried to set the credentials with a custom made credential but the exception keeps occuring.
The sharepoint site is located on a remote location. Does anyone know how to access the sharepoint site through an httpwebrequest?
Thx in advance :)