473,408 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

how to down load a file on to desktop from my server

seshu
156 100+
Hi everybody
this is seshu i have a small application to design in that i need to download a voice file frorn server to the dektop can anybody say me how
thanking you
regards
seshu
Jan 23 '07 #1
10 1533
kenobewan
4,871 Expert 4TB
You have given a vague explanation of what you want to do, but I am wondering why? Is this an intranet or extranet? Who are your users and will they be selecting the voice file? What is the format of the file? What code have you tried and have you received any errors...
Jan 23 '07 #2
radcaesar
759 Expert 512MB
Hi,
There is no special logic used for file download. Like u give the link for HTML file, u give a link to that particular file. When the user clicks that link, it downloads that file to the client.

:)

Hi everybody
this is seshu i have a small application to design in that i need to download a voice file frorn server to the dektop can anybody say me how
thanking you
regards
seshu
Jan 23 '07 #3
seshu
156 100+
i am sorry actually a vb, window application which runs on five systems all the five systems are connected in network and the main system is all ways on so that i can retrive data from the main data base and i think in the similar manner we can have an accesss to files right i want download two voice files from the main server to local server through the vb program so someone please help me
thanking you
regards
seshu
Jan 23 '07 #4
radcaesar
759 Expert 512MB
In case of an client server apps, the server generally denotes DB Server. Did u mean to download a file from DB ?

:)


i am sorry actually a vb, window application which runs on five systems all the five systems are connected in network and the main system is all ways on so that i can retrive data from the main data base and i think in the similar manner we can have an accesss to files right i want download two voice files from the main server to local server through the vb program so someone please help me
thanking you
regards
seshu
Jan 23 '07 #5
seshu
156 100+
yes sir i need to download a file from database
sir in my ofice there is one server which is shared by all now i want download a file which is in a folder of server
now how to take the path
regards
seshu
Jan 24 '07 #6
radcaesar
759 Expert 512MB
Hi,
You are confused i think. You said that you want to get that from the DB and also u said that its stored in a folder.

In case of DB, the data are stored in tables.

If you want to store that files in a folder for later download, then it should be a web application.

I May not get u clear....


:)
yes sir i need to download a file from database
sir in my ofice there is one server which is shared by all now i want download a file which is in a folder of server
now how to take the path
regards
seshu
Jan 24 '07 #7
seshu
156 100+
i want to design a window application to download a file from server which is there in my office to the local system how is it possible
regards
seshu
Jan 24 '07 #8
radcaesar
759 Expert 512MB
Yup,
That sounds clear now.

Try this,

FileInfo fileInfo = new FileInfo(@"\\\\MachineName\\FilePath\\FileName.ext ");
FileStream fileReadStream = fileInfo.OpenRead();

Also,

In web.config file, change the settings of impersonation,

<identity impersonate="true"
userName="domain\username"
password="password"/>

:)
Jan 25 '07 #9
seshu
156 100+
thank you i dint check this yet but thanks for ur help becauyse i has put the same quesion to many but no one has took a step to help me
any how one more small doubt
will this copy the file from there more over the file to be copied is not doc file but a wav file more over i dont find any word like file copy in the given code thats y iam asking you this question
regards
seshu
Jan 25 '07 #10
radcaesar
759 Expert 512MB
thank you i dint check this yet but thanks for ur help becauyse i has put the same quesion to many but no one has took a step to help me
any how one more small doubt
will this copy the file from there more over the file to be copied is not doc file but a wav file more over i dont find any word like file copy in the given code thats y iam asking you this question
regards
seshu
Check with the fileinfo class, it has a method CopyTo(), which will copy the file to the specified location.

What ever file it may be, thats not an issue here. You can use this class for any kind of files.

Some mock code again
Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.IO;
  3.  
  4. class Test 
  5. {
  6.  
  7.     public static void Main() 
  8.     {
  9.         string path = @"c:\temp\MyTest.txt";
  10.         string path2 = @"c:\temp\MyTest.txt" + "temp";
  11.         FileInfo fi1 = new FileInfo(path);
  12.         FileInfo fi2 = new FileInfo(path2);
  13.  
  14.         try 
  15.         {
  16.             // Create the file and clean up handles.
  17.             using (FileStream fs = fi1.Create()) {}
  18.  
  19.             //Ensure that the target does not exist.
  20.             fi2.Delete();
  21.  
  22.             //Copy the file.
  23.             fi1.CopyTo(path2);
  24.             Console.WriteLine("{0} was copied to {1}.", path, path2);
  25.  
  26.             //Try to copy it again, which should succeed.
  27.             fi1.CopyTo(path2, true);
  28.  
  29.             Console.WriteLine("The second Copy operation succeeded, which is expected.");
  30.  
  31.         } 
  32.         catch 
  33.         {
  34.             Console.WriteLine("Double copying was not allowed, which is not expected.");
  35.         }
  36.     }
  37. }
Jan 25 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: EC | last post by:
I am trying to save a file to an end users desktop from the Server on the click of a button. This works when run the application on my local but does not work when the application is running on the...
9
by: andrewbb | last post by:
I'm inserting 2 million+ records from a C# routine which starts out very fast and gradually slows down. Each insert is through a stored procedure with no transactions involved. If I stop and...
11
by: Abhishek | last post by:
I have a problem transfering files using sockets from pocket pc(.net compact c#) to desktop(not using .net just mfc and sockets 2 API). The socket communication is not a issue and I am able to...
0
by: phillip | last post by:
This is interesting, I have attached my web.config file and the exception I have been logging. I created a library which provide data access to a database and a control system. The library is...
2
by: Wysiwyg | last post by:
I was hoping to get some opinions on the efficiency of various methods of reusing the same dropdown list data. Here is the situation: Multiple panels on maintenance pages with TAB menus across...
0
by: bruce | last post by:
ASP.NET app running for about a year with no problem and suddenly this week it's giving error message. The same as the one decribed by another user. Even stranger is that we only have this problem...
0
by: bruce | last post by:
ASP.NET app running for about a year with no problem and suddenly this week it's giving error message. The same as the one decribed by another user. Even stranger is that we only have this problem...
2
by: Bahman | last post by:
Hello! Sending email attachments works only if the file is on the server file system. So, I need to copy the local file to the server. Is there an easy way of doing this? Thank you!
2
by: PeteCresswell | last post by:
I've been changing my apps to be compliant with MS's standard of writing temp data only to C:\Documents And Settings\.... But now I'm converting an app that creates .TXT files and spreadsheets...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.