I have a question on a sample of location element inside web.config:
<configuration>
<location path="UploadPage.aspx">
<system.web>
<httpRuntime maxRequestLength="128"/>
</system.web>
</location>
</configuration>
The UploadPage.aspx refer to www.mysite.com/UploadPage.aspx or any file that called UploadPage.aspx inside my site? Can I write path="~/UploadTool/UploadPage.aspx" ? What if I want that this rule will be refer to any file that named UploadPage.aspx
Use the location element in the Web.web> element and other configuration elements exactly as you use them in the Web. config file. The path attribute of the <location> element specifies the virtual directory or the file name where the location configuration items apply.
The configuration files for IIS 7 and later are located in your %WinDir%\System32\Inetsrv\Config folder, and the primary configuration files are: ApplicationHost.config - This configuration file stores the settings for all your Web sites and applications.
config file is located in the %SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG\ folder. The default settings that are contained in the Machine.
Well, "/path" doesnt work you need to put ~/ at the beginning also /* at the end also works
here is an example
<location path="~/upload-cs/Upload.aspx">
<system.web>
<httpRuntime maxRequestLength="5378" executionTimeout="300" />
</system.web>
</location>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With