WebRequest文件名 [英] WebRequest Filename

查看:93
本文介绍了WebRequest文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个下载程序,它将绕过

WebBrowser控件中的saveas框。我有文件下载,但我不知道

文件名是通过流传递的。他们是否可以确定文件名是什么,以便我可以执行扩展的相应

功能。流是动态创建的,所以我不能直接从URL中捕获文件名。

谢谢

STeve


-

通过NewsDemon.com发布 - 高级未经审查的新闻组服务

------->>>>>> ; http://www.NewsDemon.com<<<<<< ------

无限制访问,匿名帐户,未经审查的宽带访问

I am trying to create a downloader which will bypass the saveas box in the
WebBrowser control. I have the file downloading, but I don''t know what the
filename is that is being passed through the stream. Is their a way to
determine what the file name is so that I can execute the appropriate
functionality of the extensions. The stream is created dynamically so I
cannot capture the filename straight from the URL.
Thanks
STeve

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access

推荐答案

史蒂夫,


你能解释一下这个,因为这听起来像是简单的黑客攻击。


Cor


" Steve" < sm *** @ Spam.Be.Gone.Hotmail.comschreef在bericht

新闻:44 ********************* **@news.newsdemon.com。 ..
Steve,

Can you explain this more, because this sounds like plain hacking.

Cor

"Steve" <sm***@Spam.Be.Gone.Hotmail.comschreef in bericht
news:44***********************@news.newsdemon.com. ..

>我正在尝试创建一个下载器,它将绕过
WebBrowser控件中的saveas框。我有文件下载,但我不知道通过流传递的文件名是什么。他们是一种确定文件名是什么的方法,以便我可以执行扩展的相应功能。流是动态创建的,所以我无法直接从URL中捕获文件名。


谢谢

STeve


-

通过NewsDemon.com发布 - 高级未经审查的新闻组服务

------->>>>>> ; http://www.NewsDemon.com<<<<<< ------

无限制访问,匿名帐户,未经审查的宽带接入
>I am trying to create a downloader which will bypass the saveas box in the
WebBrowser control. I have the file downloading, but I don''t know what the
filename is that is being passed through the stream. Is their a way to
determine what the file name is so that I can execute the appropriate
functionality of the extensions. The stream is created dynamically so I
cannot capture the filename straight from the URL.
Thanks
STeve
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access



这样写了Steve,
Thus wrote Steve,

我正在尝试创建一个绕过saveas框的下载程序在

WebBrowser控件中。我有文件下载,但我不知道

文件名是通过流传递的。

是一种确定文件名是什么的方法,这样我就可以执行扩展的相应功能

。该流是动态创建的
,因此我无法直接从

URL中捕获文件名。
I am trying to create a downloader which will bypass the saveas box in
the WebBrowser control. I have the file downloading, but I don''t know
what the filename is that is being passed through the stream. Is
their a way to determine what the file name is so that I can execute
the appropriate functionality of the extensions. The stream is
created dynamically so I cannot capture the filename straight from the
URL.



我真的不明白你想要实现的目标。


要么你知道文件名已经,因为它是URL的一部分,如
http:/ /host/path/to/file.foo --file.foo是您的文件名。实际上,

的真实文件名在服务器端可能完全不同,但是你会发现,b $ b永远都找不到,这取决于服务器端实际发生的情况。


或者您正在访问路径中没有任何文件组件的资源,例如
http:// host / path / to - 如果服务器在内部重定向该请求,那么你也不知道
上的文件名是什么服务器端是。如果服务器

从外部重定向你,前一种情况适用。


干杯,

-

Joerg Jooss
ne********@joergjooss.de

I don''t really understand what you''re trying to achieve.

Either you know the file name already, because it''s part of the URL, like
http://host/path/to/file.foo --file.foo is your file name. Actually, the
real file name might be completely different on the server side, but you''ll
never find out, depending on what actually happens on the server side.

Or you''re accessing a resource without any file component in the path, like
http://host/path/to -- if the server redirects that request internally, you
also never know what the file name on the server side was. If the server
redirects you externally, the former case applies.

Cheers,
--
Joerg Jooss
ne********@joergjooss.de


网站运行的JSP确定要发送的文件。为了使用WebBrowser下载文件

,我们已经找到了JSP

的链接并取消了navagating(想想了
$的导航事件) b $ b webBrowser)。然后,我们使用客户端应用程序下载该文件。

的问题是我不知道文件名,因为它是通过流发送的

没有附加文件名(或者至少我不知道如何确定

文件名)。如果您在IE或Firefox中正常执行链接,将弹出带有文件名的saveas

对话框。我想知道如何使用WebRequest等确定

文件名,以便我知道正在发送什么文件

以及如何执行该文件。即。 Zip,xml,doc等


我看过的大多数样本都有链接到URL的文件名,他们只需要解析文件名。
只需解析文件名。我的URL是一个简单的JSP,因此我不能用b $ b告诉文件名是什么。


Steve

" Cor Ligthert [MVP]" < no ************ @ planet.nlwrote in message

news:uI ************** @ TK2MSFTNGP03.phx .gbl ...
The website is runing a JSP which determines which file to send. In order
to download a file using the WebBrowser, we have caught the link to the JSP
and cancelled the navagating (thought the Navagating event of the
webBrowser). We then download the file using the client application. The
problem is that I do not know the filename as it is sent down via a stream
without the filename attached (or at least I don''t know how to determine the
filename). If you executed the link in IE or Firefox normally, the saveas
dialog will popup with the filename. I want to know how I can determine the
filename using the WebRequest etc. so that I know what file is being sent
and how to execute the file. ie. Zip, xml, doc, etc.

Most samples I have looked at have the filename linked to the URL and they
just parse out the filename. My URL is a simple JSP and therefore I can''t
tell what the filename is.

Steve
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:uI**************@TK2MSFTNGP03.phx.gbl...

史蒂夫,


你能解释一下这个,因为这听起来像是简单的黑客攻击。 />

Cor


" Steve" < sm *** @ Spam.Be.Gone.Hotmail.comschreef在bericht

新闻:44 ********************* **@news.newsdemon.com。 ..
Steve,

Can you explain this more, because this sounds like plain hacking.

Cor

"Steve" <sm***@Spam.Be.Gone.Hotmail.comschreef in bericht
news:44***********************@news.newsdemon.com. ..

>>我正在尝试创建一个下载程序,它将绕过
WebBrowser控件中的saveas框。我有文件下载,但我不知道
文件名是通过流传递的。他们是一种确定文件名是什么的方式,以便我可以执行扩展的相应功能。流是动态创建的,所以我无法直接从URL中捕获文件名。

谢谢
STeve

-
发表于NewsDemon.com - 高级未经审查的新闻组服务
------->>>>>> http://www.NewsDemon.com<<<<<< ; ------
无限制访问,匿名帐户,未经审查的宽带接入
>>I am trying to create a downloader which will bypass the saveas box in the
WebBrowser control. I have the file downloading, but I don''t know what
the filename is that is being passed through the stream. Is their a way
to determine what the file name is so that I can execute the appropriate
functionality of the extensions. The stream is created dynamically so I
cannot capture the filename straight from the URL.
Thanks
STeve
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access





-

通过NewsDemon.com发布 - 高级未经审查的新闻组服务

------->>>>>> http://www.NewsDem


这篇关于WebRequest文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆