11.07.2015 Views

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

464 Part IV: Securing Your Network, Host, <strong>and</strong> <strong>Application</strong>Verify That ASP.NET Errors Are Not Returned to ClientsYou can use the element to configure custom, generic error messagesthat should be returned to the client in the event of an application exceptioncondition.Make sure that the mode attribute is set to “RemoteOnly” as shown in the followingexample:After installing an ASP.NET application, you can configure the setting to point toyour custom error page as shown in the following example:Verify Session State SettingsIf you do not use session state, verify that session state is disabled in Machine.configas shown in the following example:Also, ensure that the ASP.NET State Service is disabled. The default session statemode is “InProc” <strong>and</strong> the ASP.NET State Service is set to manual. For moreinformation about securing session state if you install an ASP.NET application thatrequires it, see “Session State,” in Chapter 19, “Securing Your ASP.NET <strong>Application</strong><strong>and</strong> <strong>Web</strong> Services.”Step 17. Code Access <strong>Security</strong>Machine level code access security policy is determined by settings in the<strong>Security</strong>.config file located in the following directory:%windir%\Microsoft.NET\Framework\{version}\CONFIGRun the following comm<strong>and</strong> to be sure that code access security is enabled on yourserver:caspol -s OnFor more information about configuring code access security for ASP.NET <strong>Web</strong>applications, see Chapter 9, “Using Code Access <strong>Security</strong> with ASP.NET.”During this step, you:● Remove all permissions for the local intranet zone.●Remove all permissions for the Internet zone.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!