Click here to Skip to main content
11,806,339 members (65,175 online)
Rate this: bad
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
Edited 16-Oct-12 1:50am
Aman.A at 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 at 16-Oct-12 7:47am
I want to make my SQLConnection visible through out my service.
Aman.A at 16-Oct-12 7:53am
I have suggested a way you can do it in your previous question, have a look at that!
Ganeshcse at 16-Oct-12 7:55am
Yeah I have seen that Please provide some example on how you tell to do that?
ryanb31 at 16-Oct-12 10:15am
The error tells you what is wrong. What exactly is the question?
Ganeshcse at 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
0 Richard Deeming 205
1 Sergey Alexandrovich Kryukov 170
2 ppolymorphe 145
3 OriginalGriff 135
4 Abhinav S 120
0 OriginalGriff 3,330
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,905
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 16 Oct 2012
Copyright © CodeProject, 1999-2015
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