style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">I
am starting a set of posts regarding the ability of SharePoint 2010 foundation
to be used to build Internet-facing web sites. In this one we are just going to
perform configuration and creation operations so as we can obtain a SharePoint
Foundation site collection that can be used to publish content on the Internet
and therefore, available for anonymous users.
style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px">Business
benefits - The "why" part of the post
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">In
SharePoint 2007 the Internet-facing publishing was rather based on the use of
the publishing part of SharePoint, its CMS.
However, the team sites that
were a part of the collaboration area of SharePoint 2007 are now with the new
wiki pages of SharePoint 2010 a way to help people to publish formal content.
The team sites are now described in the SharePoint 2010 documentation as a
solution to encourage one-to-many communication and also a solution to offer a
structured exchange of information.
Therefore the team sites of
SharePoint Foundation are now mature enough to be used as a base to build
Internet-facing web sites and are a new and more cost effective opportunity
offered by SharePoint 2010 to publish content on the Internet. The free
SharePoint Foundation team sites can be now seen as a severe competitor to the
licensed SharePoint CMS!
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">For
further information, see the Microsoft documentation:
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">href="http://msdn.microsoft.com/en-us/library/ee721051.aspx#section1">Comparison
of Enterprise Wikis with Team Sites
href="http://technet.microsoft.com/en-us/library/cc288638.aspx#Section2c">Plan
Internet presence sites (SharePoint 2010 Foundation)
And this
Ted Pattison's video:
href="http://msdn.microsoft.com/en-us/SP2010DevTrainingCourse_SitesasCollectionsofPages.aspx">Sites
as Collections of Pages
(See how Sites in SharePoint 2010 just become a
collection of pages. Unlike before pages now play a key role in the structure of
a site... )
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">
I have just found
elements of comparison when considering SharePoint Server 2010 Publishing Sites
vs. SharePoint Foundation 2010 Sites:
SharePoint Server 2010 Publishing
Sites vs. SharePoint Foundation 2010 Sites
After requirements gathering
is complete, first decide whether to base the website on Microsoft SharePoint
Foundation 2010, or on a server running Microsoft SharePoint Server 2010 with
the Publishing Features enabled. Publishing sites are built on SharePoint
Foundation, and there are many advantages to building engaging Internet-facing
websites with publishing sites. Some of the benefits of creating a brand with
SharePoint Server publishing sites and SharePoint Foundation sites include the
following:
Enables content authors to create webpages with a more robust
rich-text editing experience than SharePoint Foundation sites offer.
Includes master pages that target publishing sites and that use specific
code assemblies that take advantage of publishing Features.
Easier
control of web navigation from the web UI, and more options are available to the
designer.
Uses the Web UI to easily change a master page and to apply
master pages to all subsites below the current site.
Uses page layouts
to create templates at the page level. Uses text layouts to accomplish a form of
simple page layout. Text layouts are not configurable.
Use the $SPUrl
token to target HTML assets with URLs that are relative to either the site
collection ($SPUrl;~sitecollection/) or site root ($SPUrl:~site/)
source: href="http://msdn.microsoft.com/en-us/library/gg430141.aspx">Real World Branding
with SharePoint 2010 Publishing Sites
style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px">Audience
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">I
will avoid using development operations in this first post in order it can be
useful to system administrators. Of course it is also targetted for developers
so as they can configure their development machine, but they won't have to
launch Visual Studio here.
style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px">1
- Extending an existing SharePoint Foundation Web Application
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Assume
you have created a SharePoint Foundation web application using NTLM
authentication (that is the default mode).
Go to the SharePoint 2010 Central
Administration of your SharePoint Farm, click the "Manage web applications" link
then on the displayed list of the available
web application select the one you want to open to anonymous users.
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">The
buttons of the SharePoint 2010 ribbon are now usable, so click on
Extend.
The Extend pop-up appears.
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Type
the name of the new web application
Type 80 for port
Define a host
header
Select Allow Anonymous because we are planning anonymous access
For
the zone, choose Internet, because we plan to extend the existing web
application for an Internet access.
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">So
as you will obtain the following screen shots
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcHIs9uXTiGWQggVXSRrNurgGF8h6jM6Jn3PdI24fN_KU30TYd7EZJDdNwWuM-cHTapr4HT23eimWIwd7pZk_bt-5DtBNjQcESQr5MqifrE6hWRt-11KyYCv_Hi3IILtHq8sOicNhDJM9P/s1600/configuring+sharepoint+foundation+for+Internet+facing+-+010+-+Extending+the+web+application+1.jpg">style="WIDTH: 320px; HEIGHT: 154px; CURSOR: hand"
id=BLOGGER_PHOTO_ID_5666739129036206162 border=0 alt=""
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcHIs9uXTiGWQggVXSRrNurgGF8h6jM6Jn3PdI24fN_KU30TYd7EZJDdNwWuM-cHTapr4HT23eimWIwd7pZk_bt-5DtBNjQcESQr5MqifrE6hWRt-11KyYCv_Hi3IILtHq8sOicNhDJM9P/s320/configuring+sharepoint+foundation+for+Internet+facing+-+010+-+Extending+the+web+application+1.jpg">
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-gR36Wzww-sfCBYVoXT2rpwg_qWFFFHhz6X0BbQyRQT-qezoaQYnnTCVjduHSjHauIGhan-_trAeuvXF6oeKEUukmgPxLd7sk3Wkbj93tCydKUsjRRYhH5UPNCyCvyaErCsU5Ll3Arcx8/s1600/configuring+sharepoint+foundation+for+Internet+facing+-+020+-+Extending+the+web+application+2.jpg">style="WIDTH: 320px; HEIGHT: 154px; CURSOR: hand"
id=BLOGGER_PHOTO_ID_5666739124739848914 border=0 alt=""
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-gR36Wzww-sfCBYVoXT2rpwg_qWFFFHhz6X0BbQyRQT-qezoaQYnnTCVjduHSjHauIGhan-_trAeuvXF6oeKEUukmgPxLd7sk3Wkbj93tCydKUsjRRYhH5UPNCyCvyaErCsU5Ll3Arcx8/s320/configuring+sharepoint+foundation+for+Internet+facing+-+020+-+Extending+the+web+application+2.jpg">
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Then,
click the "OK" button to create the web application.
Nothing has
changed in the web application list, but if you navigate to the Alternate Access
Mappings page of the central administration (in the System Settings
section), then click on the "Edit Public Zone URLs" link and select the
extended web application you will notice taht the zone was properly created.
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi569XQ9PYPNbDMuz0n2la04gPD9qiGL2cLTpVx0lPoPEHUvigaopNnUKHFq1gGATo9koCn14ANty_ikT2XT5lnK0zG4z7a-Me136P4Ed8ihwhd6zWsAmoOTniQV87a8C-YgF4lnwFcy9zf/s1600/configuring+sharepoint+foundation+for+Internet+facing+-+030+-+alternate+access+mapping+_+edit+zone+ursl+_+Internet+zone+created.jpg">style="WIDTH: 320px; HEIGHT: 212px; CURSOR: hand"
id=BLOGGER_PHOTO_ID_5666739114760204386 border=0 alt=""
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi569XQ9PYPNbDMuz0n2la04gPD9qiGL2cLTpVx0lPoPEHUvigaopNnUKHFq1gGATo9koCn14ANty_ikT2XT5lnK0zG4z7a-Me136P4Ed8ihwhd6zWsAmoOTniQV87a8C-YgF4lnwFcy9zf/s320/configuring+sharepoint+foundation+for+Internet+facing+-+030+-+alternate+access+mapping+_+edit+zone+ursl+_+Internet+zone+created.jpg">
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">You
can also check in IIS7 that the IIS web site for the Internet zone is now
available
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEyoZpVUi3IsHwcsRNTKlFvM2omUdSMKDLhBAA-02WwP2IwqA_vwmgCpYT2UOsC1t5-7uYLbRwC8bZ82_mcyduhude-m9MH_byXIG6DNHAfKP4NGNUGkgTzn7bsVjMXPU9W5bCgqdtgcI5/s1600/configuring+sharepoint+foundation+for+Internet+facing+-+040+-+IIS7+_++Internet+zone+IIS+web+site+created.jpg">style="WIDTH: 320px; HEIGHT: 151px; CURSOR: hand"
id=BLOGGER_PHOTO_ID_5666739108514598754 border=0 alt=""
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEyoZpVUi3IsHwcsRNTKlFvM2omUdSMKDLhBAA-02WwP2IwqA_vwmgCpYT2UOsC1t5-7uYLbRwC8bZ82_mcyduhude-m9MH_byXIG6DNHAfKP4NGNUGkgTzn7bsVjMXPU9W5bCgqdtgcI5/s320/configuring+sharepoint+foundation+for+Internet+facing+-+040+-+IIS7+_++Internet+zone+IIS+web+site+created.jpg">
style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px">2 -
Testing the anonymous acces
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">As
we have defined previously a custom host header for our Internet site we have to
modify the host file of our development machine in order to be able to acces the
site as an anonymous user.
So open the hosts file of your machine located at
:
C:\Windows\System32\drivers\etc
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">and
add the following entry:
127.0.0.1 www.mycompany.com
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Now
open a browser and browse to this url. You access your SharePoint team site as
an anonymous user and simulate an Internet acces.
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_FIbyIUe_Ya4EIyCTrWoppPaOt-NIrxzhutHgIH0A4NaexbWfCcnmiNhi33hWrzR7dILJC2gxsyHFNKOeIhG6tBSHYDX_RFSh7OhB9dtL0ZEXoQ_o_k0_TEhuBbOA2nriKD0TEhizC5-y/s1600/configuring+sharepoint+foundation+for+Internet+facing+-+050+-++accessing+sharepoint+foundation+team+site+through+the+Internet.jpg">style="WIDTH: 320px; HEIGHT: 152px; CURSOR: hand"
id=BLOGGER_PHOTO_ID_5666761106370893106 border=0 alt=""
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_FIbyIUe_Ya4EIyCTrWoppPaOt-NIrxzhutHgIH0A4NaexbWfCcnmiNhi33hWrzR7dILJC2gxsyHFNKOeIhG6tBSHYDX_RFSh7OhB9dtL0ZEXoQ_o_k0_TEhuBbOA2nriKD0TEhizC5-y/s320/configuring+sharepoint+foundation+for+Internet+facing+-+050+-++accessing+sharepoint+foundation+team+site+through+the+Internet.jpg">
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">if
you cannot access to the site with an anonymous access, browse to the
http://www.mycompany.com/_layouts/setanon.aspx page, you will be prompted for
authentication, use the site coll administrator to authenticate in NTLM mode,
switch anonymous access to Entire site, click OK (in the screen shot, url is
wrong, sorry).
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTpoOLert4dH_a_pT0jYh_PrdkC2tHzxSGp3ny_QNygpsnpkRrFUDMN-0kaO6ZhS7qQt5RU59gIQjRqfy4zWqnbIRcxsz3nc8Hi3woqQVMNlYbx-dxijHO1ZAl8e9jgr0xG_vYjMrNMVBc/s1600/configuring+sharepoint+foundation+for+Internet+facing+-+060+-++disabling+reenabling+anonymous+access.jpg">style="WIDTH: 320px; HEIGHT: 157px; CURSOR: hand"
id=BLOGGER_PHOTO_ID_5666827519415665938 border=0 alt=""
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTpoOLert4dH_a_pT0jYh_PrdkC2tHzxSGp3ny_QNygpsnpkRrFUDMN-0kaO6ZhS7qQt5RU59gIQjRqfy4zWqnbIRcxsz3nc8Hi3woqQVMNlYbx-dxijHO1ZAl8e9jgr0xG_vYjMrNMVBc/s320/configuring+sharepoint+foundation+for+Internet+facing+-+060+-++disabling+reenabling+anonymous+access.jpg">
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">If
you select Lists and libraries, anonymous users will be able to view items only
for those lists and libraries that have enabled permissions for anonymous users.
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNi8EWXSkQiA10_Wak20FUZ3Zxdx1aZDdQ-kowozX_kX6tImyL3zakryWGWbUE4uoq-41igkZaUhSwQogZf0cMwkJAb3Hsvp_YLNC-xjefzWcSc_RH3BdsztBmY516TJSJLPFfZnXtHM24/s1600/configuring+sharepoint+foundation+for+Internet+facing+-+061+-++giving+specific+permissions+to+anonymous+access.jpg">style="WIDTH: 320px; HEIGHT: 202px; CURSOR: hand"
id=BLOGGER_PHOTO_ID_5666868492816238834 border=0 alt=""
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNi8EWXSkQiA10_Wak20FUZ3Zxdx1aZDdQ-kowozX_kX6tImyL3zakryWGWbUE4uoq-41igkZaUhSwQogZf0cMwkJAb3Hsvp_YLNC-xjefzWcSc_RH3BdsztBmY516TJSJLPFfZnXtHM24/s320/configuring+sharepoint+foundation+for+Internet+facing+-+061+-++giving+specific+permissions+to+anonymous+access.jpg">
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">However
how interesting this option is, it will force administrator to break inheritance
for each lists for those they want to grant access for anonymous
users. You will also notice that for those lists, the SharePoint Forms pages are
also accessible to anonymous users. For example, if you grant access to
anonymous users for the site pages library of a Foundation team site, anonymous
users might be able to get to http://www.mycompany.com/SitePages/Forms/AllPages.aspx.
Typically
you don't want this, so how do you prevent anonymous users from accessing these
pages?
In SharePoint Server, where the publishing features
are available we would activate the lockdown feature especially
provided by Microsoft for avoiding this problem.
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">By
the way, It is amazing to think to activate
within SharePoint Foundation the lockdown feature which was formerly
reserved to the SharePoint CMS .
Yes and no.
Now the team sites must be
seen as a collection of pages. They get closer to the SharePoint CMS a lot.
On this subject you should watch the href="http://msdn.microsoft.com/en-us/SP2010DevTrainingCourse_SitesasCollectionsofPages.aspx">Ted
Pattison's video (See how Sites in SharePoint 2010 just become a collection
of pages. Unlike before pages now play a key role in the structure of a site.).
style="COLOR: red">Updated 2011 october 26th
style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px">3 -
An alternative to the lockdown Feature
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Unfortunately,
this feature is not available for SharePoint foundation. So I made an adaptation
for WSS 3.0 and SharePoint Foudation 2010 that you can download as a SharePoint
solution (.wsp) on Codeplex:
Custom lockdown feature for wss
3.0 and SharePoint 2010 Foundation
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">If
you want to use it, download the .wsp and deploy it. It will be globally
deployed anyway because the feature handler .dll will be placed in the
GAC.
Then you should not need to install the feature because it will be
automatically installed at deployment time, but if the automatic
installation had failled, you could install it by excuting this within a
command prompt:
stsadm -o installfeature -name viewformpageslockdowncustom
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">then
activate the feature for your site collection with this other instruction:
stsadm -o activatefeature -name viewformpageslockdowncustom -url
http://www.mycompany.com
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">But,
beacause we already have anonymous access enabled, we need to go disable
it, then enable it again. Go to the _layouts/setanon.aspx page, switch anonymous
access off, click OK, then go back and set it to entire site, then click OK.
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Anonymous
users should now get an authentication prompt when they try to navigate to a
forms page. For example, http://www.mycompany.com/SitePages/Forms/AllPages.aspx.
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGUa4uUsTMA9ggM_CJWplHNkrlFhRyJO7Y915F8kYu4Yqx-GlpJLMr3BJINcj1tr_AsxZ3lG_Me0mKZpHTeMTvWYCYwzGan1YhQJklCs_JUWAi-xtB9nh8Fgo8wYiDVK6wUWJG2sXwoz3T/s1600/configuring+sharepoint+foundation+for+Internet+facing+-+070+-++Locdown+feature+enabled.jpg">style="WIDTH: 320px; HEIGHT: 153px; CURSOR: hand"
id=BLOGGER_PHOTO_ID_5666827513434902882 border=0 alt=""
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGUa4uUsTMA9ggM_CJWplHNkrlFhRyJO7Y915F8kYu4Yqx-GlpJLMr3BJINcj1tr_AsxZ3lG_Me0mKZpHTeMTvWYCYwzGan1YhQJklCs_JUWAi-xtB9nh8Fgo8wYiDVK6wUWJG2sXwoz3T/s320/configuring+sharepoint+foundation+for+Internet+facing+-+070+-++Locdown+feature+enabled.jpg">
style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px">4 -
Setting custom error page for error 401 (forbidden) within Sharepoint 2010
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">(The
following section is dedicated to Sharepoint 2010 since you will not find the
following xml tags in the web.config of wss 3.0.)
Now we are going to do
an amazing thing. We are going to change the web.config file of the web
application corresponding to the Internet access so as anonymous user won't
be prompted anymore for authentication if they try to acces to an unauthorized
url but be redirected on a custom 401 error page within the site.
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">So
first go to your site with at least contributor permissions by using NTLM access
and create a custom 401 error page in the site pages library of your site.
Assume we call it unauthorized so as its url will be href="http://www.mycompany.com/sitepages/unauthorized.aspx">http://www.mycompany.com/sitepages/unauthorized.aspx.
Type a meessage of access denied and save the page.
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Then, open
the web.config file of the Internet zone web application and locate the handlers
end tag within the system.webSever and paste the following httpErrors
sequence.
</handlers>
<httpErrors errorMode="Custom"
existingResponse="Auto">
<remove statusCode="401"
/>
<error statusCode="401" prefixLanguageFilePath=""
path="/sitepages/unauthorized.aspx" responseMode="ExecuteURL"
/>
</httpErrors>
color=#c0c0c0> </system.webServer>
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px"> After
restarting your application pool by reloading a page of your site with anonymous
acces, you will notice an amazing thing: each time an anonymous user will try to
access to a non authorized ressource, instead of being prompted for an NTLM
authentification, he will be redirected to the custom 401 error page of your
site and he will still have your site navigation links available and be
able to keep browsing.
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">And
the most amazing is you will have the same result while clicking the sign in
link.
So of course don't do that if you plan to use an Internet access for
contributing on your site or for administrating it...
And don't forget
that this will have an impact on the whole web application since we have
modified the web.config, so it won't be possible to obtain a different behaviour
for another site collection within this web application.
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px"> The
next screen shot show my 401 unauthorized custom error page after having clicked
the Sign in link.
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY53yApJZC95_Mor5CIgudvS4OqNHyTcU-MXpuckO2_wrxpQzKfUI_DAIjfdoAHu5C05woO40Y1vhyphenhyphenTg644SwH7RqTjmAKrOzatLLGx-cOXFnssLmBT-L1XstgqntLqAPUsH7CkLd7Ctcy/s1600/configuring+sharepoint+foundation+for+Internet+facing+-+080+-++401+unauthorized+custom+error+page+after+having+clicked+the+sign+in+link+.jpg">
id=BLOGGER_PHOTO_ID_5666827515542953874 border=0 alt=""
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY53yApJZC95_Mor5CIgudvS4OqNHyTcU-MXpuckO2_wrxpQzKfUI_DAIjfdoAHu5C05woO40Y1vhyphenhyphenTg644SwH7RqTjmAKrOzatLLGx-cOXFnssLmBT-L1XstgqntLqAPUsH7CkLd7Ctcy/s320/configuring+sharepoint+foundation+for+Internet+facing+-+080+-++401+unauthorized+custom+error+page+after+having+clicked+the+sign+in+link+.jpg">
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">It
is all that we can do for now by just performing configuration operations.
Of course, don't forget to modify the navigation within the SharePoint 2010
UI to hide all the links that could lead to an access denied for anonymous
users. In short, you should let only the links pointing on a subsite, a Site
Page or a specific document.
In the next post, we are going to use
Visual Studio to start customizing our site...
style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px">5 -
Aknowledgements
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Thanks
to :
href="http://www.ngpixel.com/2010/12/23/sharepoint-2010-custom-error-pages/">Nick
whose article helped me for custom errors, I have just noticed that he also
lives and works in Montreal...
href="http://blogs.msdn.com/b/ecm/archive/2007/05/12/anonymous-users-forms-pages-and-the-lockdown-feature.aspx">Tyler
Butler of the ECM team blog who was by his publications of a big help in the
realization of my projects for the internet and who made me discover the
existence of the lockdown feature...
Ted Pattison for his href="http://msdn.microsoft.com/en-us/SP2010DevTrainingCourse_SitesasCollectionsofPages.aspx">video
which opens many new horizons regarding the use of SharePoint 2010. I will
publish more about it someday...
style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">