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
10 1533
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...
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
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
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
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
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
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
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"/>
:)
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
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 -
using System;
-
using System.IO;
-
-
class Test
-
{
-
-
public static void Main()
-
{
-
string path = @"c:\temp\MyTest.txt";
-
string path2 = @"c:\temp\MyTest.txt" + "temp";
-
FileInfo fi1 = new FileInfo(path);
-
FileInfo fi2 = new FileInfo(path2);
-
-
try
-
{
-
// Create the file and clean up handles.
-
using (FileStream fs = fi1.Create()) {}
-
-
//Ensure that the target does not exist.
-
fi2.Delete();
-
-
//Copy the file.
-
fi1.CopyTo(path2);
-
Console.WriteLine("{0} was copied to {1}.", path, path2);
-
-
//Try to copy it again, which should succeed.
-
fi1.CopyTo(path2, true);
-
-
Console.WriteLine("The second Copy operation succeeded, which is expected.");
-
-
}
-
catch
-
{
-
Console.WriteLine("Double copying was not allowed, which is not expected.");
-
}
-
}
-
}
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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!
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
| |