Monday, October 28, 2013

HTTP Error 503. The service is unavailable.

I started receiving "HTTP Error 503. The service is unavailable" error for localhost after re configuring the default website on local machine.

After some investigation I noticed the Application pool had stopped.

I restarted the Application pool

  • Open the Internet Information Services (IIS 7) Manager
  • Select the Application Pools node under the root node in the left hand side frame.
  • Right Click on the application pool website uses.  If the service is stopped, start it.  If the service is running, restart it.


Ran the website and it gave the "HTTP Error 503. The service is unavailable" error again. Checked the application pool to notice it had stopped automatically.

This turned out to be a custom account issue.
The password for user that application pool was running under was changed some time ago but it kept running until changes were made to the website settings in IIS7.

Reset the identity for the pool and started the application pool.

  • In application pool -> Advanced Settings->Click on Identity->enter username and password when prompted 
  • Restart the Application pool
  • Run the website

That did the trick! Issue resolved!

Thursday, March 14, 2013

Increase Database Mail Size Limit

sp_send_dbmail allows you to send emails with attachments. However by  default, Database Mail limits file attachments to 1 MB per file.

You can configure database mail to allow larger sizes.
Expand the Management tab, right-click on Database Mail,
Click on Configure Database Mail.
Select "View or change system parameters"
"Maximum File Size (Bytes)"  is the option you can change to configure the attachment size.