I have a website that is hosted on Plesk in Shared Hosting. The session keeps on timing out because the app pool recycles after 5 minutes (even though session timeout is set to 30 min). The effect of session timeout is exaggerated because current user activity is quite low and for users testing the app, the session keeps on timing out every 5 minutes.
On plesk web hosting panel, I can see the AppPool settings but they are disabled. Is there a way to change this setting?
Unfortunately no you cannot change this. I heard that you can set up your webapp to ping periodically to try and keep it alive:
https://www.godaddy.com/community/Developer-Cloud-Portal/IIS-Application-Pool-Idle-Timeout/td-p/9158
Can you prevent your ASP.NET application from shutting down?
If you can't change IIS settings, you can use an external uptime monitor service to continuously query your website with GET requests, which will also keep it alive. Most uptime monitors don't send actual requests, however the Availability feature in Application Insights does and works perfectly for this.
I wrote more about it here.
It's possible in Plesk for Plesk admin and customers/resellers:
Permissions to manage IIS pool settings are granted on a service plan level. Contact Plesk admin to change permissions on a service plan that your domain is assigned.
If you login to Plesk under an 'admin' user, make sure your Plesk is opened in a Service Provider view as this view allows editing Service Plans.
Related
Where can I find that whether iis job has been scheduled or last ran? I checked the task scheduler but it did not lead me to anything. any help will be appreciated.
Short Answer
Unfortunately, no short and fast way to see when IIS was reset last. This needs a monitoring system in your environment.
Long Answer
IIS as the service is controlled by WWW publishing service in Windows Services. Therefore, anytime the service is down, IIS is down (Server reboot, stopping the service manually etc.)
Service start\stops are logged in Windows event viewer as Service has stopped and Service has started.
IIS has application pools which are "containers" for websites to run in. These app pools may stop\restart due to variety of reasons.
Application Pool was manually reset at some point using IIS Manager.
Application Pools are by default set to restart ever 1740 minutes (29 hours). Therefore, any request at that moment of restart is going to receive an error.
At times application pools crash due to exceptions in website code.
Just as services Application pool restarts are logged in the Windows Event Viewer
Example:
A worker process with process id of '1234' serving application pool '{your apppool name}' was shutdown due to inactivity. Application Pool timeout configuration was set to 20 minutes. A new worker process will be started when needed.
You can also look at the IIS Logs (C:\inetpub\logs\LogFiles by default) When ever you see the log header, it means the process was started at that time.
I have a siteminder protected portal which has links to many applications that are also protected by siteminder. SSO is implemented between the portal and the applications.
The issue is that when we login to the portal and browse through the applications, it happens sometimes that we suddenly get logged off from the portal for no reason ( no time out, it can happen even for as less as 1 minute).
Issue is reported for a small group of users and it happens on IE as well as Firefox browsers and it happens randomly.
1.Local system time on the policy servers, proxy servers and the user's machine are in sync
2. additionally when I check with Fiddler on the cookies are still there , but we still get logged off from the portal.
Any ideas for this?
Are you using a persistent session store? This may happen if the validation period is not setup properly.
This may also happen if one of the policy servers has a different encryption key from the others. If you can enabled the trace logs on the web agent, it should give you a decent idea about the reason the cookie is being rejected.
I am using Windows Authentication to assist in preventing access to a website. This site is not hosted within my network, meaning that the first time I try to access it I have to enter my windows credentials for that server. All this works great.
My problem lies with the timeout. If I use Anonymous Authentication and Forms Authentication, IIS seems to correctly use the session timeout/form timeout value of 20 minutes.
However, when I am using Windows Authentication it seems to timeout much sooner than 20 minutes. I have not found a way to increase the Windows Authentication timeout value. I need it to be about 20 minutes.
My App Pool settings are set to never recycle the App Pool, so I know it's not timing out due to an App Pool refresh.
This is an ASP.NET MVC 4 website in-case that is a question.
Any ideas on how to increase the timeout of Windows Authentication in IIS7?
I've have added my domain account permissions to Windows AppFabric 1.1 Caching using the "grant" Powershell command. A sample app runs locally on the machine itself fine. Also, I'm able to telnet to the port 22233 from another box successfully (I'm pretty sure its not firewall issue).
Could this be IIS permissions somehow? I don't see a site created under IIS. Is there a log I can check to see specifically why the remote calls are getting rejected with a "ErrorCode:SubStatus:There is a temporary failure. Please retry later."
You granted permissions your account to AppFaric Cache, but are you sure that your app runs under this account ? If this is a WebSite, this another user (ApplicationPoolIdentity).
Try to grant your machine (by adding a $ at the end) or run your app under your granted user.
To be sure it is a problem in security, you can try to disable it at server side, just for testing purpose.
Set-CacheClusterSecurity -SecurityMode None -ProtectionLevel None
please find msdn here.
I've a website that puts info into a mySQL database and a windows service (written in VB.Net) that polls the db and actions what's in there.
However, occasionally it stalls and rather than having to RDP into the server, I want superusers to click on a button to restart the service.
I can get the button to say, do a directory listing of c:\ output to a test file so the whole 'getting a command to execute on a remote server' issue works. However, I can't restart services.
I assume this is a security thing (although it has full rights to c:\ I thought I'd sussed that already).
The website runs under the normal IUSR_user so am I doing something really stupid or can someone explain how to get the service to be restarted ?
Many thanks
Adrian
I think a significantly bigger problem is that you have a service that's stalling. Do you have any logs or errors that the service outputs to that you could use to diagnose why it's stalling?
I'd write a service that restarts selected services and call that from my website, just for fun!
It seems that you need to give the user permissions on the specific service. The simplest way to do this (in my view) is to use subinacl.exe from the Windows Resource Kit.
subinacl.exe /service MySQL /Grant=IUSR_user
I'm would be very careful when doing this on a public-facing web server. Have both authentication and rate limiting on the restarting code.
Use the ServiceController class:
http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicecontroller.aspx
This should allow you to connect to the named service and stop/start it.
EDIT:
In addition, you probably need to have your web app impersonate a user with rights to restart the service. This can be accomplished via an identity impersonate in the web.config, or running the web app in a configured application pool in IIS. Keep in mind that the web app will have to run on the same box as the service is running on.