Monday, August 25, 2014

How to restrict the '/_layouts/viewlsts.aspx' page from anonymous users or from specified users in SharePoint 2010

Add below specified location section in web.config at path:

 

C:\inetpub\wwwroot\wss\VirtualDirectories\1234\web.config

 

<location path="_layouts/viewlsts.aspx">

            <system.web>

                  <authorization>

                       <allow users="domainname\user1,domainname\user2"/>

                        <deny users="?" />

                        <deny users="*" />

                  </authorization>

            </system.web>

      </location>

 

 

 

 

if you want to apply settings on all web application/site collection then :

 

Create an xml file  as below:

 

<?xml version="1.0" encoding="utf-8" ?>

<actions>

 

  <add path="configuration">

    <location path="_layouts">

      <system.web>

        <authorization>

          <deny users="?" />

        </authorization>

      </system.web>

    </location>

 

    <location path="_vti_bin">

      <system.web>

        <authorization>

          <deny users="?" />

        </authorization>

      </system.web>

    </location>

 

    <location path="_layouts/login.aspx">

      <system.web>

        <authorization>

          <allow users="?" />

        </authorization>

      </system.web>

    </location>

 

    <location path="_layouts/error.aspx">

      <system.web>

        <authorization>

          <allow users="?" />

        </authorization>

      </system.web>

    </location>

 

    <location path="_layouts/accessdenied.aspx">

      <system.web>

        <authorization>

          <allow users="?" />

        </authorization>

      </system.web>

    </location>

 

 

  </add>

</actions>

 

 

After creating a file that contains XML statements similar to above, you would save the file in the \Config directory with a name in the format webconfig. <name>.xml. To apply these changes to the farm, run the Stsadm copyappobincontent operation on each front-end Web server. For more information, see Copyappbincontent: Stsadm operation (Office SharePoint Server).

 

 

Reference Links:

http://technet.microsoft.com/en-us/library/ee191479(v=office.12).aspx

http://msdn.microsoft.com/en-us/library/acsd09b0(v=vs.71).aspx

http://msdn.microsoft.com/en-us/library/8aeskccd(v=vs.71).aspx

Locking down Office SharePoint Server sites

http://www.c-sharpcorner.com/uploadfile/Roji.Joy/how-to-secure-external-anonymous-access-to-sharepoint-2010-sites/

 

No comments:

Post a Comment