473,804 Members | 3,494 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to accept request coming from VB page on server side

27 New Member
Can anyone plz tell me,how to accept request on server side,coming from HttpSendRequest () API(For Http Upload Control in VB).I am posting my code:
I think I need Server side component(may be in ASP),but how to implement it?
Public Function UploadFileHTTP( ByVal localFileName As String, ByVal remoteFileName As String) As Integer
Dim nRet As Integer
Dim bRet, bQueryInfo As Boolean
Dim iRet As Integer
Dim nFileHandle, i As Integer
Dim bData(BUFFER_SI ZE - 1) As Byte
Dim leftoversize As Long
Dim blnSendRequest As Boolean
nFileHandle = FreeFile
Dim sBuffer As String * 1024
Dim sBufferLength As Long
sBufferLength = Len(sBuffer)

hRequest = HttpOpenRequest (hConnect, "POST", "/Upload_Signatur e.asp", "HTTP/1.0", 0, 0, INTERNET_FLAG_N O_CACHE_WRITE, 0)
If hRequest = 0 Then
LastDllErrorInf o 'Call before calling any other dll function
If Not HttpErrorCode = 0 Then
Err.Raise HttpErrorCode, , HttpErrorString
End If
Exit Function
End If


Dim sData As String
sData = GetFileContents (localFileName)
If sData <> vbNullString Then
blnSendRequest = HttpSendRequest (hRequest, vbNullString, 0, sData, Len(sData))
Else
Exit Function
End If

'blnSendRequest = HttpSendRequest (hRequest, vbNullString, 0, localFileName, Len(localFileNa me))
bQueryInfo = HttpQueryInfo(h Request, HTTP_QUERY_CONT ENT_TYPE, sBuffer, sBufferLength, 0)

UploadFileHTTP = bQueryInfo

Close nFileHandle
InternetCloseHa ndle hRequest
End Function
Apr 7 '08 #1
0 805

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3945
by: Dicky Cheng | last post by:
Hi, I am using .net remoting technology. I set up a .net remoting client and server in IIS. When the client calls the server, the server will run a long duration method (30-60seconds). I have a test on it that if the network broken at the time the client have already send the remoting request and waiting for the server, the client side will wait infinitely by default, even if i already set the executionTimeout to 90seconds in...
6
2426
by: Drew | last post by:
I have been trying to figure out why I am getting this message... I have an application that is 20 different ASP pages that works in sequential order (step1, step2, step3...). After each step the app writes the entered text to a cookie. This feature is so that if there is a problem, we can still retrieve the data. This Bad Request error has something to do with the cookie that is written to, because I can go all the way through the app...
9
28942
by: Sunny | last post by:
Hi, I have cr8ed a javascript function in the head section of a jsp page. <!-- function go(theURL) { alert(theURL); if (theURL!=null){
3
45978
by: news.rcn.com | last post by:
How can I access the request and response object for a page using javascript. I want to stick some data on with something like request.setAttribute( "User's choice for later use" ). I can't seem to find a reference to request or response objects in JavaScript either in Google Groups or O'Reilly's "JavaScript the Definitive Guide" (surely it should be in the latter, huh?) I know I could use a hidden form element but the data would be a...
4
13545
by: just.an.imbecile | last post by:
I have searched alot for this and cannot find an answer. I have a simple form, and when it submits, I have it posting the data. I have a simple function to loop through and print out all my form data: <table class="data" width="90%"> <tr> <th>Name</th> <th>Value</th></tr> <% string val;
6
1846
by: Cord-Heinrich Pahlmann | last post by:
Hi, I wrote a script which reads a formular from a forum loginpage. It automatically fills in my credentials an logs me in when I hit submit. I have secured the path to the script with a .htaccess file. I have now a problem with one site which generates some kind of checkcode. The checkcode is placed in a hidden input field. I read the remote page with the "file(url)" command an parse it with PHP to a new formular with my credentials.
18
5450
by: Thomas Lunsford | last post by:
I have inherited a set of asp pages that I now need to augment. In order to minimize changes to production code, I would like to make a "call" to an asp page from a new asp page. Existing code is using many Request.Form variables, and I would very much prefer not to change this code. The new page will retrieve data that I would like to fill into Request.Form variables that are used in the old code. So, is it possible for me to set...
4
2711
by: Olivier Matrot | last post by:
Hello, I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. This ends with the following exception : <Source>System</Source> <StackTrace at System.Collections.Specialized.ListDictionary.Add(Object key, Object value) at System.Web.UI.ClientScriptManager.RegisterScriptBlock(ScriptKey key, String script, ListDictionary&amp; scriptBlocks, ArrayList&amp; scriptList,
13
3933
by: 7stud | last post by:
I have the following two identical clients #test1.py:----------- import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = 'localhost' port = 5052 #server port
0
9704
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
9572
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
10562
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...
0
9132
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
7608
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
6845
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5508
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2978
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.