0
Redisヘルパーメソッドでは、2つのRedis接続文字列を保持しています.1つはlocal
、もう1つはAzure redis server
です。それぞれと公開する必要があるたびに手動で変更する。私のアプリはASP.net MVC(SPA)アプリです。ポータルでWindows Azure Redis接続文字列を設定する
Q:Azureポータルに公開済みのRedis connection string
を設定する場所はありますか?
public class RedisConnectorHelper
{
private static readonly Lazy<ConnectionMultiplexer> LazyConnection =
new Lazy<ConnectionMultiplexer>(() => ConnectionMultiplexer.Connect("localhost,ConnectTimeout=10000"));//local host
//private static readonly Lazy<ConnectionMultiplexer> LazyConnection =
// new Lazy<ConnectionMultiplexer>(() => ConnectionMultiplexer.Connect("Myredis.redis.cache.windows.net:6380,password=mypassword,ssl=True,abortConnect=False"));//production
}
アップデート:以下に示すように、私はweb.config.release
ファイルにそれを設定している
。
<connectionStrings>
<add name="Abp.Redis.Cache" connectionString="Myredis.redis.cache.windows.net:6380,password=mypassword=,ssl=True,abortConnect=False" />
</connectionStrings>
しかし、それは選ばれていないようです。理由を教えてください。ここで
アプリケーションがデプロイされた方法 - Webアプリケーション、クラウドサービスやVMで? –
@ GauravMantri 'Web Apps' – Sampath
web.configの変換を見て、適切な接続文字列をweb.config.releaseファイルに置くことができます。したがって、アプリケーションが「リリース」モードで構築されると、そこから正しい接続文字列が取り出されます。 –