在Azure上配置Redis会话状态 [英] Configure Redis Session State on Azure

查看:98
本文介绍了在Azure上配置Redis会话状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Redis会话状态提供程序在我的ASP.Net网站本地运行良好,在Azure中与我的Azure网站运行良好.但是我有一个关于配置的问题...

I've got the Redis Session State Provider working fine locally with my ASP.Net site and in Azure with my Azure Website. But I've got a question about configuration...

是否可以使用网站属性"屏幕中的应用程序设置"(或配置字符串)部分将配置的配置存储在Azure网站本身中?

Is there any way to store the configuration for that in the Azure Website itself using the App Settings (or Configuration Strings) section in the Website Properties screen?

那将非常方便,因为这意味着我发布时不必修改web.config文件.我已经对连接字符串和应用程序设置进行了此操作,但是我只是没有看到一种对web.config文件的<system.web>节点(例如<sessionState>节点)中的任何内容执行此操作的方法.

That would be very convenient because it would mean that I don't have to modify the web.config file when I publish. I already do this for connection strings and app settings, but I just don't see a way to do that for anything in the <system.web> node of the web.config file, like the <sessionState> node.

推荐答案

无法通过利用web.config文件来更改基于提供程序的会话状态的行为.

There isn't a way to change the behaviour of the provider-based session state from utilising the web.config file.

您可以编写自己的提供程序,并修改它从中找到连接详细信息的位置,以便可以将这些详细信息发布到web.config之外的其他位置,但这不是标准行为.

You could write your own provider and modify where it finds the connection details from so you can publish those details somewhere other than in the web.config, but this wouldn't be standard behaviour.

这篇关于在Azure上配置Redis会话状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆