Hi folks,
Please help....
Im trying to download a file from webserver to my windows app using webrequest and webresponse classes. Its working fine on local machines and sometimes other machines. I colud not locate where is it going wrong. I made sure that IIS config is identical to my local machine.
FYI..... code snippets...
1. Download.aspx.cs
strGetFileList =
strFolderPath = ConfigurationManager.AppSettings.Get(
'If yes, first it will supply all the files available in the directory
strFileList = GetFileNamesList(strFolderPath)
Response.ClearHeaders()
Response.AddHeader(
strFileName =
oFileStream =
CopyData(oFileStream, Response.OutputStream)
Response.Write(Response.OutputStream)
ExceptionManager.Publish(ex)
Response.OutputStream.Close()
Response.End()
2. Download.vb ( from my Winapp)
strQueryString =
strSourceURL = fstrSourceURL & strQueryString
oRequest.Timeout = 600000
oRequest.Method =
oResponse =
strFileList = oResponse.Headers(
strFileList = strFileList.Substring(0, (strFileList.Length - 1))
arrFileList = strFileList.Split(
oRequest =
strSourceURL = fstrSourceURL & strQueryString &
strFileName = oResponse.Headers(
strDestURL = fstrDestURL & strFileName
oFileInfo =
oFileInfo.Delete()
CopyData(oResponse.GetResponseStream(), oFileStream)
m_strFileName = strFileName
bRetValue =
--------------------------------------------------------------------------------------------------------------
should i need to configure anything, please suggest some way to work it out
Regards,
venkat