由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - how to download a https file
相关主题
vb.net如何显示缩小后窗口消失的程序(已解决)一个问题
两本中国人写的关于TEST AUTOMATION的书anyone tried vs2010 beta2?
高手帮忙看看.net下面编译常规c++程序的问题VS2010 Add reference Dialog, not good
.net 2003竟然不支持类中静态变量How to stop windows service in OnStart()
[转载] .Net Question求救一个小问题
which one is the WizardBar?Jquery dialog问题请教
include file, winioctl.h 一问。求建议:用什么软件开发好?
[合集] 问一个Response.WriteFile的问题VS里有没有overview ruler的功能
相关话题的讨论汇总
话题: https话题: download话题: file话题: c#话题: url
进入DotNet版参与讨论
1 (共1页)
c********e
发帖数: 28
1
I got a url of a file which is https. I want to write an application in C#
to download this file. I know how to do if it is http. But i cannot do it
with this https url because of 401 error. The thing is if I log in the
website, and paste the url then i can download it. My question is how can I
do it in a C# application?
Any help is highly appreciated!
c**t
发帖数: 2744
2
Check ip*works SSL. Or use curl..
c********e
发帖数: 28
3
谢谢.下了curl, 不好意思,新手一个,没弄懂怎么在我的C# application里用.
不过现在用了个mshtml的东西,就是弄了个web browser automation,自动登陆到网站,
然后再run一个个https.
可是现在的问题是,browser跳出来的SAVE AS DIALOG ,怎么样automate?
有人说用Win32 API’s FindWindow() and SendMessage() and WM_SETTEXT to
programmatically assign a new file name.
.net本身有没有更好的办法呢?

【在 c**t 的大作中提到】
: Check ip*works SSL. Or use curl..
a9
发帖数: 21638
4
建一个类
public class CertificatePolicy:System.Net.ICertificatePolicy
{
public CertificatePolicy()
{
//
// TODO: Add constructor logic here
//
}
#region ICertificatePolicy Members
public bool CheckValidationResult(System.Net.ServicePoint
srvPoint, System
.Security.Cryptography.X509Certificates.X509Certificate certificate, System.
Net.WebReque

【在 c********e 的大作中提到】
: 谢谢.下了curl, 不好意思,新手一个,没弄懂怎么在我的C# application里用.
: 不过现在用了个mshtml的东西,就是弄了个web browser automation,自动登陆到网站,
: 然后再run一个个https.
: 可是现在的问题是,browser跳出来的SAVE AS DIALOG ,怎么样automate?
: 有人说用Win32 API’s FindWindow() and SendMessage() and WM_SETTEXT to
: programmatically assign a new file name.
: .net本身有没有更好的办法呢?

j********g
发帖数: 88
5
那个save as要访问本地文件系统的,不让automate
你可以用htmldocument的IPersistSteamInit接口访问html内容
1 (共1页)
进入DotNet版参与讨论
相关主题
VS里有没有overview ruler的功能[转载] .Net Question
Who can tell me why i cannot connect to the SQL db file ?which one is the WizardBar?
如何在.Net下调用C++的apiinclude file, winioctl.h 一问。
HTTP GET over SSL in C#[合集] 问一个Response.WriteFile的问题
vb.net如何显示缩小后窗口消失的程序(已解决)一个问题
两本中国人写的关于TEST AUTOMATION的书anyone tried vs2010 beta2?
高手帮忙看看.net下面编译常规c++程序的问题VS2010 Add reference Dialog, not good
.net 2003竟然不支持类中静态变量How to stop windows service in OnStart()
相关话题的讨论汇总
话题: https话题: download话题: file话题: c#话题: url