PDA

View Full Version : Machine.Config and Web.config


msword
01-30-2004, 10:11 AM
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

bruce
01-30-2004, 11:01 AM
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


[b]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">

bruce
02-03-2004, 06:41 AM
u have a sample that i can test?

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

[b]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">

msword
02-03-2004, 07:36 AM
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[?]

bruce
02-16-2004, 03:03 AM
If max size is reached, you will get a different error.

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


[b]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">

steelcastco
02-16-2004, 10:02 AM
I am having the same issue even after increasing the size in the webconfig.

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