Discussion:
File Download Failure
(too old to reply)
Catty
2009-01-26 15:17:15 UTC
Permalink
i used this code example to download notes attachment files, but when i
checked the file downloaded i found that it contains this error "File
Download Failure" and when trying to use this url
http://mycrm/Activities/Attachment/download.aspx?AttachmentType=" +
objecttypecode + "&AttachmentId=" + attachid
on the internet explorer it asks for my username and password and after that
it gives the same error.
can any one help regarding this issue, I have crm 3.0 with update rollup 3
installed.

string url =
"http://mycrm/Activities/Attachment/download.aspx?AttachmentType=" +
objecttypecode + "&AttachmentId=" + attachid;
System.Net.WebClient myWebClient = new System.Net.WebClient();
myWebClient.Credentials = System.Net.CredentialCache.DefaultCredentials;
myWebClient.DownloadFile(url,"C:\\myfile.txt");
Adi Reuven
2010-11-04 08:00:02 UTC
Permalink
try using 5 (annotation) as the ObjectTypeCode
Post by Catty
i used this code example to download notes attachment files, but when i
checked the file downloaded i found that it contains this error "File
Download Failure" and when trying to use this url
http://mycrm/Activities/Attachment/download.aspx?AttachmentType=" +
objecttypecode + "&AttachmentId=" + attachid
on the internet explorer it asks for my username and password and after that
it gives the same error.
can any one help regarding this issue, I have crm 3.0 with update rollup 3
installed.
string url =
"http://mycrm/Activities/Attachment/download.aspx?AttachmentType=" +
objecttypecode + "&AttachmentId=" + attachid;
System.Net.WebClient myWebClient = new System.Net.WebClient();
myWebClient.Credentials = System.Net.CredentialCache.DefaultCredentials;
myWebClient.DownloadFile(url,"C:\\myfile.txt");
Submitted via EggHeadCafe - Software Developer Portal of Choice
Flat file Database with LINQ and ASP.NET jQuery Page Methods
http://www.eggheadcafe.com/tutorials/aspnet/c8c43191-c3a3-4c61-801a-2433a701f4f6/flat-file-database-with-linq-and-aspnet-jquery-page-methods.aspx
Loading...