简体   繁体   中英

iis7 hiddensegment bin folder

I just recently moved from a 2003 server to server 2008. I have a clickonce application that is structured like so

/{version_of_app}/*.application

/{version_of_app}/bin/ (the binary files renamed to .deploy)

Now with IIS7 i get 404's hitting the bin folder because of the hiddenSegment feature in iis7. Is there anyway i can keep that hiddenSegment feature(as i think it's a good thing) but also keep my ClickOnce folder structure in-tact? It's going to be a process redoing the manifest and application files for each of the supported versions of the application which i'd rather put off for a bit.

Moving forward i am willing to not use 'bin' in my clickonce folder structure. ;)

I tried this but it doesn't seem to be working

    <location path="bin" allowOverride="false">
  <system.web>
   <authorization>
    <deny users="*" />
    <deny users="?" />
   </authorization>
  </system.web>
</location>

You should be able to modify the web.config in your application and add:

<location path="bin">
    <system.webServer>
        <security>
            <requestFiltering>
                <hiddenSegments>
                    <remove segment="bin" />
                </hiddenSegments>
            </requestFiltering>
        </security>
    </system.webServer>
</location>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM