Click here to Skip to main content
15,903,388 members
Home / Discussions / C#
   

C#

 
GeneralRe: Would like help on technique to debug a dll Pin
OriginalGriff30-Dec-11 8:35
mveOriginalGriff30-Dec-11 8:35 
QuestionXML problem with retrieving value Pin
Cindy MCS29-Dec-11 8:34
Cindy MCS29-Dec-11 8:34 
AnswerRe: XML problem with retrieving value Pin
PIEBALDconsult29-Dec-11 8:58
mvePIEBALDconsult29-Dec-11 8:58 
GeneralRe: XML problem with retrieving value Pin
Cindy MCS29-Dec-11 9:34
Cindy MCS29-Dec-11 9:34 
GeneralRe: XML problem with retrieving value Pin
PIEBALDconsult29-Dec-11 9:56
mvePIEBALDconsult29-Dec-11 9:56 
AnswerRe: XML problem with retrieving value Pin
OriginalGriff29-Dec-11 9:00
mveOriginalGriff29-Dec-11 9:00 
GeneralRe: XML problem with retrieving value Pin
Cindy MCS29-Dec-11 9:29
Cindy MCS29-Dec-11 9:29 
QuestionC# Post to URL (e.g Register) and get new\response page Pin
Member 852236229-Dec-11 4:59
Member 852236229-Dec-11 4:59 
Hey everyone,
I've been writing a script to monitor availability of registering steps (7 steps).
each step requires a POST request.
I want to make sure it passes well.
I am sending a post request but when I check the response page it seems to be the same one and not the next page!
Here is my code: (I changed the URL to eBay registration so it will be easier if someone wants to check), it only needs asks to change the EMAIL/Password/UserID details inside POST request)
static void Main(string[] args)
{
    string url = "https://scgi.ebay.com/ws/eBayISAPI.dll?RegisterEnterInfo";
    string method = "POST";
    string postdata = "firstname=Test&lastname=Tester&address1=teststreet+20&zip=56683&st_ct=Tenstrike%2C+MN&countryid=1&email=secret1234%40walla.co.il&retype_email=secret1234d%40walla.co.il&dayphone1=789&dayphone2=678&dayphone3=6786&userid=secretrotd442017771&pass=Qq123456&rpass=Qq123456&canned=4&myanswer=Paffi&birthdate2=2&birthdate1=17&birthdate3=1976&frmaction=submit&mode=1&country=&MfcISAPICommand=RegisterEnterInfoV4&city=Tenstrike&state=MN&isSug=true";
    string file = sendRequest(url, method, postdata);

    // write a line of text to the file
    TextWriter tw = new StreamWriter("C:\\WebPost_Response.htm");
    tw.WriteLine(file);
    // close the stream
    tw.Close();
}
public static string sendRequest(string url, string method, string postdata)
{
    WebRequest rqst = HttpWebRequest.Create(url);
    rqst.Method = method;
    if (!String.IsNullOrEmpty(postdata))
    {
        rqst.ContentType = "application/xml";
        rqst.ContentType = "application/x-www-form-urlencoded";
        byte[] byteData = UTF8Encoding.UTF8.GetBytes(postdata);

        rqst.ContentLength = byteData.Length;
        using (Stream postStream = rqst.GetRequestStream())
        {
            postStream.Write(byteData, 0, byteData.Length);
            postStream.Close();
        }
        ((HttpWebRequest)rqst).KeepAlive = false;
        StreamReader rsps = new StreamReader(rqst.GetResponse().GetResponseStream());
        string strRsps = rsps.ReadToEnd();
        return strRsps;
    }
    else
    {
        return "Failed";
    }
}


So, If anyone can tell me how I make sure to get the next page I would be very grateful!
Thanks
AnswerRe: C# Post to URL (e.g Register) and get new\response page Pin
Luc Pattyn29-Dec-11 5:36
sitebuilderLuc Pattyn29-Dec-11 5:36 
AnswerRe: C# Post to URL (e.g Register) and get new\response page Pin
Member 852236229-Dec-11 5:49
Member 852236229-Dec-11 5:49 
AnswerRe: C# Post to URL (e.g Register) and get new\response page Pin
Luc Pattyn29-Dec-11 6:18
sitebuilderLuc Pattyn29-Dec-11 6:18 
AnswerRe: C# Post to URL (e.g Register) and get new\response page Pin
BobJanova30-Dec-11 14:35
BobJanova30-Dec-11 14:35 
QuestionCpu Calculations per second Pin
Brandon-X1200028-Dec-11 10:41
Brandon-X1200028-Dec-11 10:41 
GeneralRe: Cpu Calculations per second Pin
harold aptroot28-Dec-11 11:32
harold aptroot28-Dec-11 11:32 
AnswerRe: Cpu Calculations per second Pin
OriginalGriff28-Dec-11 20:49
mveOriginalGriff28-Dec-11 20:49 
GeneralRe: Cpu Calculations per second Pin
Brandon-X1200031-Dec-11 0:45
Brandon-X1200031-Dec-11 0:45 
GeneralRe: Cpu Calculations per second Pin
OriginalGriff31-Dec-11 1:06
mveOriginalGriff31-Dec-11 1:06 
GeneralRe: Cpu Calculations per second Pin
Brandon-X1200031-Dec-11 1:55
Brandon-X1200031-Dec-11 1:55 
GeneralRe: Cpu Calculations per second Pin
OriginalGriff31-Dec-11 2:37
mveOriginalGriff31-Dec-11 2:37 
AnswerRe: Cpu Calculations per second Pin
#realJSOP29-Dec-11 1:45
professional#realJSOP29-Dec-11 1:45 
Questionhi ppl!! Pin
vandhana.venugopalan28-Dec-11 3:42
vandhana.venugopalan28-Dec-11 3:42 
AnswerRe: hi ppl!! Pin
Shameel28-Dec-11 3:52
professionalShameel28-Dec-11 3:52 
AnswerRe: hi ppl!! Pin
#realJSOP28-Dec-11 4:55
professional#realJSOP28-Dec-11 4:55 
AnswerRe: hi ppl!! Pin
Luc Pattyn28-Dec-11 6:04
sitebuilderLuc Pattyn28-Dec-11 6:04 
GeneralRe: hi ppl!! Pin
#realJSOP28-Dec-11 7:54
professional#realJSOP28-Dec-11 7:54 

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.