Click here to Skip to main content
13,048,805 members (71,268 online)
Rate this:
Please Sign up or sign in to vote.
Hi friends, I have created an asmx web service in which it has one database and some tables in it. Every thing is works fine when I tested through my visual studio development server. but when I hosted the service in IIS 7.0 I am un able to get the data so I thought to use try catch statements and caught the follwoing error.
but I was unable to find what is the error and how to solve it.

Below is my error,

System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at InventoryWebService.AgencyManager.GetAgency(Int32 AgencyId) in E:\InventoryWebService\InventoryWebService\DAL\AgencyManager.vb:line 19

Please any one tell me what may be the error.

Thanks in Advance
Posted 15-Oct-12 19:10pm
Updated 16-Oct-12 1:50am
Aman.A 16-Oct-12 4:07am
is this question of yours related to this one you asked: Make SQLConnection visible through out ? If it is, I suggest removing this question here.
Ganeshcse 16-Oct-12 7:47am
I want to make my SQLConnection visible through out my service.
Aman.A 16-Oct-12 7:53am
I have suggested a way you can do it in your previous question, have a look at that!
Ganeshcse 16-Oct-12 7:55am
Yeah I have seen that Please provide some example on how you tell to do that?
ryanb31 16-Oct-12 10:15am
The error tells you what is wrong. What exactly is the question?
Ganeshcse 17-Oct-12 2:00am
The error is showing that connections were in use and max pool size was reached. so what can I do to get the data from the database.
Is there is any other way to overcome this problem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 16 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100