Showing posts with the label IIS

Prevent ASP.NET Forms Authentication from Timing Out on a Shared Hosting

I’m hosting a website on a shared hosting server. This site uses Forms Authentication to generate the session cookie that authenticates my users. Everything worked fine with the site, including authentication, until I tried to make it so my authentication cookies didn’t expire every 20 minutes, which is the default expiration setting for Forms Authentication I have set following settings to my web.config <authentication mode="Forms" > <forms loginUrl="~/Account/LogOn" timeout="2880" /> </authentication> but even though the user log outs from the system in 2 mins its irritating to user. To solve the issue we need to set machine key into the web.config file. To generate the machine key use following code snippet. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; namespace keygenerator { class Program { static void Main(string[] argv

HTTP Error 500.21 - Internal Server Error - Simple Solution

HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list. If you getting above error after publishing your application in IIS 7 then following is the simplest solution for you. Go to command prompt. Navigate to C:\Windows\Microsoft.NET\Framework\v4.0.30319 path. Then type aspnet_regiis.exe -i and hit enter. If you got message like " installed suuccessfully" then you have done it then. Remember you must have administrator rights to do the above procedure .

Solution for HTTP Error 500.19 - Internal Server Error

Error Message: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information Module IIS Web Core Notification BeginRequest Handler Not yet determined Error Code 0x80070021 Config Error: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false". Config File \\?\C:\inetpub\wwwroot\web.config Requested URL http://localhost:8081/ Physical Path C:\inetpub\wwwroot\ Logon Method Not yet determined Logon User Not yet determined Config Source 144: </modules> 145: <handlers> 146: <remove name="WebServiceHandlerFactory-Integrated"/> Reason: ERROR CODE: 0x80070021 is ERROR_LOCK_VIOLATI