Submit larger asp.net attachments

I developed one Windows-based application (on the desktop) that sends PDFs as attachments. The pds size can vary from 40 KB to 10-15 MB. But when I send a PDF of more than 2.5 MB, the file never reaches the destination.

I'm trying to send a file to our intranet, as well as a popular internet address (like gmail, yahoo), but no luck!

I also crossed myself on an SMTP server. There were no such restrictions.

My code is in Asp.net 2.0 and C #.

let me know if more details are required.

thanks a ton!

+3
source share
2 answers

Try using the code below

The value of SmtpClient.Timeout.

the default value is 100 seconds = 100000.

http://forums.asp.net/t/1402417.aspx/1

+1

ASP.net , 4 . , -. httpRuntime, -.

, 8 .

<system.web>
    <httpRuntime maxRequestLength="8192"/>
</system.web>

. http://msdn.microsoft.com/en-us/library/e1f13641.aspx .

0

All Articles