Click here to Skip to main content
15,891,372 members
Home / Discussions / C#
   

C#

 
QuestionInstaller components in C# Pin
adi.rusu12-Jan-09 21:59
adi.rusu12-Jan-09 21:59 
AnswerRe: Installer components in C# Pin
rohan_puranik12-Jan-09 23:25
rohan_puranik12-Jan-09 23:25 
GeneralRe: Installer components in C# Pin
adi.rusu13-Jan-09 0:29
adi.rusu13-Jan-09 0:29 
QuestionHow to rotate a form in c#, or maybe just the controlls? Pin
maclinux12-Jan-09 21:09
maclinux12-Jan-09 21:09 
AnswerRe: How to rotate a form in c#, or maybe just the controlls? Pin
benjymous12-Jan-09 21:35
benjymous12-Jan-09 21:35 
AnswerRe: How to rotate a form in c#, or maybe just the controlls? Pin
musefan12-Jan-09 21:58
musefan12-Jan-09 21:58 
QuestionLog Into Website using WebRequest Pin
AksharRoop12-Jan-09 21:07
AksharRoop12-Jan-09 21:07 
AnswerRe: Log Into Website using WebRequest Pin
Ben Fair13-Jan-09 6:52
Ben Fair13-Jan-09 6:52 
The URL will be completely dependant upon how the site works. In the example above you are using 2 QueryString parameters of 'login' and 'password'. So, if the site has been created to expect and to handle those parameters then it should work as is. If not, then this approach won't work at all. Another way of doing it would be to programmatically fill in the HttpRequest's Form elements (usually a username textbox and a password textbox) and hand-craft the Request data to be in a manner that the site expects. Doing something like that takes a very in-depth knowledge of Web technologies, specifically the HttpRequest and HttpResponse objects and the HttpRequest's Form values. You're basically doing programmatically what the browser normally does. I've had to do it this way before and it is not an easy undertaking. In my case, I had to use a free Java product called WebScarab while browsing the site normally (in my browser) to capture the Request/Response traffic. Then, I was able to use that information to construct the Request data in exactly the same manner as my browser, but filling in a different username and password. The HttpRequest only takes the request data in binary, so you'll have to take the Request text that you construct (after filling in the username and password) and convert it to a byte[] and that will be the Request data. You also have to take into consideration that you'll be sending the Request to some sort of Login page and that the site will probably redirect to another page if the login is successful. One other small note, when working with the Request data be sure you add the CookieContainer to the Request before you do anything with the Request stream, as I found out the hard way that adding the CookieContainer after closing the Request stream does not produce any kind of error, but the Cookies are not included in the Request and since ASP.NET mostly uses Cookies for SessionID you'll probably get some very unexpected results.

Keep It Simple Stupid! (KISS)

Questiontransaction history Pin
kralece12-Jan-09 20:51
kralece12-Jan-09 20:51 
AnswerRe: transaction history Pin
Wendelius12-Jan-09 22:59
mentorWendelius12-Jan-09 22:59 
AnswerRe: transaction history Pin
kralece13-Jan-09 0:56
kralece13-Jan-09 0:56 
AnswerRe: transaction history Pin
kralece14-Jan-09 2:32
kralece14-Jan-09 2:32 
QuestionWhere windows make temprary files? Pin
sumit703412-Jan-09 20:26
sumit703412-Jan-09 20:26 
AnswerRe: Where windows make temprary files? Pin
Vikram A Punathambekar12-Jan-09 20:29
Vikram A Punathambekar12-Jan-09 20:29 
GeneralRe: Where windows make temprary files? Pin
sumit703412-Jan-09 21:02
sumit703412-Jan-09 21:02 
QuestionUnable to connect: incorrect log on parameters. Pin
pbm41112-Jan-09 20:23
pbm41112-Jan-09 20:23 
AnswerRe: Unable to connect: incorrect log on parameters. Pin
thatraja10-Dec-11 17:10
professionalthatraja10-Dec-11 17:10 
QuestionTimer Class Pin
satsumatable12-Jan-09 20:06
satsumatable12-Jan-09 20:06 
AnswerRe: Timer Class Pin
Guffa12-Jan-09 20:24
Guffa12-Jan-09 20:24 
GeneralRe: Timer Class Pin
satsumatable12-Jan-09 20:28
satsumatable12-Jan-09 20:28 
GeneralRe: Timer Class Pin
N a v a n e e t h12-Jan-09 20:33
N a v a n e e t h12-Jan-09 20:33 
AnswerRe: Timer Class Pin
J a a n s12-Jan-09 20:32
professionalJ a a n s12-Jan-09 20:32 
AnswerRe: Timer Class Pin
musefan12-Jan-09 22:04
musefan12-Jan-09 22:04 
AnswerRe: Timer Class Pin
DaveyM6912-Jan-09 23:32
professionalDaveyM6912-Jan-09 23:32 
AnswerRe: Timer Class Pin
#realJSOP12-Jan-09 23:47
mve#realJSOP12-Jan-09 23:47 

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.