473,511 Members | 15,302 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending a HTTP Request from a Windows Application

Hi NG,

I have a little Problem.

I make a normal HTML page which does following:

When I click the Button Submit, I send some fields to the Server back.

Here the Stream that my Browser sends to the Server:

POST http://sbscrm/MSCRMSERVICES/NoteUpload.srf HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
*/*
Referer: http://10.0.1.238/AttachmentHelpers/note_upload.htm
Accept-Language: de
Content-Type: multipart/form-data;
boundary=---------------------------7d41dd840021e
Proxy-Connection: Keep-Alive
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR
1.1.4322)
Host: sbscrm
Content-Length: 1426
Pragma: no-cache

-----------------------------7d41dd840021e
Content-Disposition: form-data; name="AttachmentType"

5
-----------------------------7d41dd840021e
Content-Disposition: form-data; name="AttachmentId"

{08FC8376-E0B0-48BF-985E-6C6C9E0EFE04}
-----------------------------7d41dd840021e
Content-Disposition: form-data; name="UserId"

{0EC47076-1022-45D7-966C-1CF56B393169}
-----------------------------7d41dd840021e
Content-Disposition: form-data; name="MerchantId"

{9515BDA2-5549-4CBE-BF1C-84C8FFA0CDDF}
-----------------------------7d41dd840021e
Content-Disposition: form-data; name="ErrorURL"

http://sbscrm/AttachmentHelpers/error.htm
-----------------------------7d41dd840021e
Content-Disposition: form-data; name="SuccessURL"

http://sbscrm/AttachmentHelpers/NoteDownload.htm
-----------------------------7d41dd840021e
Content-Disposition: form-data; name="userFile"; filename="C:\user.txt"
Content-Type: text/plain

UserID:{0EC47076-1022-45D7-966C-1CF56B393169}
Merchantid:{9515BDA2-5549-4CBE-BF1C-84C8FFA0CDDF}

Note1:{BD6B7AEA-314F-48DA-8490-08CD749D2E01}
Note2:{08FC8376-E0B0-48BF-985E-6C6C9E0EFE04}
Note3:{C268E4C9-28B8-4105-B4AE-13ADF029DA2C}
Note4:{DB359EC6-D0C9-4B8D-B93A-029F97523123}

AttachmentID:{9515BDA2-5549-4CBE-BF1C-84C8FFA0CDDF}
-----------------------------7d41dd840021e
Content-Disposition: form-data; name="UPL"

Submit
-----------------------------7d41dd840021e--

Now I want following:

When I click a button on a Windows Application, i want to send this stream
with some other values back to the Server.

Now I have search on a lot of pages and newsgroups, and found the following
helps:

With the class HttpWebRequest and WebRequest, it should be possible to send
such a Message to the HTTP Server.

My problem:

I didn't know how I can use this class without any error.

Can somebody of you help me?


--
Thanks Andre Grumbach
P.S. Please remove 'nospam' from the Email address


Nov 22 '05 #1
2 2285
Andre Grumbach wrote:
Hi NG,

I have a little Problem.

I make a normal HTML page which does following:

When I click the Button Submit, I send some fields to the Server back.

Here the Stream that my Browser sends to the Server:
[...] Now I have search on a lot of pages and newsgroups, and found the
following helps:

With the class HttpWebRequest and WebRequest, it should be possible
to send such a Message to the HTTP Server.

My problem:

I didn't know how I can use this class without any error.

Can somebody of you help me?


Well, what *exactly* is your problem? What you want to do is to send a
multipart/form-data request, which is currently not properly supported by
the .NET ftamework, but there are sample implementations available on the
Web that show hoe to do that using HttpWebRequest.

Cheers,

--
Joerg Jooss
jo*********@gmx.net

Nov 22 '05 #2
Andre Grumbach wrote:
Hi NG,

I have a little Problem.

I make a normal HTML page which does following:

When I click the Button Submit, I send some fields to the Server back.

Here the Stream that my Browser sends to the Server:
[...] Now I have search on a lot of pages and newsgroups, and found the
following helps:

With the class HttpWebRequest and WebRequest, it should be possible
to send such a Message to the HTTP Server.

My problem:

I didn't know how I can use this class without any error.

Can somebody of you help me?


Well, what *exactly* is your problem? What you want to do is to send a
multipart/form-data request, which is currently not properly supported by
the .NET ftamework, but there are sample implementations available on the
Web that show hoe to do that using HttpWebRequest.

Cheers,

--
Joerg Jooss
jo*********@gmx.net

Nov 22 '05 #3

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

Similar topics

1
7518
by: Axel Heck | last post by:
Hi there, is there any propper solution to send multipart/form-datas like pictures or complete textfiles to an webserver by using a http-request? Still a information how such an request must...
2
477
by: Andre Grumbach | last post by:
Hi NG, I have a little Problem. I make a normal HTML page which does following: When I click the Button Submit, I send some fields to the Server back. Here the Stream that my Browser...
3
1659
by: Eþref DURNA | last post by:
My Aim is to make a windows application download which support session and cookies. There is a web site which gives images as links like this...
3
7431
by: darrel | last post by:
I got a new machine this week. Prior to that, I backed up my WWWROOT folder. Now I have the new machine, moved my files back. I have one projet, though, that refuses to debug/launch: ...
3
2556
by: ReidarT | last post by:
Is it possible to send email from a Windows-form application like I do from a web-form application? regards reidarT
3
1302
by: deepthik | last post by:
i want the details sending the data in streams from windows to an url
1
1842
by: xin.yadong | last post by:
Hi: I have a shared function for sending Email using SMTP. It works fine in a ASP.NET web application. But when I use it in a VB.Net Windows application, it always gave me an error: "Could not...
0
1536
by: teju | last post by:
Hi, I have an application which is supposed to alert me whenever it gets response status other than 200. How do i make sure that it alerts me only when it has got the response text from the server...
1
3120
by: Shashank | last post by:
Hi all, I am a new member of this community. I am making a http request to a html file placed on a Apache server. On this page there is an embeded perl statement which requires reading ...
1
823
by: m2abhi25 | last post by:
Hi All, I am trying to send an https:// request from my .Net CF application. The code is as follows : try { HttpWebRequest request = ( HttpWebRequest ) WebRequest.Create(...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7371
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
7432
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...
1
7093
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...
1
5077
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
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...
0
3230
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...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.