Hi,
I have implemented a simple Welcome message display using a Label in my development environment that is hosted on a LocalHost. Its working quite fine. However, when i deployed it in live environment on a remote server, the Welcome Message is not getting displayed. I tried it in 2 different pages but still its not getting displayed. Any help? Thanks in advance
Here is the piece of code that i have structured:
.aspx extension
Welcome to Baraamej Website
This is a private website
.cs extension
protected void Page_Load(object sender, EventArgs e)
{
// display Welcome User Message
if (!IsPostBack)
{
// display Hello User Message
Lbl_HellowMsg.Text += "Welcome " + (String)Session["FullName"];
}
}
Thanks
Ahmed KhalidPosted Feb 27, 2023, 8:09 AM
Hi Naimish,
The site is running on just http and not https protocol. There are no SSL configuration settings mentioned in web.config file. Thats why I am also wondering whats really is the issue. I have checked with hosting service provider if there are any configuration settings done on the server side in this regard, he said No.
The issue is still open
Ahmed KhalidPosted Feb 27, 2023, 8:02 AM
Hi Jignesh,
Thanks for your feedback.
Well, sessions are correctly configured. Because I have set functionalities based on sessions like links enable/ dispable etc, they are correctly running.
Actually, i only face these issues in production when i implement Label displays even for a simple as "Message Saved Successfully" that doesnt use session variable. Even these are not run in Production
Also Beep sounds on button click are not run in production where as in Dev environment, they are working fine
Ahmed KhalidPosted Feb 27, 2023, 7:57 AM
Thank you and the rest of the guys who have responded.
@Paul,
Please find my feedback for the points you raised:
1. The session variable "FullName" is being populated properly. In fact the "FullName" is being displayed in the Header Button Menu
2. The label control is being rendered on the page and infact the "FullName" is displayed on the Label properly in Dev environment
3. The label control is being rendered on the page is correctly specified
4. Cant find any server errors as the rest of the contents in the web page are displayed properly.
Only issues I see are these custom messages display. I have also implemented messages like "Record Saved Successfully" also using Labels. These too are not displayed
And I have also implemented beep sounds. In production, they beep sounds are not run but in Dev environment they are working fine.
Naimish MakwanaPosted Feb 27, 2023, 6:43 AM
Hi Ahmed,
check below setting in web.cofig file
If it's true on live than your website must be run on https protocol else session variable will not work.
Thanks
Naimish Makwana
Jignesh KumarPosted Feb 27, 2023, 4:34 AM
Hello,
Form where you are assigning session variable Session["FullName"] value. check value set properly.
check you web config is configure properly
https://social.msdn.microsoft.com/Forums/en-US/ea588d8c-0065-4716-8b41-8d5c28902da7/iis-75-and-aspnet-40-deployment-not-retaining-session-variables?forum=aspconfiganddeploy
Tuhin PaulPosted Feb 27, 2023, 4:03 AM
Hi Ahmed,