Uploading file more than 5 mb, sound files, mediafiles.


N

news microsoft

Hello all,



In my ASP.Net , C# web Application I have used the traditional upload code
i.e. HTTP Method and it works fine for files and images up to 5 MB but once
the size of file is more than 5 MB it gives a error mostly time out error
and also uploading sound files (.mp3, .wma, .dat) is not allowed.



So I want a solution to this problem, I have heard about the FTP upload but
don't have much knowledge about it.



So can any one help me getting what is the way to use FTP upload method in
my code which allows me to upload files with large size and also sound files
and media files. If any other way through which I can achieve this.



Please suggest me a good method for this.



Thanks in advance



Vishal.
 
Ad

Advertisements

S

Steve C. Orr [MVP, MCSD]

You can add or modify the following section in your web.config file:

<configuration>
<system.web>
<httpRuntime maxRequestLength="4096" />
</system.web>
</configuration>

The above value (4096 KB) is the default maximum upload file size.
 
A

AFN

Why can't you upload MP3 or WMA files (assuming the size is small enough)?
This concerns me, because I need to do the same, just for audio files, soon.
 
K

Kyril Magnos

The solution has nothing to do with FTP or errors with media files of any
type. It has to do with ASP.NET's built in upload limit.

http://www.tek-tips.com/gfaqs.cfm/lev2/4/lev3/31/pid/855/fid/3217

--
HTH

Kyril Magnos
"I'm not a developer anymore, I'm a software engineer now!" :)

| Why can't you upload MP3 or WMA files (assuming the size is small enough)?
| This concerns me, because I need to do the same, just for audio files,
soon.
|
|
| | > Hello all,
| >
| >
| >
| > In my ASP.Net , C# web Application I have used the traditional upload
code
| > i.e. HTTP Method and it works fine for files and images up to 5 MB but
| once
| > the size of file is more than 5 MB it gives a error mostly time out
error
| > and also uploading sound files (.mp3, .wma, .dat) is not allowed.
| >
| >
| >
| > So I want a solution to this problem, I have heard about the FTP upload
| but
| > don't have much knowledge about it.
| >
| >
| >
| > So can any one help me getting what is the way to use FTP upload method
in
| > my code which allows me to upload files with large size and also sound
| files
| > and media files. If any other way through which I can achieve this.
| >
| >
| >
| > Please suggest me a good method for this.
| >
| >
| >
| > Thanks in advance
| >
| >
| >
| > Vishal.
| >
| >
| >
| >
|
|
 
Ad

Advertisements

V

vkumbhojkar

hi vishal,
you can use WININET functions in your application and create a small componennt.
Example is:
[DllImport("wininet.dll",SetLastError=true,EntryPoint="FtpPutFile")]
private static extern bool FtpPutFile( int hConnect,string lpszLocalFile,string lpszNewRemoteFile,int dwFlags,int dwContext);

first create connection then call this method and close connection.
Happy Coding :)

Vivek Kumbhojkar


**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top