We are trying to upload the file of size 27 MB to CRM 2015 from web portal. But we are getting the below error message. But the same file can be uploaded from CRM. Also we are able to upload the file of size 15 MB from portal.
"There was no endpoint listening at http://MyServer/MyOrg/XRMServices/2011/Organization.svc
that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."
After enabling the CRM trace, below is the error message I captured.
"[2017-01-05 18:56:15.309] Process:Microsoft.Crm.Sandbox.WorkerProcess |Organization:00000000-0000-0000-0000-000000000000 |Thread: 1 |Category: Sandbox |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 00000000-0000-0000-0000-000000000000 | SandboxWorkerMain.Main ilOffset = 0x23E
>Changed MinIOThreads for worker from 1 to 101and MinWorkerThreads from 1 to 101"
Appreciate if you have any solution for this issue.
[Edited] Below is the piece of code to create a note with attachment from portal.
public IOrganizationService ServiceProxy { get { return _ServiceProxy; } }
public void Create(Entity newEntity, Guid? impersonateUserId = null, bool detectDuplicates = true)
{
setServiceCredentials(impersonateUserId);
Guid newId = ServiceProxy.Create(newEntity);
newEntity.Id = newId;
}
public Guid CreateNote(Guid objectId, string fileName, byte[] documentData, string mimeType = "application\\ms-word"
, string subject = "", string notetext = "", LookupValue ownerId = null )
{
string encodedData = System.Convert.ToBase64String(documentData);
Entity annotation = new Entity("annotation");
annotation["objectid"] = new EntityReference(GetEntityName(), objectId);
annotation["subject"] = subject;
annotation["notetext"] = notetext;
annotation["documentbody"] = encodedData;
annotation["filename"] = fileName;
annotation["mimetype"] = mimeType;
if(ownerId != null)
annotation["ownerid"] = new EntityReference(ownerId.LogicalName, ownerId.Id);
Context.Create(annotation);
return annotation.Id;
}