Posts

Showing posts from 2013

The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.

Image
HTTP Error 404.2 - Not Found The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server. Some time when we configure a new server and iis 7.0+, we get the error ”The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server” . We can solve the problem by disabling this restriction . We can do so by going to IIS manager , click on the hostname of the server , double click Isapi and CGI restrictions , right click ASP.Net and select 'Allow' option from pop up window, as shown in following images.

HOW TO: FIX ERROR - "the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine"

Image
The problem arises when you have your application compiled for AnyCPU Platform, you are running on a 64bit system and the installed ADO.NET provider (Microsoft ACE.OLEDB.12.0) is the 32bit version. Fig. 1 To resolve the issue, you need 64-bit Windows along with 64-bit MS Office. And download and install " Microsoft Access Database Engine 2010 Redistributable" from here:  http://www.microsoft.com/en-us/download/details.aspx?id=13255 Another option is to deinstall the 32bit version and install the 64bit version of ACE  from here and then run you application as AnyCPU on 64bit systems. But this could be a nightmare for your deployment scenarios But wait, there is a simple workaround to resolve the issue. The simplest workaround is to change the Target Platform of your 64-bit application to 32-bit through Visual Studio menu BUILD -> Configuration Manager -> Active Solution Platform -> x86 Fig. 2 Fig. 3

Windows Network Load Balancing (NLB)

Image
Network Load Balancer (NLB) Network load balancing is an excellent feature of the Microsoft Server Family operating systems. It allows the setup to make use of a single IP address to balance the load between two or more machine. In order to utilize the Windows Server Network load balancer, you will need two machines running windows server 2003/2008. Each machine needs to have at least one network card and at least one fixed IP address. For best performance, it is recommended that each machine has two adapters, one mapped to the real IP address and one mapped to the virtual IP address.  This is because, on a single adapter machine, if you configure NLB in Unicast mode then the adapter will be only in NLB use, no other network traffic could use that adapter but if you configure NLB in Multicast mode then all traffic would use that adapter and hence degrade the performance due to load on single adapter. The basic requirements for setting up Network Load Balancing:- T

Enterprise Application Integration (EAI)

Image
Enterprise Application Integration is an integration framework composed of a collection of technologies and services which form a middleware  to enable integration of systems and applications across the enterprise.  Fundamentally, it is all about sharing and distributing data and processes among different applications and data sources of that enterprise. EAI could be divided into 4 integration levels: Data Level Application Interface Level Method Level User Interface Level Data Level:  It is actually a database-centric approach that involves the extracting of data from one database and updating it in other. At times the extracted data can be changed before entering it into that target database, for example, to apply specific business rules. It’s commonly done through ETL (Extract, Transform, and Load).  The main benefits of this approach are its low cost and low risk profile. Because in this, we don’t have to make any modifications to the existing code of the app

Exception handling in asp.net

An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program's instructions.  The different approaches in ASP.Net to handle exceptions Use exception-handling structures to deal with exceptions within the scope of a procedure. try { ---- } catch { ---- } finally { -----} Use error events to deal with exceptions within the scope of an object. Page_Error - The Page_Error event handler provides a way to trap errors that occur at the page level. Application_Error - Application_Error event handler to trap errors that occur at the application level. Custom error pages to display custom error pages for unhandled exceptions at application level. <customErrors mode="RemoteOnly" defaultRedirect="~/errors/GeneralError.aspx" redirectMode="ResponseRewrite" />  The ResponseRewrite mode allows us to load the Error Page without redirecting the browser, so the URL stays

SQL Server Session Management

SQL Server Session Management Configure SQL Server for ASP.NET SQL Server Session State in Custom Database. To install the session state database on SQL Server, run Aspnet_regsql.exe tool supply the following information with the command: aspnet_regsql -ssadd -sstype c -d < Database> -S <Server> -U <Username> -P <Password> ·          The name of the Database, using –d option. ·          The name of the SQL Server instance, using the   -S   option. ·          The logon credentials for an account that has permission to create a database on a computer running SQL Server. Use the   -E   option to use the currently logged-on user, or use the   -U   option to specify a user ID along with the   -P   option to specify a password. ·          The   -ssadd   command-line option to add the session state database. ·          The -sstype command-line option to specify the type of session state to use. c for Custom i.e. both session state data and stored