Web Hosting and Versions

Web Hosting and Versions

Old forum URL: forums.lhotka.net/forums/t/3289.aspx


BhailDa posted on Monday, July 30, 2007

I'm trying to get my head around the changes in the CSLA Framework. We adopted the framework in its earlier incarnations as Ver 1.1 We successfully created numerous Business Objects and used them across web projects, which were deployed to an external ISP. I understand that the newer versions of the framework (eg Ver 3) requires the ISP to register some DLLs as they use reflection. This simply won't happen.

The question is what is the lasted version of CSLA that can be used in a web hosting environment without any intervention by the ISP.

tetranz replied on Monday, July 30, 2007

I don't think you need to register DLLs (they're not COM objects) but CSLA will not run in a medium trust environment because of reflection.

Version 1.1 used reflection too so it seems that your ISP is allowing full trust or some custom permissions.

Ross

RockfordLhotka replied on Monday, July 30, 2007

Version 1.x used reflection too Smile [:)]

CSLA's .NET security requirements haven't changed. It has always required FullTrust for certain operations (n-level undo, parts of the data portal, etc).

If your ISP worked with CSLA in 1.x, it should work with 3.0 as well.

BhailDa replied on Tuesday, July 31, 2007

Thanks. I think I've been thrown by the regsvcs.exe EnterpriseServicesHostcs.dll. I dont remember instructing the ISP to do this. I assume this isn't essential. I can't remember if there was workaround as it isnt in the Book. I must admit I'm no expert of the CSLA. More a SAP Developer. But use the CSLA to encapsulate logic plus rapid deployment using Codesmith Templates. Its works...and it works very well.

Anyways, I've installed the Tracker Project 3 on Vista IIS7. Changed the settings, within config, for the SQL Express DataBase and have run the above command. I now have the following error:

 

Server Error in '/PTWeb' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 218:          innerMessage = ex.InnerException.Message;
Line 219:        }
Line 220:        throw new DataPortalException(
Line 221:          String.Format("DataPortal.Fetch {0} ({1})", Resources.Failed, innerMessage),
Line 222:          ex.InnerException, result.ReturnObject);
 

Source File: D:\Company\Development\csla3\cslacs\cslacs\Csla\DataPortal\Client\DataPortal.cs    Line: 220

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]

[CallMethodException: DataPortal_Fetch method call failed]

[DataPortalException: DataPortal.Fetch failed (Object reference not set to an instance of an object.)]
   Csla.DataPortal.Fetch(Type objectType, Object criteria) in D:\Company\Development\csla3\cslacs\cslacs\Csla\DataPortal\Client\DataPortal.cs:220
   Csla.DataPortal.Fetch(Object criteria) in D:\Company\Development\csla3\cslacs\cslacs\Csla\DataPortal\Client\DataPortal.cs:156
   ProjectTracker.Library.Security.PTIdentity.GetIdentity(String username, String password) in D:\company\development\csla3\cslacs\projecttrackercs\ProjectTracker.Library\Security\PTIdentity.cs:57
   ProjectTracker.Library.Security.PTPrincipal.Login(String username, String password) in D:\company\development\csla3\cslacs\projecttrackercs\ProjectTracker.Library\Security\PTPrincipal.cs:15
   PTMembershipProvider.ValidateUser(String username, String password) in d:\Company\Development\csla3\cslacs\ProjectTrackercs\www\PTWeb\App_Code\PTMembershipProvider.cs:11
   System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
   System.Web.UI.WebControls.Login.AttemptLogin() +105
   System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint

 

 

 

RockfordLhotka replied on Tuesday, July 31, 2007

BhailDa:

Thanks. I think I've been thrown by the regsvcs.exe EnterpriseServicesHostcs.dll. I dont remember instructing the ISP to do this. I assume this isn't essential.

That is only required if you choose to use the enterprise services data portal channel. Typically a web application will use a local data portal. And the only time ES is typically used is in an enterprise app, and then you'd control all the servers.

So it is almost certainly a non-issue for you.

BhailDa:

Anyways, I've installed the Tracker Project 3 on Vista IIS7. Changed the settings, within config, for the SQL Express DataBase and have run the above command. I now have the following error:

It sounds like there's a configuration error, like perhaps the connection string isn't being found in web.config.

Copyright (c) Marimer LLC