Exception information:
Exception type: InvalidOperationException
Exception message: 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 Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetWrappedConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command)
at SBN.LandlordGPS.DAL.ContactsDAL.GetComboValue(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBNGPS.DAL\Contacts\ContactsDAL.cs:line 271
at SBN.LandlordGPS.Controllers.PropertyController.GetPropertyTypes(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 251
at SBN.LandlordGPS.Controllers.PropertyController.loadDropdown(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 183
at SBN.LandlordGPS.Controllers.PropertyController.Property() in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 44
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at System.Web.Mvc.Controller.ExecuteCore()
at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()
at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f)
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Request information:
Request URL: http://localhost:8090/
Request path: /
User host address: 127.0.0.1
User: admin
Is authenticated: True
Authentication Type: Forms
Thread account name: IIS APPPOOL\LGPS
Thread information:
Thread ID: 13
Thread account name: IIS APPPOOL\LGPS
Is impersonating: False
Stack trace: 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 Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetWrappedConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command)
at SBN.LandlordGPS.DAL.ContactsDAL.GetComboValue(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBNGPS.DAL\Contacts\ContactsDAL.cs:line 271
at SBN.LandlordGPS.Controllers.PropertyController.GetPropertyTypes(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 251
at SBN.LandlordGPS.Controllers.PropertyController.loadDropdown(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 183
at SBN.LandlordGPS.Controllers.PropertyController.Property() in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 44
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at System.Web.Mvc.Controller.ExecuteCore()
at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()
at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f)
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
This error is refering to some thing problem from your application and sql database server. So please check this connection.
1. Your database server is accessible from your web server or not
2. Database connection string is proper or not
From my DB side all connections are clear.
From my application, its work fine for some times.When i click the tree to load the left side content fastly , this problem occur in IIS when i deploy. But its not hapen while i run from my local.
But in LAN with in local group its working fine, while i deploy it in server, this problem occurs. Still problem is not rectified, i tried many ways.If any problem in SQL means, it should happen in same local na?
bitse
Member
38 Points
28 Posts
Exception Occured in MVC 3 application while Run in server not in Local
Aug 02, 2011 07:22 AM|LINK
Exception information:
Exception type: InvalidOperationException
Exception message: 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 Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetWrappedConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command)
at SBN.LandlordGPS.DAL.ContactsDAL.GetComboValue(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBNGPS.DAL\Contacts\ContactsDAL.cs:line 271
at SBN.LandlordGPS.Controllers.PropertyController.GetPropertyTypes(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 251
at SBN.LandlordGPS.Controllers.PropertyController.loadDropdown(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 183
at SBN.LandlordGPS.Controllers.PropertyController.Property() in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 44
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at System.Web.Mvc.Controller.ExecuteCore()
at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()
at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f)
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Request information:
Request URL: http://localhost:8090/
Request path: /
User host address: 127.0.0.1
User: admin
Is authenticated: True
Authentication Type: Forms
Thread account name: IIS APPPOOL\LGPS
Thread information:
Thread ID: 13
Thread account name: IIS APPPOOL\LGPS
Is impersonating: False
Stack trace: 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 Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetWrappedConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command)
at SBN.LandlordGPS.DAL.ContactsDAL.GetComboValue(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBNGPS.DAL\Contacts\ContactsDAL.cs:line 271
at SBN.LandlordGPS.Controllers.PropertyController.GetPropertyTypes(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 251
at SBN.LandlordGPS.Controllers.PropertyController.loadDropdown(Int32 _PMID) in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 183
at SBN.LandlordGPS.Controllers.PropertyController.Property() in D:\SB\V1.0.0.1\Code\SB\SBN\Controllers\PropertyController.cs:line 44
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at System.Web.Mvc.Controller.ExecuteCore()
at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()
at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f)
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
amitpatel.it
Star
7946 Points
1865 Posts
Re: Exception Occured in MVC 3 application while Run in server not in Local
Aug 02, 2011 07:26 AM|LINK
This error is refering to some thing problem from your application and sql database server. So please check this connection.
1. Your database server is accessible from your web server or not
2. Database connection string is proper or not
MCPD Enterprise and Web Application
MCTS Web, Window and Enterprise Application
bitse
Member
38 Points
28 Posts
Re: Exception Occured in MVC 3 application while Run in server not in Local
Aug 02, 2011 07:38 AM|LINK
From my DB side all connections are clear.
From my application, its work fine for some times.When i click the tree to load the left side content fastly , this problem occur in IIS when i deploy. But its not hapen while i run from my local.
ignatandrei
All-Star
134939 Points
21622 Posts
Moderator
MVP
Re: Exception Occured in MVC 3 application while Run in server not in Local
Aug 02, 2011 07:43 AM|LINK
Do you use
using
when openning a new connection?
bitse
Member
38 Points
28 Posts
Re: Exception Occured in MVC 3 application while Run in server not in Local
Aug 02, 2011 08:33 AM|LINK
IDataReader reader;
List<ItemValue> listItemvalue = new List<ItemValue>();
using (DbConnection dbCon = this.Database.CreateConnection())
{
dbCon.Open();
DbCommand dbCmd = this.Database.GetStoredProcCommand(Constant.GetCombo);
this.Database.AddInParameter(dbCmd, "@PMID", DbType.Int32, _PMID);
reader = this.Database.ExecuteReader(dbCmd);
ItemValue itemvalue;
while (reader.Read())
{
itemvalue = new ItemValue();
itemvalue.ID = LGPSUtility.ConvertToInt(reader["ID"]);
itemvalue.Type = LGPSUtility.ConvertToString(reader["Type"]);
itemvalue.Value = LGPSUtility.ConvertToString(reader["Value"]);
listItemvalue.Add(itemvalue);
}
return listItemvalue;
}
ignatandrei
All-Star
134939 Points
21622 Posts
Moderator
MVP
Re: Exception Occured in MVC 3 application while Run in server not in Local
Aug 02, 2011 08:42 AM|LINK
then speak with your hosting about the problem. Tell them that may have another app that uses servers conections without freeing .
bitse
Member
38 Points
28 Posts
Re: Exception Occured in MVC 3 application while Run in server not in Local
Aug 02, 2011 09:03 AM|LINK
We are using some other application in our same server. for this application only showing problem is there anywher i have to change in server.
ignatandrei
All-Star
134939 Points
21622 Posts
Moderator
MVP
Re: Exception Occured in MVC 3 application while Run in server not in Local
Aug 02, 2011 09:25 AM|LINK
If you own the server, the look at the Sql server connections.
bitse
Member
38 Points
28 Posts
Re: Exception Occured in MVC 3 application while Run in server not in Local
Aug 02, 2011 09:35 AM|LINK
But in LAN with in local group its working fine, while i deploy it in server, this problem occurs. Still problem is not rectified, i tried many ways.If any problem in SQL means, it should happen in same local na?
ignatandrei
All-Star
134939 Points
21622 Posts
Moderator
MVP
Re: Exception Occured in MVC 3 application while Run in server not in Local
Aug 02, 2011 10:04 AM|LINK
IF there are the same number of users on application and the sql server is serving only the application - then yes , should occur.