How to see the error details in ASP.NET

The ASP.NET developer can find information about custom error messages for an ASP.NET application by setting customErrors OFF from the web.config file.

<customErrors defaultRedirect=”url”              mode=”On|Off|RemoteOnly”>     <error. . ./></customErrors>

Setting the customErrors mode=”Off ” means that custom errors are disabled. The detailed ASP.NET errors are shown to the remote clients and to the local host.

Related TutorialsHow to apply styles to […]

How to create Oracle connection string

You should add a ConnectionStrings element in your Web.config file. The samle connection string for Oracle database might look like the following:

<add name=”OracleConnectionString”  connectionString=”Data Source=OracleS;Persist   Security Info=True;Password=”******”;User ID=Test”  providerName=”System.Data.OracleClient” />

 name  – set the value to the name that you want to use to reference the connection string.
connectionString – assign the connection string that is required to connect to the Oracle database.
providerName – […]

How to encrypt connection string in Web.config file

1. Run the ASP.NET IIS registration tool (aspnet_regiis.exe). The following example shows how to encrypt the connectionStrings section of the Web.config file for an application named SampleApplication:

aspnet_regiis -pe “connectionStrings” -app “/SampleApplication”

2. Determine the user account or identity under which ASP.NET runs by retrieving the current WindowsIdentity name:

<%@ Page Language=”C#” %><%Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent().Name);%>

3. Grant the NETWORK SERVICE account access […]

Recommended ASP.NET Examples