473,394 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Sending an xml file in HttpWebRequest

Hi,

I'm attempting something new, so please here me out.

I need to send an xml file in my HttpWebRequest object. IOW, I need to post some xml data to a
specified URI. (FYI, this xml is composed using the StringBuilder object.) After reading the docs,
it seems that the only place to do so is the ContentLength property.

The ContentLength property's data type is long. How do I convert the xml into long? Is there some
technique to use that does this automatically? Or is there an easier way to accomplish this task?

Thanks,
Roshawn
Nov 19 '05 #1
2 1456
Roshawn Dawson wrote:
Hi,

I'm attempting something new, so please here me out.

I need to send an xml file in my HttpWebRequest object. IOW, I need
to post some xml data to a specified URI. (FYI, this xml is composed
using the StringBuilder object.) After reading the docs, it seems
that the only place to do so is the ContentLength property.
Why on earth...? ContentLength defines the size of the request body in
octets. If you want to post data, write it to the request stream.
The ContentLength property's data type is long. How do I convert the
xml into long? Is there some technique to use that does this
automatically? Or is there an easier way to accomplish this task?


Check out http://tinyurl.com/ble8x

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #2
Thanks Joerg for the reply! This is just what I'm looking for. :-)

Joerg Jooss wrote:
Roshawn Dawson wrote:

Hi,

I'm attempting something new, so please here me out.

I need to send an xml file in my HttpWebRequest object. IOW, I need
to post some xml data to a specified URI. (FYI, this xml is composed
using the StringBuilder object.) After reading the docs, it seems
that the only place to do so is the ContentLength property.

Why on earth...? ContentLength defines the size of the request body in
octets. If you want to post data, write it to the request stream.

The ContentLength property's data type is long. How do I convert the
xml into long? Is there some technique to use that does this
automatically? Or is there an easier way to accomplish this task?

Check out http://tinyurl.com/ble8x

Cheers,

Nov 19 '05 #3

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

Similar topics

5
by: PerryG | last post by:
We have a .NET 1.1 client which is sending a gzipped soap request using HttpWebRequest to an Apache server. The Apache server is using a the 'mod_deflate' server to decompress the incoming...
4
by: Mark | last post by:
i have a very simple web servive Imports System.Web.Services <System.Web.Services.WebService(Namespace:="urn:Example1")> _ Public Class Example1 Inherits System.Web.Services.WebService
0
by: khawar | last post by:
here is my code that i am using to send the post to verisign: using System.Drawing; using System.Data; using System.Data.SqlClient; using System.Data.OleDb; using System; using System.Web.UI;...
0
by: Kevin | last post by:
I am successfully creating and deleting appointments and sending invitations in a C# / ASP.NET / Exchange2000 environment. It works great! But the problem is that no notifications are sent out...
1
by: Marvin | last post by:
my asp.net app is posting to another webpage using httpwebRequest & x509Certificates and in return the certificate's name used for the posting is sent back. But instead of getting information about...
4
by: Christina N | last post by:
What is the easiest way to make an ASP.Net application send data to another web-app? For instance I would like APP3 to log user stats from APP1 and APP2. The applications are located on different...
5
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...
2
by: Paul Hale | last post by:
I have a vb.net web service and client that are both working fine. If someone wanted to consume our web service using .NET, no problem. Im a little confused on how non .NET clients would use the...
6
by: Rushwire | last post by:
Does anybody know how to send a meeting request using an ics/vcs (VCalendar) attachment from an asp.net page. I don't want my users to have to double click on the attachment but rather that it is...
0
by: sanjaygupta11 | last post by:
I am using httpwebrequest and httpwebresponse objects for sending data to remote appication by post and receiving the response from there. I am using this code in my windows application which will...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
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,...
0
jinu1996
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...
0
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...
0
tracyyun
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...

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.