.NET
  Home arrow .NET arrow Page 4 - HTTP File Upload without User Interaction ...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

HTTP File Upload without User Interaction using .NET
By: Chandru Prashanth
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 24
    2004-10-26

    Table of Contents:
  • HTTP File Upload without User Interaction using .NET
  • Solution
  • Explanation of Code for Upload Function
  • CAB File

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    HTTP File Upload without User Interaction using .NET - CAB File


    (Page 4 of 4 )

       8. In order for the control to be downloaded over the Internet, we need to package it into CAB file. This can be done with the help of "Package and Deployment Wizard" provided Visual Studio6.

       9. The wizard would generate a CAB file and htm file. Copy these 2 files to your webserver's virtual directory and write a small javascript function in the htm file which would call the control's uploadFile method. Eg

    <script language=javascript>
    function upload()
    {
     var b,errno,errdesc,errsrc;
    FileUploadCtrl.uploadFile("
    http://localhost/Myupload/upload.aspx", "c:\\uploads\\uploadFile.doc",errno);
    }
    </script>

       10. The one thing that you have to keep in mind is you need to sign the activex control for it to be installed on the client machine without changing the security settings of Internet Explorer.

    If you are planning to give an uninstalled activex control then on the client machine' Internet Explorer, you've got to go to internet options->security->internet and reduce it to the lowest level.

    Conclusion

    In this article, we have seen how to write our own custom code to upload a file over the Internet. And I hope I have answered the questions of many people who have queried me on how to write the upload control.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Interesting approach. There are two questionsa) Why not use a stream, so you don't...
       · Yes, it is not as simple as the author has presented here in this ariticle...The...
       · I cant put my finger on a specific problem, however getting INET or winsock controls...
       · DITTO ALL THE WAY!
       · I'm trying to convert this code to C# but I'm having some trouble...For one I'm...
       · Hi Mr. Chandru,I tried using this code, although I used a third party winsock...
     

    .NET ARTICLES

    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF
    - Grouping and Aggregating When Querying LINQ ...
    - Commands, Input and the WPF
    - Keyboard and Ink Input with WPF
    - Mouse Input and the WPF
    - Input with Windows Presentation Foundation
    - Introducing LINQ with XML and Databases
    - An Introduction to LINQ
    - Querying LINQ to SQL: Basics
    - Completing a Simple Storefront with LINQ
    - Knowing Your Environment: the System.Environ...
    - Creating the Home Page for a Simple Storefro...
    - LINQ Quickly with Language Integrated Queries





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT