I want to access data from network machine. For it, I am using WebClient.DownloadData() method which takes parameter as URL of Document and credentials. If I executes code which contains the WebClient.DownloadData() method through IIS server it shows exception as "System.Net.WebException: The remote server returned an error: (504) Gateway Timeout. at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) at System.Net.WebClient.DownloadData(Uri address)".
But if I runs the same code using windows application by passing same parameters then it executes properly. Even If run same code through ISS server on a local machine(if we access data from same machine) then it executes properly.
If anyone have any idea about how to resolve it then please let me know.
Thanks in advance.