Hello Flavio,
FormsAuth and what are you trying to do will not work, because you don't
have an authentication cookie.
you have to enabled PUT on this directory in IIS
enable integrated or basic auth for the directory
exclude the directory from formsauth
create a windows user
configure ACLs for that single user in the Upload directory
WebClient has a Credentials property. Set this to default credentials (if
integrated auth is applicable) otherwise use Basic Authentication by providing
username/password in the Credentials (be aware that these will be transmitted
in clear text - use SSL to avoid this).
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> Hi
> I need to send files to a web site
> but only a special user can send this files..
> i try this but cause i have a formsauthentication don't go !!! please
> any help
>
> Dim w As New System.Net.WebClient
> w.Credentials = New System.Net.NetworkCredential("myusername",
> "mypassword")
>
> w.UploadFile("http://localhost:2386/cdaweb/System/ServerList.aspx?stor
> eserverlist",
> "c:\additions.log")
> thanks in advance
> flavio