我正在尝试将SQL Server用作Orleans的数据存储.
我已设法使用Azure本地存储模拟器使我的解决方案正常工作,但无法使其与SQL Server的本地实例一起使用.我使用以下方法创建了数据库:
https://github.com/dotnet/orleans/blob/master/src/OrleansSQLUtils/CreateOrleansTables_SqlServer.sql
并使我的配置文件看起来像这里的那个:
http://dotnet.github.io/orleans/Documentation/Advanced-Concepts/Configuring-SQL-Tables.html
这是我的配置文件:
<?xml version="1.0" encoding="utf-8"?>
<OrleansConfiguration xmlns="urn:orleans">
<Globals>
<StorageProviders>
<SystemStore SystemStoreType ="SqlServer"
DeploymentId="OrleansTest"
DataConnectionString="Data Source=.\SQL2014;Initial Catalog=Orleans;Integrated Security=True;Pooling=False;Max Pool Size=200;Asynchronous Processing=True;MultipleActiveResultSets=True" AdoInvariant="System.Data.SqlClient" />
<Provider Type="Orleans.SqlUtils.StorageProvider.SqlStorageProvider" Name="SqlServer" />
<!--<Provider Type="Orleans.Storage.AzureTableStorage" Name="AzureStore" DataConnectionString="UseDevelopmentStorage=true" />-->
</StorageProviders>
<SeedNode Address="localhost" Port="11111" />
</Globals>
<Defaults>
<Networking Address="localhost" Port="11111" />
<ProxyingGateway Address="localhost" Port="30000" />
</Defaults>
</OrleansConfiguration>
Run Code Online (Sandbox Code Playgroud)
我在谷物中添加了以下属性:
[StorageProvider(ProviderName = "SqlServer")]
Run Code Online (Sandbox Code Playgroud)
然后我得到以下错误:
Could not locate a state map factory type...
请有人让我知道我需要添加到提供商或我是否做了其他错误的事情?我是否需要为SQL提供程序创建与StateMapFactoryType有关的内容?
谢谢