web.config location element settings
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>
T开发者_StackOverflow中文版he 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
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>
I don't think it's possible to apply it in such a manner.
However you can put all your Uploading Page pages in a single folder and then specify the path location path "/AllMyUploads/*"
.
精彩评论