通过webclient.DownloadAsync方法下载时禁用错误(403)

时间:2014-04-21 14:46:48

标签: vb.net

这段代码工作得非常好,但是几天前,这就是为了下载一个zip文件而返回一个禁止错误(203)。怎么了?

 If CheckValidations() = True Then
            If CheckNet() Then
                Dim strFullFileName As String
                dtBhav = dtBhavcopyDate.Value
                btnNseFuturesDownload.Enabled = False
                btnNseFuturesDownload.Text = "Downloading....."
                AddHandler wcNseFut.DownloadFileCompleted, AddressOf wcNseFut_DownloadFileCompleted
                AddHandler wcNseFut.DownloadProgressChanged, AddressOf wcNseFut_DownloadProgressChanged
                MDIStockMIS.UStatusBar.Panels("Text").Text = ""
                MDIStockMIS.UStatusBar.Panels("Text").Text = "Downloading file ..........."
                ''-------- Download NSE future file
                Dim uriNseFut As New Uri(NseFuturesFTPAddress(dtBhav))

                strFullFileName = ""
                strFullFileName = m_strPathEQ & "\" & BHAVCOPY_NSE_FO_FOLDER & ".zip"
                DeleteFile(strFullFileName, False)

                wcNseFut.DownloadFileAsync(uriNseFut, strFullFileName)
            End If
        Else
            ShowUltraMessage(Nothing, "Please select the path and enter a valid date.", "Error", MessageBoxButtons.OK, _
                          MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, "", "", _
                          "Check conditions", "Stock MIS")
        End If

0 个答案:

没有答案