Click here to Skip to main content
14,869,580 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow to save image in sql server using asp.net with c# Pin
developerit7-Mar-10 20:31
Memberdeveloperit7-Mar-10 20:31 
AnswerRe: how to save image in sql server using asp.net with c# Pin
Vimalsoft(Pty) Ltd7-Mar-10 20:52
professionalVimalsoft(Pty) Ltd7-Mar-10 20:52 
AnswerRe: how to save image in sql server using asp.net with c# Pin
Brij7-Mar-10 20:56
mentorBrij7-Mar-10 20:56 
AnswerRe: how to save image in sql server using asp.net with c# Pin
sashidhar7-Mar-10 23:10
Membersashidhar7-Mar-10 23:10 
GeneralRe: how to save image in sql server using asp.net with c# Pin
developerit8-Mar-10 18:29
Memberdeveloperit8-Mar-10 18:29 
AnswerRe: how to save image in sql server using asp.net with c# Pin
awadhendra tiwari23-May-11 7:02
Memberawadhendra tiwari23-May-11 7:02 
QuestionHow to send a post request from one server to another Pin
vnr7-Mar-10 19:49
Membervnr7-Mar-10 19:49 
AnswerRe: How to send a post request from one server to another Pin
sashidhar7-Mar-10 23:32
Membersashidhar7-Mar-10 23:32 
vnr wrote:
The remote server returned an error: (500) Internal Server Error

If you are sending web request as per their code functionality then its not your error.Sometimes if you are not sending all the parameters which the gateway needs then this error may occur..!
Sometimes the http request waits for particular time to get the response from the server and if it did not get any response this error may occur..!

Here is the sample method for authorize .net for gateway hope it helps..!
private string CreditCardCheck()
{


    String strPost = "x_login=" + loginID + "&x_tran_key=" + trans_Key ;
    StreamWriter myWriter = null;
    string url ="https://secure.authorize.net/gateway/transact.dll";
    HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
    objRequest.Method = "POST";
    objRequest.ContentLength = strPost.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    try
    {
        myWriter = new StreamWriter(objRequest.GetRequestStream());
        myWriter.Write(strPost);
    }
    catch (Exception ex)
    {
        logger.Error(ex.Message);
    }
    finally
    {
        myWriter.Close();
    }

    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    using (StreamReader sr =
       new StreamReader(objResponse.GetResponseStream()))
    {
        result = sr.ReadToEnd();

        string[] responsedetails = result.Split('|');
        TrasactionId = responsedetails[6].ToString();
       // Close and clean up the StreamReader
        sr.Close();
    }
    if (result.ToLower().Contains("invalid") || result.ToLower().Contains("inactive"))
    {

        return "CreditCardis notvalid";

    }
    return TrasactionId ;
}

LatestArticle :Log4Net

Why Do Some People Forget To Mark as Answer .If It Helps.

QuestionASP.NET Page refresh and result Pin
AnthonyMG7-Mar-10 19:23
MemberAnthonyMG7-Mar-10 19:23 
AnswerRe: ASP.NET Page refresh and result Pin
Vimalsoft(Pty) Ltd7-Mar-10 20:38
professionalVimalsoft(Pty) Ltd7-Mar-10 20:38 
GeneralRe: ASP.NET Page refresh and result Pin
sowjanya37-Mar-10 23:41
Membersowjanya37-Mar-10 23:41 
AnswerRe: ASP.NET Page refresh and result Pin
Brij7-Mar-10 20:50
mentorBrij7-Mar-10 20:50 
GeneralRe: ASP.NET Page refresh and result Pin
sowjanya37-Mar-10 23:30
Membersowjanya37-Mar-10 23:30 
GeneralRe: ASP.NET Page refresh and result Pin
sowjanya37-Mar-10 23:31
Membersowjanya37-Mar-10 23:31 
GeneralRe: ASP.NET Page refresh and result Pin
Brij7-Mar-10 23:38
mentorBrij7-Mar-10 23:38 
GeneralRe: ASP.NET Page refresh and result Pin
sowjanya37-Mar-10 23:51
Membersowjanya37-Mar-10 23:51 
GeneralRe: ASP.NET Page refresh and result Pin
Brij7-Mar-10 23:59
mentorBrij7-Mar-10 23:59 
AnswerRe: ASP.NET Page refresh and result Pin
Abhijit Jana8-Mar-10 0:26
professionalAbhijit Jana8-Mar-10 0:26 
Questionhw to get data in a same page without redirecting Pin
sowjanya37-Mar-10 5:45
Membersowjanya37-Mar-10 5:45 
AnswerRe: hw to get data in a same page without redirecting Pin
Brij7-Mar-10 7:54
mentorBrij7-Mar-10 7:54 
GeneralRe: hw to get data in a same page without redirecting Pin
sowjanya37-Mar-10 23:25
Membersowjanya37-Mar-10 23:25 
GeneralRe: hw to get data in a same page without redirecting Pin
Brij7-Mar-10 23:43
mentorBrij7-Mar-10 23:43 
GeneralRe: hw to get data in a same page without redirecting Pin
sowjanya37-Mar-10 23:45
Membersowjanya37-Mar-10 23:45 
GeneralRe: hw to get data in a same page without redirecting Pin
Brij7-Mar-10 23:57
mentorBrij7-Mar-10 23:57 
AnswerRe: hw to get data in a same page without redirecting Pin
Abhijit Jana7-Mar-10 8:25
professionalAbhijit Jana7-Mar-10 8:25 

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.