473,670 Members | 2,327 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="Attachmen tType"

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

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

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

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

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

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

UserID:{0EC4707 6-1022-45D7-966C-1CF56B393169}
Merchantid:{951 5BDA2-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:{9 515BDA2-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 2303
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
7526
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 like like would probable help? Best regards, Axel
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 sends to the Server:
3
1675
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 http://www.comstock1700k.com/download/22570094.jpg?h=3b456ad7eceff24e9ad547e1dfa96098&t=1132241687&u=esref When ever I click to save as a target as or download using flash get that programs could download the file correctly but when ever I use WebClient or httprequest it sends me to the login...
3
7440
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: ================================================ Error while trying to run project: Unable to start debugging on the web server. Server side-error occurred on sending debug HTTP request.
3
2569
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
1308
by: deepthik | last post by:
i want the details sending the data in streams from windows to an url
1
1855
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 access 'CDO.Message' object." I am runing both Web and Windows App on same test PC, and SMTP server is hosted on another machine. The function for sending Email is:
0
1543
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 as ok ie. it has completed sending the request using winhttprequest object not when its still under the loading stage. Could any one please help me out with this!!! Many thanks
1
3133
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 environment variables from the server. When I am typing the url of the html page in my browser, I am able to read the Environment variables from the server and getting the desired results. But, when I am making Http request through my window application,...
1
832
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( https://www.anyServer.com );
0
8471
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8388
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8907
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, 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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8593
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8663
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 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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7423
agi2029
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6218
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4396
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1799
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.