Solved

VB.NET bypass Open SaveAs Security Warning

Posted on 2009-07-09
3
321 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
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…

739 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