web.config elements

Apr 10, 2010 at 10:58 PM

I just installed the version to a Windows Server 2008 R2 virtual machine with a stand-alone WSS 3.0. The install was successful, but only the SafeControls section was added to the web.config, the appSettings and the expression builder not.

Just for reference, I found these config items needed for Language Store:

			<SafeControl Assembly="COB.SharePoint.Utilities.LanguageStore, Version=, Culture=neutral, PublicKeyToken=23afbf06fd91fa64" Namespace="COB.SharePoint.Utilities" TypeName="*" Safe="True" />
				<add assembly="COB.SharePoint.Utilities.LanguageStore, Version=, Culture=neutral, PublicKeyToken=23afbf06fd91fa64" />

				<add expressionPrefix="SPLangStore" type="COB.SharePoint.Utilities.LangStoreExpressionBuilder, COB.SharePoint.Utilities.LanguageStore, Version=, Culture=neutral, PublicKeyToken=23afbf06fd91fa64" />
		<!-- these values should be customized -->
      		<add key="LanguageStoreSiteUrl" value="http://sharepoint.test.local" />
      		<add key="LanguageStoreDefaultLanguage" value="EN" />
      		<add key="LanguageStoreCacheDependencyFile" value="c:\inetpub\wwwroot\wss\VirtualDirectories\sharepoint.test.local80\LanguageStoreCacheDependency.txt" />
      		<add key="LanguageStoreWebName" value="" />
      		<add key="LanguageStoreListName" value="Language Store" />            

As far as I can see compilation/assemblies is not created by LanguageStoreFeatureReceiver, but without that I was getting "error CS0103: The name 'COB' does not exist in the current context   at System.Web.Compilation.AssemblyBuilder.Compile()" error messages.

What do you recommend for the cache dependency location for a one-machine deployment? Should it under some temp directory, or can it be placed in teh virtual directory as above?

Zoltan Micskei

Apr 11, 2010 at 6:40 PM

Hi Zoltan,

Thanks for your comments, I definitely want to hear whenever I have something which isn't quite right :)

  • In the case of the compilation/assemblies node, I don't add this in the Feature receiver since some people seem to prefer to have these references in individual files (e.g. .aspx/.ascx). Effectively it's just like using any ASP.Net control - it's up to the implementor to decide. The documentation could be clearer on this though.
  • For a one-machine deployment the cache file can basically go anywhere. Personally I'd store it outside of the web root (as in your example), but I don' think there are any serious consequences of having it there.