Monday, July 7, 2008

Web.Config Code Snippets

I was going through some old projects yesterday and came across some interesting web.config settings that I thought would be a good read. So, without further ado, here are some useful code snippets.

 

Set The Upload File Size to 128KB for a Particular Page

1 <configuration>
2 <location path="myFileUploadPage.aspx">
3 <system.web>
4 <httpRuntime maxRequestLength="128"/>
5 </system.web>
6 </location>
7 </configuration>


Bringing an Application Offline


1 <configuration>
2 <system.web>
3 <httpRuntime enable="false" />
4 </system.web>
5 </configuration>

0 comments:

Video Bar

Loading...