473,951 Members | 32,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A97 - how to transfer a file from https?

Hi NG,

I need a solution for my Access 97 application. I have to transfer a file
(size 100-500kb) from a server with https.

Example: https://ip.of.my.server/share/textfile.txt -> c:\

Does anybody have a sample code for this?

I tried the transfer library of Dev Ashish - but unfortunately this code
does not work with https... (I posted my problem a couple of days ago...)

Any support is appreciated

Regards

Hanspeter
Jan 10 '06 #1
6 1720
Red
Try this, I wrote it just for you :D
(Cuz I noticed you posed the same question last week, and I didn't have
the time/motivation to do it.....)

Sub GetTxtfilefromH TTP(strFileName As String)
'strFileName is the name of the file you wish to send the document to

'This code was originally written by Dion Douglas
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.

' Requires two references
' shdocvw.dll - Microsoft Internet Controls
' mshtml.tlb - Microsoft HTML Object Library
'

Dim objIE As SHDocVw.Interne tExplorer
Dim strFileName As String, txtDoc As String
Dim objDoc As Object
Dim intfree As Integer
Set objIE = New SHDocVw.Interne tExplorer
With objIE
.Navigate2 "http://www.google.com"
.Visible = True
Do While .Busy = True
Loop
Set objDoc = .Document
intfree = FreeFile
Open strFileName For Output As #intfree
Write #intfree,
objDoc.body.par entElement.inne rHTML
Close #intfree
End With
Set objDoc = Nothing
objIE.Quit
Set objIE = Nothing
End Sub

Jan 10 '06 #2
Red
oh man, I meant to also write in to fix the address ....

change this line:
Sub GetTxtfilefromH TTP(strFileName As String)

to
Sub GetTxtfilefromH TTP(strFileName As String, strHTML as String)

AND
change this line:
.Navigate2 "http://www.google.com"

to .Navigate2 strHTML
Then you can call it variably as needed :D

Note, this will also get you the 'source' of html pages, and can be
used as such.

~Red

chaneg this:

Jan 10 '06 #3
On 10 Jan 2006 11:28:41 -0800, Red wrote:
oh man, I meant to also write in to fix the address ....

change this line:
Sub GetTxtfilefromH TTP(strFileName As String)

to
Sub GetTxtfilefromH TTP(strFileName As String, strHTML as String)

AND
change this line:
.Navigate2 "http://www.google.com"

to .Navigate2 strHTML
Then you can call it variably as needed :D

Note, this will also get you the 'source' of html pages, and can be
used as such.

~Red

chaneg this:


Thank you Red for your replay - I will give a try tomorow and give you some
feedback...

Reagrds

Hanspeter
Jan 10 '06 #4
Red
Not a problem...
To explain how this works... what this actually does is get the
'source' from the page you are going to (strHTML)... and, seeing your
file is a text file, it should work quite well. Now, if you needed
another type of file (say a zip file), you would have to do a bit more
coding.

~Red

Jan 10 '06 #5
On 10 Jan 2006 13:41:38 -0800, Red wrote:
Not a problem...
To explain how this works... what this actually does is get the
'source' from the page you are going to (strHTML)... and, seeing your
file is a text file, it should work quite well. Now, if you needed
another type of file (say a zip file), you would have to do a bit more
coding.

~Red


Hi Red,

I tried your code and got one Problem -> when code comes to line:
..Navigate2 strHTML a Windows-Popup opens with the question of opening or
saving the file...

with regular asp or html files your code works fine...

Regards

Hanspeter
Jan 13 '06 #6
Red
I will look into it when I get a chance over the weekend. If someone
else would help, I'd be glad to know..

I think you could probably suppress the msgbox, but, let me look it
over./.. dont' have time today =)
~Red

Jan 13 '06 #7

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

Similar topics

8
5567
by: Philipp Brune | last post by:
Hi all, the following problem occured to me and I hope somebody can help me : I need to implement an encrypted File download with a PHP script on the server side and a c# client application. I know there is a way to symmetrically encrypt files with the php mcrypt routines and already did implement a
2
2820
by: Philip Korolev | last post by:
Hi All. I am attempting to use SSL for the first time with ASP.NET I would like to be able to send my form details to another page using https:// connection. The page I am sending data to, uses Stored Procedures to add data to SQL Server. However attempting to use https:// in server.transfer (qualifying a full address) is returning an error. How can I use SSL with ASP.NET page transfers? If there is more than one technique, I would appreciate...
3
665
by: Moheb Missaghi | last post by:
Hi, I am getting the following error when using Server.Transfer: System.ArgumentException: Invalid path for child request 'https://....'. A virtual path is expected I am using Server.Transfer("https://...", true). The path in question is a valid url on the internet. Any idea?
2
1601
by: Gigino | last post by:
I'm developing an asp.net application and i need to execute an aspx page using Secure Socket Layer; the problem is: i call the page web form http://server/page1.aspx; when i submit this form, i wanted to use the server.transfer to go to httpS://server/page2.aspx with ssl, but the Transfer method doesn't allow absolute path. Is there a way to do something like that or need i to call with https all my pages? thank you for any help Pietro
3
1930
by: R.A. | last post by:
Hi, Is there a way to have asp.net transfer the session id in the url as a paramenter and not as part of the web address? something like the following: https://www.anseladams.com/billinfo.aspx?UserID=222119&SessionID=9qj7wx62Io2zUNBJXQnV&SID=1&SGID=1 I don't want the force cookies on the web site. Thanks
6
3418
by: Hanspeter Leupin | last post by:
Hi NG, I used the Internet Data Transfer Library of Dev Ashish found at http://www.mvps.org/access/modules/mdl0037.htm to transfer text files from a server with HTTPS in my old Ms Access 97 application. '----snip---- Sub TestHTTP() On Error GoTo ErrHandler Dim objHTTP As InetTransferLib.HTTP
8
1855
by: p3t3r | last post by:
I am using .NET2 and have a number of aspx pages. On each page is a LinkButton that performs a server.transfer() to another page. If we use page names A,B,C,D,E as an example. I start on page A and do a server.transfer to page B. The address bar still shows page A (which is what I want). Page B then does a server.transfer to page C. Now the address bar shows the URL for page B (not C and not A which is what I want). Every new...
1
1346
by: lygine | last post by:
Dear all, I am new to .net, therefore needed your advice/input how to write a program to transfile file from backend (batch job) using https protocol? I need to transfer flat file as batch job to be running for every 5min. will appreciate for your input and advice. thanks, Lygine.
2
1519
by: jjaimes | last post by:
I am new in Perl and I need some help with the following, from a Unix box I want to transfer a file that is in https page port 443, in where I have to put username and password to go inside, but I don't have any idea how to do it, somebody can help me with it. Also an basic example will be welcome Thanks in advance
0
11607
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
11203
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11378
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
9911
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
8271
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
7447
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
6237
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...
0
6360
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.