473,574 Members | 3,151 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

having trouble sending a post in asp.net using C#

here is my code that i am using to send the post to
using System.Drawing;
using System.Data;
using System.Data.Sql Client;
using System.Data.Ole Db;
using System;
using System.Web.UI;
using System.Web.UI.W ebControls;
using System.Web.UI.H tmlControls;
using System.Web.Mail ;
using System.Collecti ons;
using System.Componen tModel;
using System.IO;
using System.Net;
using System.Text;
using System.Web;

public class MyCodeBehind : Page{
public TextBox login, partner, type, amount, user1;
public Button send;

public void send_Click(obje ct sender, EventArgs e){
string login_s = login.Text;
string partner_s = partner.Text;
string type_s = type.Text;
string amount_s = amount.Text;
string user1_s = user1.Text;

ASCIIEncoding encoding=new ASCIIEncoding() ;
string postData="Login ="+login_s;
postData += ("&partner="+pa rtner_s);
postData += ("&type="+type_ s);
postData += ("&amount="+amo unt_s);
postData += ("&user1="+user 1_s);
byte[] data = encoding.GetByt es(postData);

// Prepare web request...
HttpWebRequest myRequest = (HttpWebRequest )
WebRequest.Crea te
("https://payflowlink.ver isign.com/payflowlink.cfm ");
myRequest.Metho d = "POST";
myRequest.Conte ntType="applica tion/x-www-form-
myRequest.Conte ntLength = data.Length;
Stream newStream=myReq uest.GetRequest Stream();
// Send the data.
newStream.Write (data,0,data.Le ngth);
newStream.Close ();
and i am getting the follwing error message:
Server Error in '/' Application.

The operation has timed-out.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.Net.WebE xception: The operation
has timed-out.

Source Error:(line 45 is in red color, meaning the error
is in that line)
Line 43: myRequest.Conte ntType="applica tion/x-www-
Line 44: myRequest.Conte ntLength = data.Length;
Line 45: Stream newStream=myReq uest.GetRequest Stream
Line 46: // Send the data.
Line 47: newStream.Write (data,0,data.Le ngth);
Source File:
D:\root\fitfrea k\trainwithdom. com\www\launch. cs Line:

Stack Trace:
[WebException: The operation has timed-out.]
System.Net.Http WebRequest.GetR equestStream() +190
MyCodeBehind.se nd_Click(Object sender, EventArgs e) in
D:\root\fitfrea k\trainwithdom. com\www\launch. cs:45
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEve
ntHandler.Raise PostBackEvent(S tring eventArgument) +57
System.Web.UI.P age.RaisePostBa ckEvent
(IPostBackEvent Handler sourceControl, String
eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent
(NameValueColle ction postData) +33
System.Web.UI.P age.ProcessRequ estMain() +1277

Can some please help, I will appriciate it highly

Nov 17 '05 #1
0 1388

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my webserver runs that part of the script (see attached file, snippet.php), though, it doesn't go through. I don't get an error message or...
by: Anand | last post by:
Hi i am having trouble adding a recordset into the access database, the code seems to be working fine it passs and parses through all variables just fine without showing any errors and also when i access the recordset it displays the results, what the real issue is that the entry is not made into the database even though i use the Update...
by: Mark Miller | last post by:
I'm puzzled by this situation. I'm running on Windows XP Pro 2002 SP 2. I started on an ASP.Net project, initially using the standard SmtpServer and MailMessage classes. For testing, I used the same e-mail address for From: and To:, my personal e-mail address on my ISP. I do not have an e-mail server set up on my machine, though I do have...
by: ext_u | last post by:
I'm trying to learn C from "The C Programming Language" (by K&R) and I am about halfway through the first chapter. I am using Miracle C as my text editor and compiler. Up until this point everything was working fine, but now the book has started into Line and Word counting programs. I am entering the programs into the text editor exactly...
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I need to send data from my server via the post method to the payment server. The payment server does not run asp.net. I dont know what they run. The...
by: Christian Blackburn | last post by:
Hi Gang, I don't know what to make of all of this, but I'm having nothing, but trouble copying data to the clipboard which should be the easiest thing in the world. The only systems I can get this to not crash on is my development system w/ VB 2003 installed and Windows NT 4. My development system is Windows 2000 Pro, but if I try using the...
by: stonemcstone | last post by:
I've been programming in C for years, and never experienced troubles until I started using the new RealC-32, a freeware C compiler from the same company that makes RealPlayer and Quicktime. That's when the trouble started. See, RealC-32 is like any other C compiler but with one notable difference. Any time your code invokes undefined...
by: tkondal | last post by:
Hi all. I just started looking at Python's ctypes lib and I am having trouble using it for a function. For starters, here's my Python code: from ctypes import*; myStringDLL= cdll.LoadLibrary("myStringDLL.dll");
by: =?Utf-8?B?U0FM?= | last post by:
I have not used Delegates before and I am having trouble using them in my app. Here is what I am doing. 1. I have created a C# InterOp Dll that I make calls to, that in turn calls methods in a 3rd party WIN32 API dll. My InterOp complies fine with no errors. Here is the lines of code where I use my Delegate in my InterOp: a. public...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.