Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
GeneralRe: Class Hierarchy Design Question Pin
Kevin Marois4-Jun-15 4:27
professionalKevin Marois4-Jun-15 4:27 
QuestionC# PDF Printing Pin
El Developer3-Jun-15 4:54
El Developer3-Jun-15 4:54 
AnswerRe: C# PDF Printing Pin
Pete O'Hanlon3-Jun-15 5:01
mvePete O'Hanlon3-Jun-15 5:01 
GeneralRe: C# PDF Printing Pin
El Developer3-Jun-15 5:10
El Developer3-Jun-15 5:10 
GeneralRe: C# PDF Printing Pin
Pete O'Hanlon3-Jun-15 5:14
mvePete O'Hanlon3-Jun-15 5:14 
GeneralRe: C# PDF Printing Pin
El Developer3-Jun-15 5:30
El Developer3-Jun-15 5:30 
GeneralRe: C# PDF Printing Pin
Pete O'Hanlon3-Jun-15 5:56
mvePete O'Hanlon3-Jun-15 5:56 
QuestionStack exchange redis with .NetFramework 4.0 c# Pin
Member 104597132-Jun-15 23:59
Member 104597132-Jun-15 23:59 
Hello,

I have searched for demo project for Stack Exchange Redis in .NetFramework 4.0 C# but I didn't find yet.

Please share if possible.

Need: I want to use this in caching for storing just key, value pair. I have used system.caching but it destroy cache after service restart.

So I have used first Service Stack Redis but it have limitation of 6000 request per day and my project have almost 282984 requests per day.

So I switched to Stack Exchange Redis. I have made sample project and it works fine in my local machine. But when I deploy project on staging environment gives below error:

C#
It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. UnableToResolvePhysicalConnection on PING

StackExchange.Redis.RedisConnectionException: It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. UnableToResolvePhysicalConnection on PING
   at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log)
   at StackExchange.Redis.ConnectionMultiplexer.Connect(String configuration, TextWriter log)
   at StackExchangeApplication.Source.Service.RedisService..ctor()
   at StackExchangeApplication.Source.Service.RedisService.get_GetInstance()
   at StackExchangeApplication.RedisHelper.GetStringValue(GetValueRequestMessage requestMessage)


Here is my code:

public class RedisService
{

        public static ConnectionMultiplexer _connection;
        public static IDatabase _redisDatabase;

        static RedisService()
        {
            _connection = ConnectionMultiplexer.Connect("localhost");
            _redisDatabase = _connection.GetDatabase();
        }
     
       public void AddStringKeyValue(string key, string value, int expireInMinute)
        {
            bool result = _redisDatabase.StringSet(key, value, TimeSpan.FromMinutes(expireInMinute), When.Always,
                CommandFlags.None);

            if (!result)
            {
                throw new Exception("Failed To add key value in Redis server Key : " + key + ", Value : " + value);
            }
        }

        public string GetStringValue(string key)
        {
            string value = _redisDatabase.StringGet(key);
            return value;
        }

}


Please help if anyone tried this I am finding out solution from last 3 days Frown | :( .

Thanks in advance!
AnswerRe: Stack exchange redis with .NetFramework 4.0 c# Pin
Mycroft Holmes3-Jun-15 14:31
professionalMycroft Holmes3-Jun-15 14:31 
GeneralRe: Stack exchange redis with .NetFramework 4.0 c# Pin
Member 104597134-Jun-15 23:21
Member 104597134-Jun-15 23:21 
Questionhow to fill textbox with DGV Column ? Pin
Member 115798702-Jun-15 22:24
Member 115798702-Jun-15 22:24 
AnswerRe: how to fill textbox with DGV Column ? Pin
OriginalGriff2-Jun-15 22:38
mveOriginalGriff2-Jun-15 22:38 
GeneralRe: how to fill textbox with DGV Column ? Pin
Member 115798702-Jun-15 22:45
Member 115798702-Jun-15 22:45 
GeneralRe: how to fill textbox with DGV Column ? Pin
OriginalGriff2-Jun-15 22:52
mveOriginalGriff2-Jun-15 22:52 
GeneralRe: how to fill textbox with DGV Column ? Pin
Member 115798702-Jun-15 23:02
Member 115798702-Jun-15 23:02 
GeneralRe: how to fill textbox with DGV Column ? Pin
OriginalGriff2-Jun-15 23:05
mveOriginalGriff2-Jun-15 23:05 
GeneralRe: how to fill textbox with DGV Column ? Pin
Member 115798702-Jun-15 23:27
Member 115798702-Jun-15 23:27 
GeneralRe: how to fill textbox with DGV Column ? Pin
OriginalGriff2-Jun-15 23:34
mveOriginalGriff2-Jun-15 23:34 
GeneralRe: how to fill textbox with DGV Column ? Pin
CHill602-Jun-15 23:55
mveCHill602-Jun-15 23:55 
GeneralRe: how to fill textbox with DGV Column ? Pin
Pete O'Hanlon3-Jun-15 2:13
mvePete O'Hanlon3-Jun-15 2:13 
GeneralRe: how to fill textbox with DGV Column ? Pin
Member 115798703-Jun-15 2:24
Member 115798703-Jun-15 2:24 
GeneralRe: how to fill textbox with DGV Column ? Pin
Member 115798703-Jun-15 2:30
Member 115798703-Jun-15 2:30 
GeneralRe: how to fill textbox with DGV Column ? Pin
Pete O'Hanlon3-Jun-15 2:32
mvePete O'Hanlon3-Jun-15 2:32 
GeneralRe: how to fill textbox with DGV Column ? Pin
Dave Kreskowiak3-Jun-15 2:37
mveDave Kreskowiak3-Jun-15 2:37 
GeneralRe: how to fill textbox with DGV Column ? Pin
Pete O'Hanlon3-Jun-15 3:35
mvePete O'Hanlon3-Jun-15 3:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.