Monthly Archives: November 2010

Detect the Status of a Windows Service (is running) – MS SQL Server

To write a C# program to detect the MS SQL Server Windows Service status (running or stop). 1. Determine the service name, for me the name is MSSQLSERVER. 2. Create a console program like below. using System.ServiceProcess; using System.Windows.Forms;   … Continue reading

Posted in .Net | Leave a comment

ARR cannot pop up the authentication dialog‏

When we configured IIS application to Windows Authentication without going through the ARR (Application Request Routing) the dialog will pop up. How can I make ARR pop up this authentication dialog like the one below? Any genius know the answer?

Posted in Uncategorized | Leave a comment

Web Designers vs. Web Developers

This is from it is 70% true. I am not quite agree on Perl but php rather.

Posted in Computers and Internet | Tagged | Leave a comment

NullReferenceException was unhandled “Object reference not set to an instance of an object” while reading connection string from web.config.

  While reading the web.config file from non web application you might receive the error “NullReferenceException was unhandled” like below.       When you drill down using the Locals window then you will see the FilePath property is pointing … Continue reading

Posted in .Net | Leave a comment

How to read connection string from web.config in non-web application

In this example, I will use console application but you can use Winform or WCF.   static void Main(string[] args) {   System.Configuration.Configuration cf = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(“/IPMS_RMTR”);   System.Configuration.ConnectionStringSettings connsetting;     connsetting = cf.ConnectionStrings.ConnectionStrings[“IPMSConnectionString”];   Console.WriteLine(connsetting.ConnectionString); }   The key … Continue reading

Posted in .Net | 1 Comment

Web Services Error – Could not create type ‘xxxxx.xxxxxxx’ -asmx

If you see the error “Could not create type” … mine is “Could not create type ‘IPMSDBWebService.Service’ “. Most likely your asmx.cs file is in root folder of the web application like the one shows below. Create a folder name … Continue reading

Posted in Uncategorized | 1 Comment

The web server process that was being debugged has been terminated by Internet Information Services (IIS). This can be avoided by configuring the Application Pool ping settings in IIS. (The missing step)

When you see the above error same as the picture display below. Click the Help button then it will link you to “Error: Web site worker process has been terminated by IIS” (;k(DevLang-CSHARP)&rd=true). When come to step 5 “In … Continue reading

Posted in Uncategorized | Leave a comment