Author: santhosh.kumarmn@spi.com | Posted on: 5/28/2009 6:10:21 AM | Views : 1189

Hi,
I am developing a web application which reads the path of the image from the database and copies that image to the local cache for further displaying. The images are usually located in the remote server [not local machine] which has limited access. When i try to  copy the file using the System.IO.File.Copy(origpath, cachedpath, True)
I was getting an expection saying  "Logon failure: unknown user name or bad password."
So I added the impersonate  as below in the web.config file.
<authentication mode="Windows Go to the complete details ...