IIS Pattern customisation for connecting MSSQL database

ShubhanshuG
Tera Contributor

Hi All, Good day.

I am attempting Service Mapping for an application which uses IIS Server (hosted on Windows Server) and the next layer of the map is a MSSQL DB. The map is successfully created till the IIS Servers but not proceeding ahead to the MSSQL DB layer. After checking the logs we found the OOB IIS Virtual Directory pattern doesn't have a connection section for MSSQL.
As I am very new to the ITOM module, I need some guidance on how to create a connectivity section from IIS to MSSQL.

Thanks!!

1 ACCEPTED SOLUTION

sairamkoruk
Tera Guru

Hi @ShubhanshuG ,

You don’t need to build a connection section from scratch. The OOB IIS Virtual Directory pattern already provides this through its ADO .NET connectivity section. It reads the application’s Web.config, picks up the connection strings, and creates the connection to the SQL Server. In our implementation, the IIS to MSSQL connection came through this section. If your map stops at IIS, that section is either failing or being skipped, and the discovery log will show you which.

sairamkoruk_1-1793636260185.png

Here’s how to narrow it down:

  1. Open the discovery log for the IIS Virtual Directory pattern and expand the ADO .NET connectivity section. Confirm the connection string was found and that the server and database values were parsed.
  2. If no connection was created, find the step whose condition failed. The log shows where it dropped out.
  3. Check where the application stores its connection string. If it’s held outside Web.config (an external config file or app settings, for example), the OOB section won’t pick it up. In that case, extend the pattern rather than modifying the OOB one. Add a connectivity section that reads the file where the connection string actually lives, parses the server and database values, and creates the connection to the SQL Server endpoint the same way the ADO .NET section does. Use the ADO .NET section as your reference, since the connection creation logic is already there.

Work through the ADO .NET connectivity section step by step in the discovery log and find where it fails or is skipped. That step will tell you whether it’s a parsing issue, a condition that isn’t met, or a connection string location that needs the extension above.
Hope this helps. Please mark it as helpful if it does.

 

 

View solution in original post

5 REPLIES 5

hi @sairamkoruk 

It seems the web.config file parsed by Service mapping is a load balancer configuration file and does not contain the MS SQL Server connection string.

The connection string is defined in the individual application/service configuration files. We have multiple applications for the current app, each with its own configuration file.  However, the connection string is the same across them, so we can use the one of them.


Will this require pattern customisation/extension? Also how can we ensure that the changes (extension or customisation) we make for this pattern works for upcoming applications, I am assuming not all application will follow app 1 design and may have .config file stored elsewhere or maybe at the default location.

Thanks