Solved

VB.NET bypass Open SaveAs Security Warning

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

628 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