Click here to Skip to main content
15,937,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I implemented SQLSERVER session state for Load Balancer. Everything is ok now.

But the only problem im facing is Connection string getting null sometimes. I tried to change my Sqlserver session parameters but none of them working.

That is my staticConnectionString parameter(Declared in Entity as static string property) which used to have connection string value is getting NULL. Only with Load Balancer im facing this issue. Any body please Help.

Value cannot be null.
Parameter name: connectionString

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: connectionString

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentNullException: Value cannot be null.
Parameter name: connectionString]
RLLMSBusinessLayer.LoginBL.GetCompanyInfoBL() in C:\inetpub\wwwroot\RediLearning2012\RediLearningLMS2012\RLLMSBusinessLayer\LoginBL.cs:35
RLLMSWEB.Reporting.QuizReport.Page_PreInit(Object sender, EventArgs e) in C:\inetpub\wwwroot\RediLearning2012\RediLearningLMS2012\RLLMSWEB\Reporting\QuizReport.aspx.cs:43
System.Web.UI.Page.PerformPreInit() +49
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1844

1 solution

The load balancer should have an affinity session that you should be able to turn on.
This would ensure all connections coming for the same session go to the same server.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900