We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SystemClipboard - Failed to load resource: the server responded with a status of 500

Hello Team,


I am trying to copy/paste from the system clipboard but I keep getting server status 500. Copy/paste within the document works fine but when I copy a text from outside documenteditor it comes with this error.


Could you please assist in resolving this issue?


public class CustomParam
        {
            public string content { get; set; }
            public string type { get; set; }
        }


        [AcceptVerbs("Post")]
        [HttpPost]
        [EnableCors("AllowAllOrigins")]
        [Route("SystemClipboard")]
        public string SystemClipboard([FromBody] CustomParam param)
        {
            if (param.content != null && param.content != "")
            {
                try
                {
                    WordDocument document = WordDocument.LoadString(param.content, GetFormatType(param.type.ToLower()));
                    string json = Newtonsoft.Json.JsonConvert.SerializeObject(document);
                    document.Dispose();
                    return json;
                }
                catch (Exception)
                {
                    return "";
                }
            }
            return "";
        }



5 Replies

SM Suriya Murugan Syncfusion Team November 2, 2022 10:38 PM

Hi William,


We suspect a problem with copied content.Could you please share the content you tried to paste in the document editor?

Thereby, we will analyze further and provide you the solution at the earliest.


Regards,

Suriya M.



WL william lee November 4, 2022 02:39 PM

Hi Suriya,


I am able to copy/paste the contents in sticky notes but I am NOT able to copy/paste contents from any other sources





SM Suriya Murugan Syncfusion Team November 6, 2022 10:47 PM

Can you please share sample source content? that will be helpful for us to proceed further.



WL william lee November 7, 2022 06:44 PM

So far what I have tested that worked with system clipboard were contents from StickyNotes and contents inside searchbar and addressbar. If i try to copy/paste from googledoc or just any text from other sites, they do not work.



RS Rajapandiyan Settu Syncfusion Team November 18, 2022 01:01 AM

We have tried to replicate the reported issue. We couldn't reproduce it on our end. We have attached a video of the steps that we have followed.

As we mentioned earlier, could you please share some sample source content? It will be helpful to validate this further.


Attachment: New_folder_(9)_68c1d62c.zip

Loader.
Live Chat Icon For mobile
Up arrow icon