CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

'Csla.Server.DataPortalException' to type 'Csla.Server.DataPortalResult'

rated by 0 users
Answered (Not Verified) This post has 0 verified answers | 6 Replies | 4 Followers

Not Ranked
2 Posts
vignesh Huh? [:^)] posted on Tue, Jul 10 2012 8:59 AM

Unable to cast object of type 'Csla.Server.DataPortalException' to type 'Csla.Server.DataPortalResult'

is this web service error or code error can one give me the clear scenario about  this ....  

Thanks.

 

 

 

 

All Replies

Top 75 Contributor
112 Posts

Error and valid results are usually not the same. If you could give the code snippet, where the cast occurs or at least the call.

Not Ranked
2 Posts

Hi stefan,

here the call stack for the  error....it happens while it try to call the WCF web service. 

Server Error in '/' Application.

Unable to cast object of type 'Csla.Server.DataPortalException' to type 'Csla.Server.DataPortalResult'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidCastException: Unable to cast object of type 'Csla.Server.DataPortalException' to type 'Csla.Server.DataPortalResult'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[InvalidCastException: Unable to cast object of type 'Csla.Server.DataPortalException' to type 'Csla.Server.DataPortalResult'.]
   HIA.BM.BL.CSLAClasses.HIADataPortal.Fetch(Type objectType, Object criteria) +388
   HIA.BM.BL.CSLAClasses.HIADataPortal.Fetch(Object criteria) +50
   HIA.BM.BL.CollectionClasses.ModulePermissionsCollection.GetHIAModuleCollection() +640
   HIA.BM.Web.Controllers.AccountController.Login(String username, String password, Boolean rememberMe, String returnUrl) +711
   lambda_method(Closure , ControllerBase , Object[] ) +284
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +248
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
   System.Web.Mvc.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7() +126
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +641
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +641
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +312
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +741
   System.Web.Mvc.Controller.ExecuteCore() +198
   System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +195
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +597
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

 

Top 10 Contributor
9,269 Posts

This is occuring in CSLA 4 version 4.3.x?

Rocky

Not Ranked
2 Posts

It's occurring in CSLA 4 version...........

Not Ranked
2 Posts

it's occurring in CSLA 4.0.0.0  version...........

Top 10 Contributor
1,764 Posts
Suggested by JonnyBee

This obviously happens in the class HIADataPortal - which is not a part of CSLA.

It seems lke you have implemented your own HIADataPortal and there is a bug in this class - NOT CSLA. .

Jonny Bekkum, Norway CslaContrib Coordinator

Page 1 of 1 (7 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems