Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7494311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:27:44+00:00 2026-05-29T17:27:44+00:00

I have been trying to send a big attachment (9 MB) using C# ASP.NET

  • 0

I have been trying to send a big attachment (9 MB) using C# ASP.NET 3.5 System.Net.Mail. I read that .NET 4.0 had a bug which doesn’t allow this, but .NET 3.5 is fine.
.NET 4.0 Fails When sending emails with attachments larger than 3MB

Since .NET 3.5 doesn’t close the session properly after an email is sent, I added this line before it’s sent:

    smtpClient.ServicePoint.MaxIdleTime = 2; 

The line

    smtpClient.Send(email);

is still throwing this error:

    Exceeded storage allocation. The server response was: 5.3.4 Error: message file   too big:   
    at System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)
    at System.Net.Mail.DataStopCommand.Send(SmtpConnection conn)
    at System.Net.Mail.SmtpConnection.OnClose(Object sender, EventArgs args)
    at System.Net.ClosableStream.Close()
    at System.Net.Mail.MailWriter.Close()
    at System.Net.Mail.SmtpClient.Send(MailMessage message)

Changing the encoding doesn’t help. This corrupts the attachment:

    email.Attachments[0].TransferEncoding = System.Net.Mime.TransferEncoding.SevenBit;

Could someone please help? Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T17:27:46+00:00Added an answer on May 29, 2026 at 5:27 pm

    The server response was: 5.3.4 Error: message file too big:

    That tells you everything you need to know: The Server dissallows sending attachments of that size. There’s nothing wrong with your code, at least not because of a bug in .NET or something like that. The error message you link related to a bug in .NET is very different from what you are getting. It’s unrelated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been struggling with trying to send an email with an attachment using
I have been trying to send out html emails through a PHP mail script
I have been trying to create beta invites that each existing user can send
I have been trying to send xml message from php to asp and output
I have been trying to encrypt soap message and send to the server, so
I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL,
I have been trying to read a picture saved in Access DB as a
I have been trying to make a case for using Python at my work.
I have been trying to send an email by C#. I have Googled for
I have been trying to find out if MSbuild can send an email to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.