Machine.Config and Web.config

Discussion in 'ASP.NET / ASP.NET Core' started by msword, Jan 30, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Currently I'm uploading files to my web dir, but I'm having a problem uploading files larger than 4mb. Is there anyway to over come this?
    does anyone know what the machine.config file is set at? by default it's set at 4mb, so no matter what I do in the web.config file I wont be able to override default machine.webconfig right?

    this is what I got from The Microsoft support site
    RESOLUTION
    To resolve this problem, use one of the following methods:

    In the Machine.config file, change the maxRequestLength attribute of the <httpRuntime> configuration section to a larger value. This change affects the whole computer.
    In the Web.config file, override the value of maxRequestLength for the application. For example, the following entry in Web.config allows files that are less than or equal to 8 megabytes (MB) to be uploaded:<httpRuntime maxRequestLength="8192" />

    TechnicalLy i could load 8 meg files, but it wont do it. Has anybody incountered this issue?
    thanks
    Matt
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Matt

    Your setting in the web.config should override the machine config's setting.

    See this KB article,

    http://kb.discountasp.net/article.aspx?id=10036


    quote:Originally posted by msword

    Currently I'm uploading files to my web dir, but I'm having a problem uploading files larger than 4mb. Is there anyway to over come this?
    does anyone know what the machine.config file is set at? by default it's set at 4mb, so no matter what I do in the web.config file I wont be able to override default machine.webconfig right?

    this is what I got from The Microsoft support site
    RESOLUTION
    To resolve this problem, use one of the following methods:

    In the Machine.config file, change the maxRequestLength attribute of the <httpRuntime> configuration section to a larger value. This change affects the whole computer.
    In the Web.config file, override the value of maxRequestLength for the application. For example, the following entry in Web.config allows files that are less than or equal to 8 megabytes (MB) to be uploaded:<httpRuntime maxRequestLength="8192" />

    TechnicalLy i could load 8 meg files, but it wont do it. Has anybody incountered this issue?
    thanks
    Matt

    </blockquote id="quote"></font id="quote">
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    u have a sample that i can test?

    i can bring this to the sa once i confirm it.

    quote:Originally posted by msword

    My webconfig is set up like the example you provided, but it still doesnt do anything.
    it acts like it copys it, but then when I view the document it's 0kb (empty).

    I cant figure out why it pukes with documents over 5mb[?]
    </blockquote id="quote"></font id="quote">
     
  4. My webconfig is set up like the example you provided, but it still doesnt do anything.
    it acts like it copys it, but then when I view the document it's 0kb (empty).

    I cant figure out why it pukes with documents over 5mb[?]
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    If max size is reached, you will get a different error.

    You should try increase your http request timeout in your web.config file.


    quote:Originally posted by steelcastco

    I am having the same issue even after increasing the size in the webconfig.

    "System.Web.HttpException: Request timed out."

    </blockquote id="quote"></font id="quote">
     
  6. I am having the same issue even after increasing the size in the webconfig.

    "System.Web.HttpException: Request timed out."
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page