Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Maximum Attachment Size

Maximum Attachment Size

Scheduled Pinned Locked Moved ASP.NET
visual-studiocsharpquestion
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    happyheartcs
    wrote on last edited by
    #1

    Hi Everyody, I want to know what determines the maximum attachment size in an ASP2 web application. I send an email from a web application & the attachment is about 2 MB. Whenever I try to send it from the Visual Studio 2005 project,it takes much time then gives me an exception saying that it couldn't be sent & timed out. It works normally in the VS 2003 application. Any Clue?? Thnx a lot

    R 1 Reply Last reply
    0
    • H happyheartcs

      Hi Everyody, I want to know what determines the maximum attachment size in an ASP2 web application. I send an email from a web application & the attachment is about 2 MB. Whenever I try to send it from the Visual Studio 2005 project,it takes much time then gives me an exception saying that it couldn't be sent & timed out. It works normally in the VS 2003 application. Any Clue?? Thnx a lot

      R Offline
      R Offline
      robert110
      wrote on last edited by
      #2

      Not sure if you are trying to attach the file from a web interface or if the file is located on the server. If you are having the user upload the file as attachment then you might have to override the httpRuntime's maxRequestLength value in the web.config file. By default ASP.NET only allows files with size 4MB [4096 KB] or less to be uploaded but you can change it like this: <httpRuntime maxRequestLength="8192" />

      H 1 Reply Last reply
      0
      • R robert110

        Not sure if you are trying to attach the file from a web interface or if the file is located on the server. If you are having the user upload the file as attachment then you might have to override the httpRuntime's maxRequestLength value in the web.config file. By default ASP.NET only allows files with size 4MB [4096 KB] or less to be uploaded but you can change it like this: <httpRuntime maxRequestLength="8192" />

        H Offline
        H Offline
        happyheartcs
        wrote on last edited by
        #3

        Thanks a lot for your response..Actually the file is located on the server. Is there anything else I should change??

        R 1 Reply Last reply
        0
        • H happyheartcs

          Thanks a lot for your response..Actually the file is located on the server. Is there anything else I should change??

          R Offline
          R Offline
          robert110
          wrote on last edited by
          #4

          If file is located on the server then I would first check for common things like for instance if the file is locked or not, read access, other error handling code that might cause an infinite loop etc. Post your code so we can see exactly how you are trying to attach the file. Thanks. HTH Robert

          H 1 Reply Last reply
          0
          • R robert110

            If file is located on the server then I would first check for common things like for instance if the file is locked or not, read access, other error handling code that might cause an infinite loop etc. Post your code so we can see exactly how you are trying to attach the file. Thanks. HTH Robert

            H Offline
            H Offline
            happyheartcs
            wrote on last edited by
            #5

            Thanks again Robert. Actually I create a PDF file in the code,the file is placed on the server but after it is created,it's added automatically to source control..This doesn't happen in VS 2003 though I didn't change anything when converting the project to VS 2005 so I just want to remove a specific folder in the project from the source conttrol (Visual Source Safe) How can I do that??

            R 1 Reply Last reply
            0
            • H happyheartcs

              Thanks again Robert. Actually I create a PDF file in the code,the file is placed on the server but after it is created,it's added automatically to source control..This doesn't happen in VS 2003 though I didn't change anything when converting the project to VS 2005 so I just want to remove a specific folder in the project from the source conttrol (Visual Source Safe) How can I do that??

              R Offline
              R Offline
              robert110
              wrote on last edited by
              #6

              You can do the following: Goto File > Source Control > Exclude "MyFileOrFolderName" from Source Control You can also exclude that folder from your VS2005 project if it is not directly used in the project that will also take care of the VSS problem. Hope that helps:) Robert

              H 1 Reply Last reply
              0
              • R robert110

                You can do the following: Goto File > Source Control > Exclude "MyFileOrFolderName" from Source Control You can also exclude that folder from your VS2005 project if it is not directly used in the project that will also take care of the VSS problem. Hope that helps:) Robert

                H Offline
                H Offline
                happyheartcs
                wrote on last edited by
                #7

                Thanks again Robert :)

                R 1 Reply Last reply
                0
                • H happyheartcs

                  Thanks again Robert :)

                  R Offline
                  R Offline
                  robert110
                  wrote on last edited by
                  #8

                  You are welcome, hope your problem is fixed:)

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups