Hi All,
I am reposting this because I need some guidance/advice fairly quickly.
I currently have the following setup for saving a file on the server:
The user runs a VB app on his/her PC. Among other things, the app
prompts the user to select a file (or files). The app then uploads the
file(s) to the web server (effectively pushing the files up). In addition,
the app calls an aspx page and passes the file name (and a few other
bits of data) to the page as query strings. The page then writes the
data to the database. But the user never sees the page - it all happens
"behind the scenes".
Here is what I want to do:
I want to modify the aspx so it pulls the file from the client, as well as
the other things it currently does. The VB app would simply pass all the
relevant info to the page, and the page would do all the work. To prevent
someone calling the page without using the VB app, the app passes an
encrypted string that the page uses to verify that the page has been called
legitimately.
I know I can do this very easily by using a HTML <input type="file">
control. But I don't want to do this because I don't want the user to
ever see the page - the user still needs to use the VB app, I just want
to shift control of the file transfer from the app to the aspx page.
If this presents a security risk, or if it can't be done, I would be
grateful
if someone could explain why.
Cheers,
MG 3 1297
Hi,
I would recommend using a Web Services instead of an ASPX page. You can
easily call your own web service with all the parameters and the file data
from your VB app, at least if you use VB.NET. If you still use VB6, then the
ASPX way may be easier. In this case you still have to use <input
type=file...>, but you can implement the page so that it only allows POSTs
(PageLoad: if(IsPostBack== false) Response.End() or something similar like
that).
Best regards,
Marc Höppner
NeoGeo
"Mr Gordonz" <pa**@mobius.ne t.au> wrote in message
news:OV******** ******@TK2MSFTN GP09.phx.gbl... Hi All,
I am reposting this because I need some guidance/advice fairly quickly.
I currently have the following setup for saving a file on the server:
The user runs a VB app on his/her PC. Among other things, the app prompts the user to select a file (or files). The app then uploads the file(s) to the web server (effectively pushing the files up). In
addition, the app calls an aspx page and passes the file name (and a few other bits of data) to the page as query strings. The page then writes the data to the database. But the user never sees the page - it all happens "behind the scenes".
Here is what I want to do:
I want to modify the aspx so it pulls the file from the client, as well as the other things it currently does. The VB app would simply pass all the relevant info to the page, and the page would do all the work. To prevent someone calling the page without using the VB app, the app passes an encrypted string that the page uses to verify that the page has been
called legitimately.
I know I can do this very easily by using a HTML <input type="file"> control. But I don't want to do this because I don't want the user to ever see the page - the user still needs to use the VB app, I just want to shift control of the file transfer from the app to the aspx page.
If this presents a security risk, or if it can't be done, I would be grateful if someone could explain why.
Cheers,
MG
Hi Marc,
The VB app is indeed VB6, and I have never created a Web Service. I did
actually try the following in the pageload event of the page:
1. Dim txtFilePath As String = Trim(Request.Qu eryString("File Path"))
2. Dim myControl As HtmlControls.Ht mlInputFile = New
HtmlControls.Ht mlInputFile()
3. myControl.Value = txtFilePath
4. Dim strFileName = myControl.Poste dFile.FileName
5. myControl.Poste dFile.SaveAs(st rServerPath & "\media\" & strFileName)
But it didn't like line 3 - the error I got is: Object reference not set to
an instance of an object.
How can I use a <input type=file> control if it is never seen by the user?
I have done a lot research into how this control works, and everything I
have read says that the value property of the control can't be set
programmaticall y (for security reasons). There must be a way for a page to
pull a file off a client computer without the user having to actually see
the page??
Cheers,
MG
"Marc Hoeppner" <ma**********@h otmail.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi,
I would recommend using a Web Services instead of an ASPX page. You can
easily call your own web service with all the parameters and the file data
from your VB app, at least if you use VB.NET. If you still use VB6, then the
ASPX way may be easier. In this case you still have to use <input
type=file...>, but you can implement the page so that it only allows POSTs
(PageLoad: if(IsPostBack== false) Response.End() or something similar like
that).
Best regards,
Marc Höppner
NeoGeo
"Mr Gordonz" <pa**@mobius.ne t.au> wrote in message
news:OV******** ******@TK2MSFTN GP09.phx.gbl... Hi All,
I am reposting this because I need some guidance/advice fairly quickly.
I currently have the following setup for saving a file on the server:
The user runs a VB app on his/her PC. Among other things, the app prompts the user to select a file (or files). The app then uploads the file(s) to the web server (effectively pushing the files up). In
addition, the app calls an aspx page and passes the file name (and a few other bits of data) to the page as query strings. The page then writes the data to the database. But the user never sees the page - it all happens "behind the scenes".
Here is what I want to do:
I want to modify the aspx so it pulls the file from the client, as well as the other things it currently does. The VB app would simply pass all the relevant info to the page, and the page would do all the work. To prevent someone calling the page without using the VB app, the app passes an encrypted string that the page uses to verify that the page has been
called legitimately.
I know I can do this very easily by using a HTML <input type="file"> control. But I don't want to do this because I don't want the user to ever see the page - the user still needs to use the VB app, I just want to shift control of the file transfer from the app to the aspx page.
If this presents a security risk, or if it can't be done, I would be grateful if someone could explain why.
Cheers,
MG
Why first request an empty page?
You don't want to GET an empty page, you want to POST a filled page.
See if you can work out how the "browser" response is encoded
and send that (filename, other bits, file data).
Hans Kesting
"Mr Gordonz" <pa**@mobius.ne t.au> wrote in message
news:uP******** ******@TK2MSFTN GP12.phx.gbl... Hi Marc,
The VB app is indeed VB6, and I have never created a Web Service. I did actually try the following in the pageload event of the page:
1. Dim txtFilePath As String = Trim(Request.Qu eryString("File Path")) 2. Dim myControl As HtmlControls.Ht mlInputFile = New HtmlControls.Ht mlInputFile() 3. myControl.Value = txtFilePath 4. Dim strFileName = myControl.Poste dFile.FileName 5. myControl.Poste dFile.SaveAs(st rServerPath & "\media\" & strFileName)
But it didn't like line 3 - the error I got is: Object reference not set
to an instance of an object.
How can I use a <input type=file> control if it is never seen by the user? I have done a lot research into how this control works, and everything I have read says that the value property of the control can't be set programmaticall y (for security reasons). There must be a way for a page
to pull a file off a client computer without the user having to actually see the page??
Cheers,
MG "Marc Hoeppner" <ma**********@h otmail.com> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. .. Hi,
I would recommend using a Web Services instead of an ASPX page. You can easily call your own web service with all the parameters and the file data from your VB app, at least if you use VB.NET. If you still use VB6, then
the ASPX way may be easier. In this case you still have to use <input type=file...>, but you can implement the page so that it only allows POSTs (PageLoad: if(IsPostBack== false) Response.End() or something similar like that).
Best regards,
Marc Höppner NeoGeo
"Mr Gordonz" <pa**@mobius.ne t.au> wrote in message news:OV******** ******@TK2MSFTN GP09.phx.gbl... Hi All,
I am reposting this because I need some guidance/advice fairly quickly.
I currently have the following setup for saving a file on the server:
The user runs a VB app on his/her PC. Among other things, the app prompts the user to select a file (or files). The app then uploads the file(s) to the web server (effectively pushing the files up). In addition, the app calls an aspx page and passes the file name (and a few other bits of data) to the page as query strings. The page then writes the data to the database. But the user never sees the page - it all happens "behind the scenes".
Here is what I want to do:
I want to modify the aspx so it pulls the file from the client, as well
as the other things it currently does. The VB app would simply pass all
the relevant info to the page, and the page would do all the work. To
prevent someone calling the page without using the VB app, the app passes an encrypted string that the page uses to verify that the page has been called legitimately.
I know I can do this very easily by using a HTML <input type="file"> control. But I don't want to do this because I don't want the user to ever see the page - the user still needs to use the VB app, I just want to shift control of the file transfer from the app to the aspx page.
If this presents a security risk, or if it can't be done, I would be grateful if someone could explain why.
Cheers,
MG
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Joe |
last post by:
Please repost answer message did not make it last time
Hello,
Joe here, wanted to get the 411 on this article. I posted
in the FrontPage forum but there is never an answer. So I
have come here, where all my IIS problems have been solved
(Thank YOU!!) I want to create a small utility web site
with a logon page and a form connected to an Access
database. The article below explains exactly how but when
|
by: JoeS |
last post by:
Is there anyway to share a single pch file between
projects in VC 7.0? I have 300+ projects each of which
creates its own pch. All projects include the exact same
header files in the precompiled header. Its takes about 7
seconds to create the precompiled header for each project.
That's 35 minutes spent creating precompiled headers for
all project! All of the projects use PDB files for debug
info.
I tried creating Precomp.pch in project...
|
by: Adrian Parker |
last post by:
I've got the standard SqlCacheDependency working just fine , ie. I've
defined (and encrypted) the connectionStrings section in the web.config, and
I've also defined an an sqlCacheDependency in the caching section. So, in my
code I add an item to the cache with an sqlCacheDependency, referencing the
named sqlCacheDependency in the web.config and the database table it is to
be based on (have enabled notificiations for that table). Fine.
...
|
by: Jack |
last post by:
Since,
I have not got some desired advise, I am reposting this for some
asnwer/valuable suggestion. Thanks.
THE FOLLOWING IS A PART OF CODE FROM A ASP PAGE
<%
sql01 = "SELECT COUNT(*) AS reccount FROM Equipmenttbl "
sql01 = sql01 & "WHERE Equipmenttbl.GrantID = " & GrantID
|
by: mattmerc |
last post by:
Hi all,
This is a repost from a week or so ago. I'll try to reformat so it is
more clear.
I am looking for something in asp .net / vb .net that will export a
datagrid to Excel, BUT will save the file on the server (not the
client). Can this be done without Excel installed on the server?
Is there a was to send the contents of a datagrid as an excel
| |
by: =?Utf-8?B?RnJlZU5FYXN5?= |
last post by:
Hello,
the scenario:
There's an ASPX page which shows some text and has three buttons at the
bottom: Save, Print and Close. Print and close is done by javascript. But how
can I save the page on the client's computer? He/she could do this using the
browser (file/save), but I need to have it done by pressing the pushbutton.
In my serverside code I get the button-click-event, I also know how to get
|
by: Joseph I. Ceasar |
last post by:
In an earlier post, someone asked about how to save a page on the client
programmatically. I also had to solve this problem and did use Steven's
approach. It worked
great!
Now here is an interesting twist. The page that gets saved to the client
contains a several DataGrids components. The data displayed in the grids is
filtered by the contents of a separate drop down list box. This allows the
client to "download" one page a time.
|
by: Joseph I. Ceasar |
last post by:
In an earlier post, someone asked about how to save a page on the client
programmatically. I also had to solve this problem and did use Steven's
approach. It worked
great!
Now here is an interesting twist. The page that gets saved to the client
contains a several DataGrids components. The data displayed in the grids is
filtered by the contents of a separate drop down list box. This allows the
client to "download" one page a time.
|
by: JamieHowarth0 |
last post by:
Hi guys,
I have a pet project I'm trying to get off the ground - I'd like to build an IMAP server.
Now, it's one with a bit of a twist, and the twist is that it won't be used to send and receive mail... (told you there was a twist!)
I can't explain a huge amount but there are a few basics which I know I have to be able to understand, in this kind of order:
I assume it's possible to build a Windows service which can listen on port 143...
|
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,...
|
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...
| |
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...
|
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...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |