how to handling session time out in asp.net 3.5 - web-config

i 'm working with asp.net 3.5 and i'm just upset with session handling of asp.net. here it's automatically log out from session period.
here is my web config session time out:
<sessionState mode="InProc" cookieless="false" timeout="20"/>
i just want to increase this time out for max as.
Is that possible for increase timeout="..." or buy default it's managed from iis machine.

Its better that you mention the time out in web.config file and it take timeout in minute not in sec.

Related

REST API does not return answer back after more than 3600 seconds of processing

We have spent several weeks trying to fix an issue that occurs in the customer's production environment and does not occur in our test environment.
After several analyses, we have found that this error occurs only when one condition is met: processing times greater than 3600 seconds in the API.
The situation is the following:
SAP is connected to a server with Windows Server 2016 and IIS 10.0 where we have an API that is responsible for interacting with a DB use by an external system.
The process that we execute sends data from SAP to the API and this, with the data it receives from SAP and the data it obtains from the DB of the external system, performs a processing and a subsequent update in the DB.
This process finishes without problems when the processing time in the API is less than 3600 seconds.
On the other hand, when the processing time is greater than 3600 seconds, the API generates the response correctly, and the server tries to return the response to SAP, but it is not possible.
Below I show an example of a server log entry when it tries to return a response after more than 3600 seconds of API processing. As you can see, a 995 error occurs: (I have censored some parts)
Any idea where the error could come from?
We have compared IIS configurations in Production and Test. We have also reviewed the parameters of the SAP system in Production and Test and we have not found anything either.
I remain at your disposal to provide any type of additional information that may be useful for solving the problem.
UPDATE 1 - 02/09/2022
After enabling FRT (Failed Request Tracing) on IIS for 200 response codes, looking at the event log of the request that is causing the error, we have seen this event at the end:
Any information about what could be causing this error? ErrorCode="The I/O operation has been aborted because of either a thread exit or an application request. (0x800703e3)"
UPDATE 2 - 02/09/2022
Comparing configurations from customer's environment and our test environment:
There is a Firewall between SAP Server and IIS Server with the default idle timeout configured for TCP (3600 seconds). This is not happening in Test Environment because there is no Firewall.
Establishing a Firewall policy specifying a custom idle timeout for this service (7200 seconds) the problem will be solved.
sc-win32 status 995, the I/O operation has been aborted because of
either a thread exit or an application request.
Please check the setting of minBytesPerSecond configuration parameter in IIS. The default "minBytesPerSecond" is 240.
Specifies the minimum throughput rate, in bytes, that HTTP.sys
enforces when it sends a response to the client. The minBytesPerSecond
attribute prevents malicious or malfunctioning software clients from
using resources by holding a connection open with minimal data. If the
throughput rate is lower than the minBytesPerSecond setting, the
connection is terminated.

idle_in_transaction_session_timeout fall down my application

I have application powered by moodle API 3.3 when I active this parameter at postgresql.conf "idle_in_transaction_session_timeout" and restart the service, I get my application down because of losing connection to the database, I tried to put it 300000 milliseconds but no hope once I restart the postgresql I get my application down so any advises ?
You have to fix your application code so that it closes all transactions immediately after they are done. Then the problem will disappear.

Increasing request timeout of 110s

I cannot seem to extend the 110 second timeout for requests to my Azure Web App. I have done the following in order to increase this limit, but with no success.
ASP.NET's HTTP request execution timeout (web.config):
<system.web>
<httpRuntime executionTimeout="600" />
</system.web>
IIS connection timeout (web.config):
<system.applicationHost>
<webLimits connectionTimeout="00:10:00" />
</system.applicationHost>
Kudu timeout before external commands are killed (site app setting):
SCM_COMMAND_IDLE_TIMEOUT = 600
What am I missing?
request timeout of 110s
It is very odd that your request timeout of 110s,From the Auzre official document, we could know that default timeout is about 4 minutes.It seems that we are not able to increase request timeout. The following is the snippet from the document. Please have a try to scale up and scale down back the App service plan. If still have the same issue, please connect to Azure support team for more help.
Azure Load Balancer has a default idle timeout setting of four minutes. This is generally a reasonable response time limit for a web request. If your web app requires background processing, we recommend using Azure WebJobs. The Azure web app can call WebJobs and be notified when background processing is finished. You can choose from multiple methods for using WebJobs, including queues and triggers.
+
WebJobs is designed for background processing. You can do as much background processing as you want in a WebJob. For more information about WebJobs, see Run background tasks with WebJobs.
Note :SCM_COMMAND_IDLE_TIMEOUT = 600 could use for your build process launches some command in the server side. But the request is timeout that will cause clients to get disconnected after 230 seconds, we could get more info from Azure Kudu Configurable settings.

How long does a JBoss application try to auto connect to DB when the DB was shut down?

We use JBoss 7.1 version in our environment. We have a scenario where one of the production databases was shut down for one hour due to a maintenance activity. Our JBoss application failed to automatically reconnect to that database after one hour and we had to manually restart the application to establish the connection.
Below are the database validation parameters we have defined in our code. Please let me know if I missed any parameter for automatic reconnection other than the below or if we have to make/add any changes/parameters to the existing.
<validation>
<check-valid-connection-sql>SELECT 1;</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<background-validation-millis>180000</background-validation-millis>
</validation>
<background-validation-millis> ---> This parameter allows a connection checker to run for every three minutes as per our code and finds the availability of the DB connection.
Questions:
How long does this run for database connection?
Or, what is the maximum time/loops it will try for database connection?
Is there any default time it runs or will it run infinite times until the database comes back up?
I hope my questions are clear and please let me know if you need any more information.
I'm looking at this link and I read that <validate-on-match> is typically not used in conjunction with <background-validation>.
Try remove this tag and see what that gives.

MONO / ASP.NET Authentication Persistence

I'm deploying an ASP.NET MVC 2 application using Apache / mod_mono / MONO (2.8.1) that uses the built in ASP.NET authentication framework.
When I restart Apache, or use the mod_mono control panel to restart the mono server process, users are logged out. I don't want this occurring.
I'm using custom Profile / Membership / Role providers (that are backed by a Redis database), and these currently have a bare minimum implementation. I can not see where my problem fits in here however, but am I missing something obvious?
I notice that the .MONOAUTH cookie changes value when a user logs back in, so I guess there is some persistence that needs to happen that is not happening.
Any solutions or pointers to the relevant documentation would be great!
NOTE: I'm not sure if the information below differs when you're using a Membership Provider -- it may be that session state is persisted by the Membership Provider itself.
It's likely that you're using "in-process" session state storage. This means that whenever you restart the web server process, you're clearing out all the session information stored in the web server process's memory space.
To avoid wiping out session information, you can move to using an out-of-process session state server, either running as an in-memory service (see below for the Mono version) or on SQL Server. Otherwise there are also a number of unofficial custom session store providers that use alternative storage mechanisms (e.g. MongoDB etc.)
I found what you may want, which is this Mono ASP.NET Session State Server: http://manpages.ubuntu.com/manpages/gutsy/man1/asp-state2.1.html
As a first step, take a look in your web.config at the system.web -> sessionState property. If it's set to mode="InProc" then there's your problem. It should look more like:
<sessionState
mode="StateServer"
stateConnectionString="tcpip=server:port"
stateNetworkTimeout="number of seconds"/>
Solution: set the validationKey and decryptionKey manually:
<machineKey validationKey="blahblah" decryptionKey="blahblah" />
I think this is probably a bug in mono that these take on different values over server resets when auto-generated (which is the default).