Solved

VB.NET bypass Open SaveAs Security Warning

Posted on 2009-07-09
3
314 Views
Last Modified: 2012-05-07
Hi there.  I have an app that goes to a webpage and downloads a file...however, the old
File Download - Security Warning "Do you want to open or save this file?" message pops up. Any ideas on how to bypass this and just save the document to a specified location?
0
Comment
Question by:suicehockey44
  • 2
3 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24821182
Point 1: Its not a security warning. It gives user the two options as you mentioned.
Now how do you download those files? Can you not use the My.Computer.Network.DownloadFile method to silently download the file?

http://www.mredkj.com/vbnet/downloadfile.html

http://www.devarticles.com/c/a/ASP.NET/HTTP-File-Download-Without-User-Interaction-Using-.NET/

http://www.vbdotnetheaven.com/UploadFile/bfarley/FileDownload04182005043858AM/FileDownload.aspx
0
 

Author Comment

by:suicehockey44
ID: 24822824
The file is hidden in a script.....The link is https://gats.pjm-eis.com/myModule/rpt/myrpt.asp?r=229
but the file is downloaded via

<script language="javascript">
            function downloadnow() {
                  frmDownload.submit ();
            }

I've tried using the invokescript method but it still requires me to select an option.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 24822889
I am not an expert of javascript but may be you could use some technique such as the SendKeys we use in VB.NET.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now