Overview
This article describes the issue and its resolution when the following error is displayed while loading the web interface of GFI Archiver:
  Server Error in '/Archiver' Application.
  Configuration Error
  Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
  Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.
  Source Error:
  Line 274: <profile>
  Line 275: <providers>
  Line 276: <add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/"
  Line 277: type="System.Web.Profile.SqlProfileProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  Line 278: </providers>
  Line 279: </profile>
  Source File: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Config\web.config
  Line: 277 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
The debug log ..\Archiver\ASPNET\UI\DebugLogs\UserProfileHelper.log reads:
  2013-05-28,13:44:50,192,1,"#00001BD0","#0000000D","info   ","UserProfileHelper","Could not get LastMailArchiverIAccessed from profile, Details:System.Configuration.ConfigurationErrorsException: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty. (C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Config\machine.config line 277) ---> System.Configuration.Provider.ProviderException: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.
  ;   at System.Web.Util.SecUtility.GetConnectionString(NameValueCollection config)
  ;   at System.Web.Profile.SqlProfileProvider.Initialize(String name, NameValueCollection config)
  ;   at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
  ;   --- End of inner exception stack trace ---
  ;   at System.Web.Profile.ProfileBase.InitializeStatic()
  ;   at System.Web.Profile.ProfileBase.Create(String username, Boolean isAuthenticated)
  ;   at System.Web.HttpContext.get_Profile()
  ;   at MArc.Web.UserProfileHelper.GetLastMailArchiverIAccessed()"
Environment
- GFI Archiver
- Windows Server 2003
Root Cause
Internet Information Services (IIS) is configured in a conflicting way.
Resolution
Note: This procedure requires to edit files manually. If edited incorrectly it can leave the server in a non-operational state. Please keep backups of any file which is edited throughout this article before saving any changes to them.
- Open the folder: ..\Archiver\ASPNET\UI
- Open web.config in Notepad.
- Find the section which reads:
 <profile defaultProvider="MyProvider"> 
 <providers>
 <add name="MyProvider" type="MarProvider.MArcProfileProvider" profileStorePath="" />
 </providers>
- Add the following line to the <providers>section:<remove name="AspNetSqlProfileProvider" />
 The result should look like:
 <profile defaultProvider="MyProvider"> 
 <providers>
 <add name="MyProvider" type="MarProvider.MArcProfileProvider" profileStorePath="" /> <remove name="AspNetSqlProfileProvider" />
 </providers>
- Save the file.
Note: When upgrading to a newer version of GFI Archiver, installation files mentioned in this procedure will be overwritten with default versions making the changes void and ineffective. It is therefore suggested to keep a record of this procedure and follow it once again directly after upgrading to keep this functionality intact.
Priyanka Bhotika
Comments