我刚在我的谦虚的专用服务器(Win2003)上推出了我的小型web应用程序,使用ASP.NET MVC、LINQ2SQL、SQL Express 2005和IIS6(使用通配符映射设置)。
The website runs smoothly 90% of the times. However, on relatively high traffic, LINQ2SQL throws the error: Specified cast is not valid
此错误仅在高流量时出现。我完全不知道为什么会发生这种情况,缓存并未完全消除这个问题。
Anyone seen this problem before? are there any secret SQL Server tweaking I should ve done? Or at least, any ideas on how to diagnose this issue? because i m out!
奈米 (Naimi)
堆栈跟踪(来自事件日志):
at System.Data.SqlClient.SqlBuffer.get_SqlGuid() at System.Data.SqlClient.SqlDataReader.GetGuid(Int32 i) at Read_Friend(ObjectMaterializer`1 ) at System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext() at Dudlers.Web.Models.DudlersDataContext.GetFriendRequests(Guid userId) in C:WebModelsDudlersDataContext.cs:line 562 at Dudlers.Web.Controllers.BaseController.View(String viewName, String masterName, Object viewData) in C:WebControllersBaseController.cs:line 39 at System.Web.Mvc.Controller.View(String viewName) at Dudlers.Web.Controllers.CatController.Index() in C:WebControllersCatController.cs:line 25 at lambda_method(ExecutionScope , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(MethodInfo methodInfo, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.c__DisplayClassb.b__8() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.c__DisplayClassb.c__DisplayClassd.b__a() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(MethodInfo methodInfo, IDictionary`2 parameters, IList`1 filters) 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.ProcessRequest(HttpContextBase httpContext) at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) at System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)