Nir
Nir

Reputation: 2629

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>

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

Upvotes: 7

Views: 8798

Answers (2)

Nir
Nir

Reputation: 2629

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>

Upvotes: 5

neeebzz
neeebzz

Reputation: 11538

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/*" .

Upvotes: -1

Related Questions