473,416 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

help about downloading with session and cookie support at windows application

My Aim is to make a windows application download which support session and
cookies.

There is a web site which gives images as links like this
http://www.comstock1700k.com/downloa...241687&u=esref
When ever I click to save as a target as or download using flash get that
programs could download the file correctly
but when ever I use
WebClient or httprequest it sends me to the login page..
Does somebody have any idea?
or an example ?

Esref DURNA
Nov 17 '05 #1
3 1649
Esref,

Well, you can't just go to that site. When you go with your browser,
you have a cookie that might identify you, or you go to a login page which
gives you a temporary cookie.

Regardless, you have to mimic the request that your browser would make,
would would more than likely mean you would have to send the cookies in the
request.

I would use a sniffer (try TcpTrace) to see what is being sent, and then
mimic that request with the HttpRequest class.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Eþref DURNA" <es*********@mynet.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
My Aim is to make a windows application download which support session and
cookies.

There is a web site which gives images as links like this
http://www.comstock1700k.com/downloa...241687&u=esref
When ever I click to save as a target as or download using flash get that
programs could download the file correctly
but when ever I use
WebClient or httprequest it sends me to the login page..
Does somebody have any idea?
or an example ?

Esref DURNA

Nov 17 '05 #2
No when Ever you copy the url from that web site and
open a new internet explorer and paste it that link works.
So I do not need the login cookie.
I only want to have a downloader which could get the cookies and sessions
which the server sends.
Thanks for your help

Esref DURNA

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:e9**************@TK2MSFTNGP11.phx.gbl...
Esref,

Well, you can't just go to that site. When you go with your browser,
you have a cookie that might identify you, or you go to a login page which
gives you a temporary cookie.

Regardless, you have to mimic the request that your browser would make, would would more than likely mean you would have to send the cookies in the request.

I would use a sniffer (try TcpTrace) to see what is being sent, and then mimic that request with the HttpRequest class.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Eþref DURNA" <es*********@mynet.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
My Aim is to make a windows application download which support session and cookies.

There is a web site which gives images as links like this
http://www.comstock1700k.com/downloa...241687&u=esref When ever I click to save as a target as or download using flash get that programs could download the file correctly
but when ever I use
WebClient or httprequest it sends me to the login page..
Does somebody have any idea?
or an example ?

Esref DURNA


Nov 17 '05 #3
Esref,

If it just works in your browser, then you are sending something that is
indicating that it should work (for example, if I try and go to that site,
it does not work). So you are sending something in your request that the
browser knows about, but your HttpWebRequest does not.

When you use WebClient or HttpWebRequest, they don't know about the
cookies that are stored locally on your machine. If you are accessing a
site, you need to fetch those and place them in your request.

If you "sniff" a request from your browser to the site for that URL, you
will see what I mean in the headers.

There is another tool, Fiddler (from MS) which is specifically for
sniffing HTTP requests. I would recommend using that to sniff your requests
from your browser.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Eþref DURNA" <es*********@mynet.com> wrote in message
news:uf**************@TK2MSFTNGP12.phx.gbl...
No when Ever you copy the url from that web site and
open a new internet explorer and paste it that link works.
So I do not need the login cookie.
I only want to have a downloader which could get the cookies and sessions
which the server sends.
Thanks for your help

Esref DURNA

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in
message news:e9**************@TK2MSFTNGP11.phx.gbl...
Esref,

Well, you can't just go to that site. When you go with your browser,
you have a cookie that might identify you, or you go to a login page
which
gives you a temporary cookie.

Regardless, you have to mimic the request that your browser would

make,
would would more than likely mean you would have to send the cookies in

the
request.

I would use a sniffer (try TcpTrace) to see what is being sent, and

then
mimic that request with the HttpRequest class.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Eþref DURNA" <es*********@mynet.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
> My Aim is to make a windows application download which support session and > cookies.
>
> There is a web site which gives images as links like this
> http://www.comstock1700k.com/downloa...241687&u=esref > When ever I click to save as a target as or download using flash get that > programs could download the file correctly
> but when ever I use
> WebClient or httprequest it sends me to the login page..
> Does somebody have any idea?
> or an example ?
>
> Esref DURNA
>
>



Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
10
by: Brian Conway | last post by:
I have no idea what is going on. I have a Login screen where someone types in their login information and this populates a datagrid based off of the login. Works great in debug and test through...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
7
by: Seth | last post by:
I have noticed that the id of my session object changes when I switch from a non-secure to a secure connection. What I'm trying to do: I have a cookie that is built on the non-secure side of...
14
by: Schoo | last post by:
I have an asp.net app that uses session objects (ag. session("UserID")). The app works fine in development/debug mode. I released it to the test server (Windows 2000 server with other .NET...
8
by: ari | last post by:
hey all, i'm trying to make my app as stateless as possible. is it ok to create a dataset and store in viewstate and whenever the user decides to select a from that dataset, to move from...
5
by: Åženol Akbulak | last post by:
Hello; I use in my web application FormsAuthentication. Also I use Session state (InProc). When a user logged in, I can read Session parameters. (For example Session). Problem is that, when...
9
by: Adrian Parker | last post by:
We have a website that works everywhere but on a few PCs on this one site.. Asp.Net 1.1 Server = Windows 2003 Client = XP In the web.config we use - cookieless="false" in the browser settings...
11
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.