Introduction

EPiServer includes a number of Web services (see EPiServer.WebServices) that makes it possible to retrieve, add, delete and search information from the EPiServer site. This "How To" describes how to reference a Web service from Visual Studio.

web.config settings

By default the EPiServer site is configured to use Forms authentication. Visual Studio however does not support adding a reference to a Web service with Forms authentication. To setup a reference to a Web service the suggested approach is to change the web.config setting

  <authentication mode="Forms">

      <forms name=".EPiServerLogin" loginUrl="Util/login.aspx" timeout="120"/>     

  </authentication>

with the setting

   

  <authentication mode="Windows"/>

Another alternative (not recommended for security reasons) is to remove

  <deny users="*"/>

from the section

  <location path="WebServices">

After the reference is added to the Visual Studio project the web.config settings can be restored to what they were before.

Additional Information

If the site is to be used with Forms authentication together with Web services there needs to be some additional configuration since ASP.NET does not support that a site uses mixed authentication mode (e.g. Forms and Windows). The configuration for this can be found in document Web Services in Web Services.