You must Sign In to post a response.
Category: Sharepoint
#766849
There are different things you need to set up to make a large data /file stream fetch from database to webservice
1. Increase the ASP.NET limits on the maximum size of SOAP messages and the maximum number of seconds that a request
2. Increase the WSE limit on the maximum size of SOAP messages
you can keep return type as 'byte[] ' from webmethod
see below snippet
Thanks
Koolprasd2003
Editor, DotNetSpider MVM
Microsoft MVP 2014 [ASP.NET/IIS]
1. Increase the ASP.NET limits on the maximum size of SOAP messages and the maximum number of seconds that a request
2. Increase the WSE limit on the maximum size of SOAP messages
you can keep return type as 'byte[] ' from webmethod
see below snippet
[WebMethod]
public byte[] GetFile(string fileName)
{
byte[] response;
String filePath = AppDomain.CurrentDomain.BaseDirectory + @"App_Data\" + fileName;
response = File.ReadAllBytes(filePath);
return response;
}
Thanks
Koolprasd2003
Editor, DotNetSpider MVM
Microsoft MVP 2014 [ASP.NET/IIS]
Return to Return to Discussion Forum