会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Footprints on the sands of time
这个短语金山词霸上说是:岁月虽逝而足迹犹存,我觉得更像是:足迹虽逝而岁月犹存
博客园
首页
新随笔
联系
管理
订阅
Request sercued web pages (VB.NET)
For reference only
Public
Function DownloadFileSecureURL()
Function
DownloadFileSecureURL(
ByVal
pstrURL
As
String
, _
ByVal
pstrFilename
As
String
, _
ByVal
pstrOutputPath
As
String
, _
ByVal
pstrUID
As
String
, _
ByVal
pstrPWD
As
String
, _
ByRef
pexcError
As
Exception)
As
Boolean
Dim
wcWebClient
As
WebClient
=
New
WebClient()
'
Provide username/password to credentials and assign credentials to our WebClient object
Dim
ncCred
As
NetworkCredential
=
New
NetworkCredential(pstrUID, pstrPWD)
wcWebClient.Credentials
=
ncCred
Try
wcWebClient.DownloadFile(pstrURL
+
pstrFilename, pstrOutputPath
+
pstrFilename)
Return
True
Catch
ex
As
Exception
pexcError
=
ex
DisplayStatus(
"
DownloadFileSecureURL :
"
+
ex.ToString,
1
)
Return
False
End
Try
End Function
posted @
2005-11-10 23:21
dawave
阅读(
274
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告