Inquiridor
Time out Webservice

Pergunta
-
Boa noite senhores,
O problema que estou tendo é o seguinte:
Fiz este procedimento no WS:
[
WebMethod]
public string SaveDocument(Byte[] docbinaryarray, string docname)
try
{
string strdocPath;
FileStream objfilestream = new FileStream(strdocPath, FileMode.Create, FileAccess.ReadWrite);
//
objfilestream.Close();
//
return "OK";
catch (Exception ex)
return ex.ToString().Trim();
}
}
- Fiz este procedimento no cliente que é um windows service:
FileStream
objfilestream = new FileStream(sZIP, FileMode.Open, FileAccess.Read);
int len = (int)objfilestream.Length;
Byte[] mybytearray = new Byte[len];
string sProcesso = Coleda.SaveDocument(mybytearray, gsCaminhoZip); //Chamada do WS
objfilestream.Close();
O arquivo que estou tentando transferir tem 9Mb e o erro que acontece é o seguinte:
"System.Net.WebException: The request was aborted: The operation has timed out.\r\n at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)\r\n at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)\r\n at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)\r\n at WinServColeda.WSColeda.Service.SaveDocument(Byte[] docbinaryarray, String docname)\r\n at WinServColeda.WinServColeda.ReadingFileSafely(String path)"
Já setei o web config com: executionTimeout="900000" mais não resolveu.
Alguém poderia me ajudar, por favor?
Desde já agradeço.objfilestream.Read(mybytearray, 0, len);
{
}
objfilestream.Write(docbinaryarray, 0, docbinaryarray.Length);
strdocPath = docname;
{
- Movido AndreAlvesLimaModerator sexta-feira, 4 de junho de 2010 16:29 (De:.NET Development - Geral)
Todas as Respostas
-
Boa tarde senhores,
O problema que estou tendo é o seguinte:
Fiz este procedimento no WS:
[
WebMethod]
public string SaveDocument(Byte[] docbinaryarray, string docname)
try
{
string strdocPath;
FileStream objfilestream = new FileStream(strdocPath, FileMode.Create, FileAccess.ReadWrite);
//
objfilestream.Close();
//
return "OK";
catch (Exception ex)
return ex.ToString().Trim();
}
}
- Fiz este procedimento no cliente que é um windows service:
FileStream
objfilestream = new FileStream(sZIP, FileMode.Open, FileAccess.Read);
int len = (int)objfilestream.Length;
Byte[] mybytearray = new Byte[len];
string sProcesso = Coleda.SaveDocument(mybytearray, gsCaminhoZip); //Chamada do WS
objfilestream.Close();
O arquivo que estou tentando transferir tem 9Mb e o erro que acontece é o seguinte:
"System.Net.WebException: The request was aborted: The operation has timed out.\r\n at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)\r\n at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)\r\n at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)\r\n at WinServColeda.WSColeda.Service.SaveDocument(Byte[] docbinaryarray, String docname)\r\n at WinServColeda.WinServColeda.ReadingFileSafely(String path)"
Já setei o web config com: executionTimeout="900000" mais não resolveu.
Alguém poderia me ajudar, por favor?
Desde já agradeço.objfilestream.Read(mybytearray, 0, len);
{
}
objfilestream.Write(docbinaryarray, 0, docbinaryarray.Length);
strdocPath = docname;
{
- Mesclado AndreAlvesLimaModerator quarta-feira, 16 de dezembro de 2009 09:02 Post duplicado
-
-
-
Prezado,
Sei que já faz bastante tempo, mas, conseguiu resolver seu problema?
André Alves de Lima
Visite o meu site: http://andrealveslima.spaces.live.com
Me siga no Twitter: @andrealveslima