Failed to allocate a managed memory buffer of 134217728 bytes. The amount of available memory may be low

前端 未结 2 659
-上瘾入骨i
-上瘾入骨i 2020-12-06 23:29

I am trying to save a huge data to database through a WCF service call. I am not able to invoke the service. Its throwing a error.

codeProxy.SaveCodes(reques         


        
2条回答
  •  不知归路
    2020-12-07 00:08

    Use Stream property in message contract of WCF operation to transfer large objects.

    [MessageContract]
    public class DocumentDescription
    {
        [MessageBodyMember(Namespace = "http://example.com/App")]
        public Stream Stream { get; set; }
    }
    

    Configure your binding this way

    
        
    
    

    To upload large data into SQL Server database use approach described in the following article Download and Upload images from SQL Server via ASP.Net MVC

提交回复
热议问题