Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to lunch htm through C# code Pin
Kannan Kalyanaraman26-Apr-04 22:50
Kannan Kalyanaraman26-Apr-04 22:50 
AnswerRe: How to lunch htm through C# code Pin
Mike Dimmick26-Apr-04 23:34
Mike Dimmick26-Apr-04 23:34 
GeneralRe: How to lunch htm through C# code Pin
Alex Getman27-Apr-04 0:47
Alex Getman27-Apr-04 0:47 
GeneralRe: How to lunch htm through C# code Pin
Heath Stewart27-Apr-04 4:11
protectorHeath Stewart27-Apr-04 4:11 
GeneralRe: How to lunch htm through C# code Pin
Alex Getman27-Apr-04 4:23
Alex Getman27-Apr-04 4:23 
GeneralRe: How to lunch htm through C# code Pin
Heath Stewart27-Apr-04 5:30
protectorHeath Stewart27-Apr-04 5:30 
GeneralRe: How to lunch htm through C# code Pin
Alex Getman27-Apr-04 6:25
Alex Getman27-Apr-04 6:25 
GeneralRe: How to lunch htm through C# code Pin
Alex Getman27-Apr-04 6:38
Alex Getman27-Apr-04 6:38 
even if I do this:

HttpWebRequest myHttpWebRequest = (HttpWebRequest )WebRequest.Create(@"http://www.umc.ua/misc/sendsms.php");

string postData="?network1=UMC&Phone1=5918658&Message=HellofromCSharp&sender_name=sn";
ASCIIEncoding encoding=new ASCIIEncoding();
byte[] byte1=encoding.GetBytes(postData);
// Set the content type of the data being posted.
myHttpWebRequest.ContentType="application/x-www-form-urlencoded";
// Set the content length of the string being posted.
myHttpWebRequest.ContentLength=postData.Length;
Stream newStream=myHttpWebRequest.GetRequestStream();

newStream.Write(byte1,0,byte1.Length);

RES_text.Text = "The value of 'ContentLength' property after sending the data is {0}" + myHttpWebRequest.ContentLength.ToString();
// Close the Stream object.
newStream.Close();


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Net.ProtocolViolationException: Cannot send a content-body with this verb-type.
at System.Net.HttpWebRequest.BeginGetRequestStream(AsyncCallback callback, Object state)
at System.Net.HttpWebRequest.GetRequestStream()
at sm.Form1.heath_Click(Object sender, EventArgs e) in c:\test projects\sm\form1.cs:line 281
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
sm
Assembly Version: 1.0.1578.33862
Win32 Version: 1.0.1578.33862
CodeBase: file:///C:/Test%20Projects/sm/bin/Debug/sm.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitdebugging="true">


When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.





www.xedom.com

GeneralRe: Formula Pin
Jeff Varszegi26-Apr-04 19:43
professionalJeff Varszegi26-Apr-04 19:43 
GeneralRe: Formula Pin
DucLinh26-Apr-04 20:59
DucLinh26-Apr-04 20:59 
GeneralRe: Formula Pin
Jeff Varszegi27-Apr-04 3:09
professionalJeff Varszegi27-Apr-04 3:09 
GeneralRe: Formula Pin
Mazdak26-Apr-04 21:12
Mazdak26-Apr-04 21:12 
GeneralRe: Formula Pin
leppie27-Apr-04 7:05
leppie27-Apr-04 7:05 
GeneralParsing a string object Pin
Tony D. Abel26-Apr-04 17:55
Tony D. Abel26-Apr-04 17:55 
GeneralRe: Parsing a string object Pin
Jeff Varszegi26-Apr-04 18:05
professionalJeff Varszegi26-Apr-04 18:05 
GeneralRe: Parsing a string object Pin
Tony D. Abel27-Apr-04 7:02
Tony D. Abel27-Apr-04 7:02 
GeneralFormula Pin
DucLinh26-Apr-04 15:56
DucLinh26-Apr-04 15:56 
Generalcreating an array of existing WinForm controls Pin
Roman Nurik26-Apr-04 13:48
Roman Nurik26-Apr-04 13:48 
GeneralRe: creating an array of existing WinForm controls Pin
Roman Nurik26-Apr-04 13:51
Roman Nurik26-Apr-04 13:51 
GeneralRe: creating an array of existing WinForm controls Pin
Mike Dimmick26-Apr-04 23:43
Mike Dimmick26-Apr-04 23:43 
GeneralRe: creating an array of existing WinForm controls Pin
Mike Ellison26-Apr-04 17:03
Mike Ellison26-Apr-04 17:03 
GeneralRe: creating an array of existing WinForm controls Pin
Heath Stewart27-Apr-04 4:17
protectorHeath Stewart27-Apr-04 4:17 
GeneralLabel question... Pin
spoon vs fork26-Apr-04 13:47
spoon vs fork26-Apr-04 13:47 
GeneralRe: Label question... Pin
Roman Rodov26-Apr-04 14:55
Roman Rodov26-Apr-04 14:55 
GeneralRe: Label question... Pin
Jay Shankar26-Apr-04 15:43
Jay Shankar26-Apr-04 15:43 

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.