Click here to Skip to main content
15,890,982 members
Home / Discussions / C#
   

C#

 
GeneralRe: Passing the values among Forms Pin
LongRange.Shooter6-Jul-05 9:47
LongRange.Shooter6-Jul-05 9:47 
GeneralRead data from CryptoStream Pin
kani985-Jul-05 7:37
kani985-Jul-05 7:37 
GeneralRe: Read data from CryptoStream Pin
Guffa5-Jul-05 8:42
Guffa5-Jul-05 8:42 
GeneralQuestion regarding the DLL files Pin
amitmohanty5-Jul-05 7:37
amitmohanty5-Jul-05 7:37 
GeneralRe: Question regarding the DLL files Pin
Dave Kreskowiak5-Jul-05 7:44
mveDave Kreskowiak5-Jul-05 7:44 
GeneralRe: Question regarding the DLL files Pin
amitmohanty7-Jul-05 16:03
amitmohanty7-Jul-05 16:03 
GeneralRe: Question regarding the DLL files Pin
Dave Kreskowiak8-Jul-05 1:20
mveDave Kreskowiak8-Jul-05 1:20 
GeneralC# Winform WebClient identification Pin
papouAlain5-Jul-05 7:17
papouAlain5-Jul-05 7:17 
My software (C# Winform) need to connect to a website to download a file.
The file is sought on the website with the login and password, then given to the client to download.
If I try with the browser, the website gimme a page with the password and the login and a "Connect" button.
I would like to emulate that work, without using the browser.
I'v no problem to connect to the Url and to download, but don't know how to send the login and passwor. I've try the code below, but it doesn't work.
<br />
MyLogin = "Me"; <br />
MyPassword = "11111111"; <br />
MyUrl = "http://mySite.com/MyPage.php"; <br />
clsDownLoadFile MyDownload = new clsDownLoadFile(); <br />
clsDownLoadFile.htmlStream MyStream = new clsDownLoadFile.htmlStream(); <br />
MyStream = (MyDownload.FindUrl (MyUrl, MyLogin, MyPassword)); <br />
if (MyStream != null) <br />
{ <br />
if (MyDownload.IsWebConnected()) <br />
{ <br />
string s = "login="+MyLogin+"+passwd="+MyPassword; <br />
WebClient myWebClient = new WebClient(); <br />
Stream postStream = myWebClient.OpenWrite(MyUrl,"POST"); <br />
postStream.Write(postArray,0,postArray.Length); <br />
postStream.Close(); <br />
try <br />
{ <br />
myWebClient.DownloadFile(@"C:\Temp", "MyFile.zip"); <br />
} <br />
} <br />
} <br />

I catch an exception when trying to download. I thought beacuse the Identification on the server doen't accept me.
Could someone help me, I drown...Confused | :confused: Confused | :confused: Confused | :confused:
GeneralRe: C# Winform WebClient identification Pin
papouAlain6-Jul-05 4:12
papouAlain6-Jul-05 4:12 
Generalprogress bar Pin
steve_rm5-Jul-05 6:42
steve_rm5-Jul-05 6:42 
GeneralRe: progress bar Pin
Alex Korchemniy5-Jul-05 7:29
Alex Korchemniy5-Jul-05 7:29 
GeneralRe: progress bar Pin
Dave Kreskowiak5-Jul-05 7:29
mveDave Kreskowiak5-Jul-05 7:29 
GeneralRe: progress bar Pin
Roy Heil5-Jul-05 10:32
professionalRoy Heil5-Jul-05 10:32 
GeneralProcess.Start Pin
StrayGrey5-Jul-05 5:51
StrayGrey5-Jul-05 5:51 
GeneralRe: Process.Start Pin
Dave Kreskowiak5-Jul-05 6:16
mveDave Kreskowiak5-Jul-05 6:16 
Generalone little and stupid question Pin
Umair Ahmad khan5-Jul-05 5:45
Umair Ahmad khan5-Jul-05 5:45 
GeneralRe: one little and stupid question Pin
Dave Kreskowiak5-Jul-05 6:02
mveDave Kreskowiak5-Jul-05 6:02 
GeneralRe: one little and stupid question Pin
Umair Ahmad khan5-Jul-05 7:21
Umair Ahmad khan5-Jul-05 7:21 
GeneralRe: one little and stupid question Pin
Dave Kreskowiak5-Jul-05 7:30
mveDave Kreskowiak5-Jul-05 7:30 
GeneralRe: one little and stupid question Pin
Judah Gabriel Himango5-Jul-05 8:12
sponsorJudah Gabriel Himango5-Jul-05 8:12 
QuestionHow can i access (parallel or serial ports) in C# Pin
arsaldear5-Jul-05 4:47
arsaldear5-Jul-05 4:47 
AnswerRe: How can i access (parallel or serial ports) in C# Pin
Judah Gabriel Himango5-Jul-05 4:52
sponsorJudah Gabriel Himango5-Jul-05 4:52 
QuestionValidation ...How to do? Pin
just4ulove75-Jul-05 3:00
just4ulove75-Jul-05 3:00 
Generalproperty creation Pin
deep75-Jul-05 1:56
deep75-Jul-05 1:56 
GeneralRe: property creation Pin
MoustafaS5-Jul-05 2:39
MoustafaS5-Jul-05 2:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.