Why IIS Application Pool automatically stopped when trying to browse or invoke BizTalk WCF Services?

  • Sandro Pereira
  • Aug 25, 2017
  • 3 min read

This week, I received a call from one of my customers reporting a strange issue. Strange because everything was running fine, and suddenly, for no apparent reason, each time someone tried to invoke or browse WCF Services exposed by BizTalk Server, the IIS Application pool configured for those services automatically stopped.

If we tried to browse the services, we got the following error message:

Login failed for user ‘Domain/user’
Exception Details: System.SqlClient.SqlException: Login failed for user ‘domain/user’

Application Pool automatically stopped : IIS Login failed for user

Of course, with that type of error description, the first step we did was to re-enter the credentials for that user in the application pool, but… the same problem persisted.

When we investigated the event viewer for additional error details, we found in the Security log the following message:

Log Name:      Security
Source: Microsoft-Windows-Security-Auditing
Date: {date}
Event ID: 4625
Task Category: Logon
Level: Information
Keywords: Audit Failure
User: N/A
Computer: {machine name}
Description:
An account failed to log on.
Subject:
Security ID: SYSTEM
Account Name: {account name}
Account Domain: {domain name}
Logon ID: 0x3E7
Logon Type: 4
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: {account name}
Account Domain: {domain name}
Failure Information:
Failure Reason: The user has not been granted the requested logon type at this machine.
Status: 0xC000015B
Sub Status: 0x0

📝 One-Minute Brief

A troubleshooting guide that explains why an IIS Application Pool stops automatically when browsing or invoking BizTalk‑exposed WCF services, and how a missing local security policy (“Log on as a batch job”) causes authentication failures and service downtime.

Cause

So, at this point, we knew this was a security policy issue, and we suspected that an automated process created by sysadmins was changing something in the Local Security Settings on the BizTalk Server machine.

After some research, we found out that the user account that is running the Application Pool, in which the BizTalk WCF Services are exposed, requires having “Log on as batch job” rights

Note: By definition, this security setting (Log on as a batch job), allows a user to be logged on by means of a batch-queue facility and is provided only for compatibility with older versions of Windows. For example, when a user submits a job by means of the task scheduler, the task scheduler logs that user on as a batch user rather than as an interactive user.

Solution

To add user rights in the Log on as batch job policy, you need to:

  • Press the Windows key to open the Start menu.
  • Type secpol.msc and click on the Local Security Policy option from the Search window.
  • On the left pane, select Local Policies and User Rights Assignment.
Application Pool automatically stopped : Local Security Policy log on as a batch job
  • Right-click on Log on as batch job and click Properties.
  • Click Add User or Group… and add the desired user.
Application Pool automatically stopped : Local Security Policy log on as a batch job Add User
  • Click OK and then Apply.

Note: Of course, for you to do the above steps, you need to have administrator rights on the computer or be part of specific domain groups in case of Security Settings policies are governed by some AD domain groups.

Note: this problem can also occur and the same solution can be applied to SharePoint.

#1 all-in-one platform for Microsoft BizTalk Server management and monitoring

Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son. 

Thanks for Buying me a coffe
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top