I am working with C# and facing a problem at deployment level
In application, if anywhere coming error it getting redirected to login page
and session removing with Session.Abandon
while Again Trying to login Giving error "Internal .Net Framework Data Provider error 12."
I am using business layer and every query is executing from business Layer
Before executing any query i am opening Connection string & then closing Connection
So Why this error is coming ?
if any one knows. plz help me
thanks in advanced..
There are tow ways to stroe the images.
One way,save the image in local hard disk and save the path of the image in database.
else, Save the image in byte array format in database but this makes the database heavy.
Please take a look at following link. This is a small useful blog
which describe that how to insert image in database using c#.
This might be useful for you.
In our site I am trying to integrate the CITI Bank payment gateway .For canceling a payment we need to send the post request from merchant site to payment gateway site .For this I am using the web request method , I am posting the parameters to the payment gateway server using the web request but not getting the web response , it is giving the error as The remote server returned an error: (500) Internal Server Error . I am not understanding whether the problem is with the web request or I am not sending the request properly to the gateway . Can anyone please let me know is there any other way to post the request from server to server other than web request method .
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";
myWriter = new StreamWriter(objRequest.GetRequestStream());
catch (Exception ex)
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader sr =
result = sr.ReadToEnd();
string responsedetails = result.Split('|');
TrasactionId = responsedetails.ToString();
// Close and clean up the StreamReader
if (result.ToLower().Contains("invalid") || result.ToLower().Contains("inactive"))
return "CreditCardis notvalid";
return TrasactionId ;
Why Do Some People Forget To Mark as Answer .If It Helps.
The aspx Page is dicided in to two[Left pane & Right Pane]
In Left pane the Function[say to calculate 2 nmbrs,CALCULATE Button]
On Clicking the CALCULATE Button the function calls the java script..and the result should be shown in the Right pane,I mean the page has to be refreshed and the rsult should be shown in the same page..