WCF Service -The remote server returned an unexpected response: (413) Request Entity Too Large

%3CLINGO-SUB%20id%3D%22lingo-sub-957710%22%20slang%3D%22en-US%22%3EWCF%20Service%20-The%20remote%20server%20returned%20an%20unexpected%20response%3A%20(413)%20Request%20Entity%20Too%20Large%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-957710%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3EDoes%20anyone%20have%20any%20idea%20on%20it%3F%20I%20create%20a%20WCF%20Service%20for%20uploading%20a%20Document%20into%20the%20Document%20Library%20and%20I%20got%20the%20error%20message%3A%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CEM%3ESystem.ServiceModel.ProtocolException%3C%2FEM%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%3CEM%3EHResult%3D0x80131501%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%26nbsp%3B%20Message%3DThe%20remote%20server%20returned%20an%20unexpected%20response%3A%20(413)%20Request%20Entity%20Too%20Large.%3C%2FEM%3E%3CBR%20%2F%3E%26nbsp%3B%20%3CEM%3ESource%3Dmscorlib%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%26nbsp%3B%20StackTrace%3A%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%20at%20System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage%20reqMsg%2C%20IMessage%20retMsg)%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%20at%20System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData%26amp%3B%20msgData%2C%20Int32%20type)%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%20at%20ConsoleApp.TecturaWCFServiceV20.IService.UploadMSGToDocumentLibary(Byte%5B%5D%20oiDocumentContent%2C%20String%20oiDomainName%2C%20String%20oiEmailAddress%2C%20String%20oiFileLeafRef%2C%20Boolean%20mailType)%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%20at%20ConsoleApp.TecturaWCFServiceV20.ServiceClient.UploadMSGToDocumentLibary(Byte%5B%5D%20oiDocumentContent%2C%20String%20oiDomainName%2C%20String%20oiEmailAddress%2C%20String%20oiFileLeafRef%2C%20Boolean%20mailType)%20in%20C%3A%5CUsers%5CAdministrator%5Csource%5Crepos%5CConsoleApp%5CConsoleApp%5CConnected%20Services%5CTecturaWCFServiceV20%5CReference.cs%3Aline%2067%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%20at%20ConsoleApp.Program.%26lt%3B%26gt%3Bc__DisplayClass0_0.%3CMAIN%3Eb__0()%20in%20C%3A%5CUsers%5CAdministrator%5Csource%5Crepos%5CConsoleApp%5CConsoleApp%5CProgram.cs%3Aline%20118%3C%2FMAIN%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%20at%20Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated%20secureCode)%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%3CEM%3EInner%20Exception%201%3A%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EWebException%3A%20The%20remote%20server%20returned%20an%20error%3A%20(413)%20Request%20Entity%20Too%20Large.%3C%2FEM%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eprogram%20structure%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20471px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F151397i688A5A063F70752E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222019-10-28_0-03-30.png%22%20title%3D%222019-10-28_0-03-30.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Eweb.config%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F151398i9C36CBCB1E150F68%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22web.config.png%22%20title%3D%22web.config.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Eapp.config%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F151399i7E3FDF6A0BF924C6%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22app.config.png%22%20title%3D%22app.config.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-957710%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Frequent Contributor

Hi there,

Does anyone have any idea on it? I create a WCF Service for uploading a Document into the Document Library and I got the error message:

System.ServiceModel.ProtocolException

  HResult=0x80131501
  Message=The remote server returned an unexpected response: (413) Request Entity Too Large.
  Source=mscorlib
  StackTrace:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at ConsoleApp.TecturaWCFServiceV20.IService.UploadMSGToDocumentLibary(Byte[] oiDocumentContent, String oiDomainName, String oiEmailAddress, String oiFileLeafRef, Boolean mailType)
   at ConsoleApp.TecturaWCFServiceV20.ServiceClient.UploadMSGToDocumentLibary(Byte[] oiDocumentContent, String oiDomainName, String oiEmailAddress, String oiFileLeafRef, Boolean mailType) in C:\Users\Administrator\source\repos\ConsoleApp\ConsoleApp\Connected Services\TecturaWCFServiceV20\Reference.cs:line 67
   at ConsoleApp.Program.<>c__DisplayClass0_0.<Main>b__0() in C:\Users\Administrator\source\repos\ConsoleApp\ConsoleApp\Program.cs:line 118
   at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
Inner Exception 1:
WebException: The remote server returned an error: (413) Request Entity Too Large.

 

program structure

2019-10-28_0-03-30.png

web.config

web.config.png

app.config

app.config.png

0 Replies