Session is getting null in publish version[Use fix naming and single page assembly] but not always ... when we doing load testing then we get that error... but when we put coding to server ... we are not facing problem..
Hi,
As per the your described scenario. It seems you are using In-Proc session storage mechanism and your Web server is configured with web garden. When you do load testing you get session time out error because in web gardening scenario there are chances to get
your request
serverd by other Worker process where it dosen't have session values.
Solution:
Keep the session state out of process using State server
no the no of worker process is set to only 1... so i think it is handled by only one worker process... if this would have been a scenario then we might face in coding page also not only in publish version
Also not in load testing it fails... live user also suffer this scenario and suddenly and randomely all session get null.. do not know why????
I only mean is there any possibility???.... in publish, system is doing more like creating something in temp folder etc..
Check your code, may be your code is throwing some error which you are handeling using try & catch. As the exception your application is destroying session. First identify which page is destroying session. And upload code in forum, it will help to identify
the reason of your problem.
Also check session timeout value defined in below three steps.
When I monitor system log, there is one inormation message unhandle exception and then application restart . that page is in iframe and call third party tool atalasoft.. we are finding out the reason for that why it is giving exception.
But this same message we get in whole coding web site also.. but another user is not suffering in this case ? no buddy is getting session loss error.
now you check what you are showing in iframe, If it is showing some dymanioc data based on some parameter, then may be you are passing rong parameter which are either not in correct format, or some datatype issue which throwing error.
Check this...
Pradeep Kr. Sharma
http://vshelpdesk.blogspot.com/
Please Mark As Answer, which helped you. So that it might be useful for others.
But pradeep, still question arise why all user face session null only in publish version but not in other way[When full coding is placed]
This issue i know when unhandle exception is there then application pool get recycle and that time all user may face session null issue but why it is not causing in other way????
reason may be thirt party tools dll, which you are using in your application, check third party dll in your publish code, whether they are present or not.
Pradeep Kr. Sharma
http://vshelpdesk.blogspot.com/
Please Mark As Answer, which helped you. So that it might be useful for others.
no dll and license file is present in bin.. because we are getting the out put in iframe in publish version senario... the error is throwing what i saw in system log it shows the same error in both scenario ... but stuck up in publish version...
And also this iframe is used in so many pages .. but only problem occur in one page .. and only difference in that page is we are using ajaxcontrol toolkit... a
py1984
Member
176 Points
67 Posts
Session is getting null in publish version
Dec 27, 2011 01:14 PM|LINK
very strange,
Session is getting null in publish version[Use fix naming and single page assembly] but not always ... when we doing load testing then we get that error... but when we put coding to server ... we are not facing problem..
any reason why ????
ignatandrei
All-Star
134843 Points
21605 Posts
Moderator
MVP
Re: Session is getting null in publish version
Dec 27, 2011 08:02 PM|LINK
Maybe you are testing different paths...
However, without your custom code, no idea.
satalaj
Star
10505 Points
2031 Posts
MVP
Re: Session is getting null in publish version
Dec 28, 2011 12:15 PM|LINK
Hi,
As per the your described scenario. It seems you are using In-Proc session storage mechanism and your Web server is configured with web garden. When you do load testing you get session time out error because in web gardening scenario there are chances to get your request
serverd by other Worker process where it dosen't have session values.
Solution:
Keep the session state out of process using State server
http://www.satalaj.com/2011/12/session-state-server.html
or
Sql Server
Satalaj.
py1984
Member
176 Points
67 Posts
Re: Session is getting null in publish version
Dec 28, 2011 01:05 PM|LINK
no the no of worker process is set to only 1... so i think it is handled by only one worker process... if this would have been a scenario then we might face in coding page also not only in publish version
Also not in load testing it fails... live user also suffer this scenario and suddenly and randomely all session get null.. do not know why????
I only mean is there any possibility???.... in publish, system is doing more like creating something in temp folder etc..
Pradeep Kr. ...
Participant
1712 Points
294 Posts
Re: Session is getting null in publish version
Dec 29, 2011 07:03 AM|LINK
Check your code, may be your code is throwing some error which you are handeling using try & catch. As the exception your application is destroying session. First identify which page is destroying session. And upload code in forum, it will help to identify the reason of your problem.
Also check session timeout value defined in below three steps.
1. In Web.config like..
<sessionState mode="InProc" timeout="30" cookieless="true" />
2. In Session_Start event in Global.asax like....
Session.TimeOut=30;
3. In IIS Setting you can also set default session timeout.
a. open IIS start==run==inetmgr and press enter.
b. Right Click on "Default Web Site" go in Propertied
c. Select Asp.Net, click on "Edit Configuration" Button
d. Select "State Management" in new popup window
e. Change the session timeout here to 30.
Check these option. Any of them can effect Sesstion timeout.
http://vshelpdesk.blogspot.com/
Please Mark As Answer, which helped you. So that it might be useful for others.
py1984
Member
176 Points
67 Posts
Re: Session is getting null in publish version
Dec 29, 2011 07:18 AM|LINK
When I monitor system log, there is one inormation message unhandle exception and then application restart . that page is in iframe and call third party tool atalasoft.. we are finding out the reason for that why it is giving exception.
But this same message we get in whole coding web site also.. but another user is not suffering in this case ? no buddy is getting session loss error.
Pradeep Kr. ...
Participant
1712 Points
294 Posts
Re: Session is getting null in publish version
Dec 29, 2011 07:31 AM|LINK
now you check what you are showing in iframe, If it is showing some dymanioc data based on some parameter, then may be you are passing rong parameter which are either not in correct format, or some datatype issue which throwing error.
Check this...
http://vshelpdesk.blogspot.com/
Please Mark As Answer, which helped you. So that it might be useful for others.
py1984
Member
176 Points
67 Posts
Re: Session is getting null in publish version
Dec 29, 2011 07:41 AM|LINK
But pradeep, still question arise why all user face session null only in publish version but not in other way[When full coding is placed]
This issue i know when unhandle exception is there then application pool get recycle and that time all user may face session null issue but why it is not causing in other way????
Pradeep Kr. ...
Participant
1712 Points
294 Posts
Re: Session is getting null in publish version
Dec 29, 2011 08:05 AM|LINK
reason may be thirt party tools dll, which you are using in your application, check third party dll in your publish code, whether they are present or not.
http://vshelpdesk.blogspot.com/
Please Mark As Answer, which helped you. So that it might be useful for others.
py1984
Member
176 Points
67 Posts
Re: Session is getting null in publish version
Dec 29, 2011 08:57 AM|LINK
no dll and license file is present in bin.. because we are getting the out put in iframe in publish version senario... the error is throwing what i saw in system log it shows the same error in both scenario ... but stuck up in publish version...
And also this iframe is used in so many pages .. but only problem occur in one page .. and only difference in that page is we are using ajaxcontrol toolkit... a