Solved

VB.NET bypass Open SaveAs Security Warning

Posted on 2009-07-09
3
316 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

810 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