Click here to Skip to main content
15,900,511 members
Home / Discussions / C#
   

C#

 
GeneralRe: Shell Output Pin
Scott Serl5-Jul-05 11:37
Scott Serl5-Jul-05 11:37 
GeneralRe: Shell Output Pin
Nazadus6-Jul-05 1:51
Nazadus6-Jul-05 1:51 
GeneralDisplaying Write statements in Debuger Output window Pin
zaboboa5-Jul-05 9:24
zaboboa5-Jul-05 9:24 
GeneralRe: Displaying Write statements in Debuger Output window Pin
Colin Angus Mackay5-Jul-05 12:08
Colin Angus Mackay5-Jul-05 12:08 
GeneralChild form, which stays in front Pin
Ronen Kfir5-Jul-05 9:18
Ronen Kfir5-Jul-05 9:18 
GeneralRe: Child form, which stays in front Pin
MoustafaS5-Jul-05 12:43
MoustafaS5-Jul-05 12:43 
GeneralChild form, which stays in front Pin
sea#5-Jul-05 9:17
sea#5-Jul-05 9:17 
GeneralRe: Child form, which stays in front Pin
ZejulioZ5-Jul-05 16:12
ZejulioZ5-Jul-05 16:12 
GeneralPassing the values among Forms Pin
Anonymous5-Jul-05 9:05
Anonymous5-Jul-05 9:05 
GeneralRe: Passing the values among Forms Pin
Judah Gabriel Himango5-Jul-05 9:07
sponsorJudah Gabriel Himango5-Jul-05 9:07 
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 

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.