views:

320

answers:

2

We have a .NET 2.0 application which we normally run on IIS6, and used to run fine on IIS7, but recently after installing SP1 for Vista IIS7 seems to be choking on a line in the Web.Config file:

<system.web AllowLocation="true">

Is it safe to remove the AllowLocation attribute? What does this attribute do?

A: 

Having this set to true should enable any <location> sections in your web.config, so you should be fine to remove it if there's none in there.

ironsam
Interestingly, we do have <location> sections in our Web.Config file, so I tried removing the tag and experienced no effect what-so-ever on the behavior of the application.
wweicker
A: 

From MSDN:

When set to false, the AllowLocation property indicates that the section is accessed by native-code readers. Therefore, the use of the location attribute is not allowed, because the native-code readers do not support the concept of location.

The default value is true, so you should be able to remove it with no effect on your application.

Raelshark
There was no effect on the application in either IIS6 or IIS7.
wweicker