What should be machine.config entries? - Facing Error: No provider of type <File> found. Check the server configuration or install the provider on the client.

Feb 18, 2011 at 3:07 AM


Hi,

I am installing the Codeplex RBS provider with SharePoint 2010. Everything goes fine, even the "$rbs.Migrate()" takes all the documents to the file share. When I try to add document through SharePoint 2010 UI to the site, it fails with an error similar to one posted here: http://sqlrbs.codeplex.com/discussions/205280.

However, the solution above doesn't help me as I tried combinations in configuration file but no luck.

My SharePoint Log says:

Exception thrown storing stream in new SqlRemoteBlob: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Data.SqlRemoteBlobs.RemoteBlobConfigurationException: No provider of type <File> found. Check the server configuration or install the provider on the client.   
at Microsoft.Data.SqlRemoteBlobs.ProviderSession.Connect()   
at Microsoft.Data.SqlRemoteBlobs.RemoteBlobCommand.ExecuteInternal()   
at Microsoft.Data.SqlRemoteBlobs.RemoteBlobCommand.Execute()   
at Microsoft.Data.SqlRemoteBlobs.SqlRemoteBlob.WriteFromStream(Stream inStream)  ExceptionType:      Configuration ExceptionCode:      ProviderInterfaceNotFound Request Information not set. Session Information not set. Provider Session Information: Provider Session Info: ProviderSession:         ProviderSession. Id: <7>, Name: , Type: , StoreVersion: <1.0.0.0>, Location: <\\my-server\RBS_Share\WSS_Content_80>  Extended Configuration:          -
-- End of inner exception stack trace ---   
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)   
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)   
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)   
at Microsoft.SharePoint.RBSWrapper.SqlRemoteBlob.WriteFromStream(Stream stream)   
at Microsoft.SharePoint.SqlRemoteBlobSession.StoreStreamInBlob(Int32 collectionId, String providerName, Stream stream)

The problem I think is that, the machine.config is never updated in the installation process. It seems as if installer is not adding configurations to machine.config at all. Please tell me what should go in machine.config. Am I wrong if I am looking at machine.config located at "C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG" path?

Moreover, can anyone point out the location in code where the machine.config file is being updated? I can see the Removal of configurations (as below) in but NOT the insertion.

		
	 void RemoveProviderConfiguration(string providerTypeName)
 	       {
		.............
		// Remove the document from the .NET configuration
                        //
                        Configuration config = ConfigurationManager.OpenMachineConfiguration();
                        BlobStoreConfiguration.RemoveBlobStore(config, s_ProviderTypeName.ToLowerInvariant());
                        config.Save();
 
Thanks in advance!!!
Mar 3, 2011 at 9:46 PM

I am also working on using this rbs provider. I am also running diffent issues however to answer your question;

Machine.config file should have something like this

<Providers>
   <file>
    <add key="EnumerationOptimizationLevelImplemented" value="1" />
    <add key="ConsistencyCheckLevelImplemented" value="1" />
    <add key="BlobStoreType" value="File" />
    <add key="DllFile" value="C:\Windows\assembly\GAC_MSIL\Microsoft.Data.BlobStores.FileBlobStore\10.0.0.0__f429ee06e80a9fba\Microsoft.Data.BlobStores.FileBlobStore.dll" />
    <add key="ClassName" value="Microsoft.Data.BlobStores.FileBlobStore.FileStoreLibrary" />
    <add key="ProviderVersion" value="10.0.0.0" />
    <add key="MinSupportedBackEndStoreVersion" value="1.0.0.0" />
    <add key="BlobStoreAbstractClassVersion" value="10.50.0.0" />
   </file>
   </Providers>
Basically when you run installprovider.cmd it uses FileProviderConfiguration.xml inside Script folder and writes into Machine.Config file.
Hope this helps.
Suman Pradhan
http://www.sumanpradhan.com