Unable to set up PTWeb Sample Project 2.0 - DataPortal.Fetch failed error occurs after log inUnable to set up PTWeb Sample Project 2.0 - DataPortal.Fetch failed error occurs after log in
Old forum URL: forums.lhotka.net/forums/t/507.aspx
mharper posted on Thursday, June 29, 2006
I am trying to set up the Project Tracker sample project for the web (C#), and I get the following error:
Csla.DataPortalException was unhandled by user code
Message="DataPortal.Fetch failed"
Source="Csla"
StackTrace:
at ProjectTracker.Library.Database.get_SecurityConnection() in C:\Program Files\CSLA Framework\ProjectTracker20cs\ProjectTracker.Library\Database.cs:line 21
at ProjectTracker.Library.Security.PTIdentity.DataPortal_Fetch(Criteria criteria) in C:\Program Files\CSLA Framework\ProjectTracker20cs\ProjectTracker.Library\Security\PTIdentity.cs:line 92
at Csla.MethodCaller.CallMethod(Object obj, MethodInfo info, Object[] parameters) in C:\Program Files\CSLA Framework\csla20cs\Csla\DataPortal\MethodCaller.cs:line 56
at Csla.MethodCaller.CallMethod(Object obj, String method, Object[] parameters) in C:\Program Files\CSLA Framework\csla20cs\Csla\DataPortal\MethodCaller.cs:line 37
at Csla.Server.SimpleDataPortal.Fetch(Object criteria, DataPortalContext context) in C:\Program Files\CSLA Framework\csla20cs\Csla\DataPortal\Server\SimpleDataPortal.cs:line 101
at Csla.DataPortal.Fetch(Object criteria) in C:\Program Files\CSLA Framework\csla20cs\Csla\DataPortal\Client\DataPortal.cs:line 173
at Csla.DataPortal.Fetch[T](Object criteria) in C:\Program Files\CSLA Framework\csla20cs\Csla\DataPortal\Client\DataPortal.cs:line 138
at ProjectTracker.Library.Security.PTIdentity.GetIdentity(String username, String password) in C:\Program Files\CSLA Framework\ProjectTracker20cs\ProjectTracker.Library\Security\PTIdentity.cs:line 57
at ProjectTracker.Library.Security.PTPrincipal.Login(String username, String password) in C:\Program Files\CSLA Framework\ProjectTracker20cs\ProjectTracker.Library\Security\PTPrincipal.cs:line 15
at PTMembershipProvider.ValidateUser(String username, String password) in c:\Program Files\CSLA Framework\ProjectTracker20cs\www\PTWeb\App_Code\PTMembershipProvider.cs:line 11
at System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e)
at System.Web.UI.WebControls.Login.AttemptLogin()
at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I am running this on my own IIS (XP Pro) and own SQL Server (SQL Server 2005 Developer Ed.) .
My CslaDataPortalProxys value is EnterpriseSercivesHost.EnterpriseServicesProxy, EnterpriseServicesHostcs.
My connection string is as follows:
<connectionStrings>
<add name="PTracker"
connectionString="Server=<ServerName>\_2005;Database=PTracker;Integrated Security=True;"
providerName="System.Data.SqlClient" />
<
add name="Security"
connectionString="Server=<ServerName>\_2005;Database=Security;Integrated Security=True;"
providerName="System.Data.SqlClient" />
</
connectionStrings>
The EnterpriseServicesHostcs.dll & EnterpriseServicesHostcs.pdb is in my bin directory.
Thanks in advanced,
Michael
ajj3085 replied on Thursday, June 29, 2006
What was the inner exception for that exception?
mharper replied on Thursday, June 29, 2006
Thanks for your response, I found the issue. The COM+ Application Root Directory needs to be set in component services.
dileepagarwal replied on Wednesday, August 09, 2006
I am a new user to CSLA. Today I have started with default project (projectTracker20cs).I have changed the connection string in the all config file. When I tried to run the project I am getting DataPortal.Fetch failed error. You mentioned that you set the com+ service, could you please let me know how you did that.
Thanks,
Dileep
dileepagarwal replied on Wednesday, August 09, 2006
Yes I did, but I do not know if I need to register some dll to com+ services or something like that. I am new to this and I even do not have idea about local and remote data portal.
Basically I want to choose a technology(across the wire data transfer with WCF, nettcpbinding) and want to make use of CSLA for business object if they will fit in my architecture some where.
could you please help me in this regards as I am not able to run the projecttracker20cs.
Thanks,
Dileep
dileepagarwal replied on Wednesday, August 09, 2006
I am having problem in line no. 184 of dataportal.cs class when i tried to use following line:
result = proxy.Fetch(objectType, criteria, dpContext);
Is their anything am I missing?
Dileep
RockfordLhotka replied on Wednesday, August 09, 2006
Is this a compiler error or a runtime error? Either way,
what is the error?
I am having problem in line no. 184 of dataportal.cs class when i tried to
use following line:
result = proxy.Fetch(objectType, criteria, dpContext);
Is their anthing am I missing?
dileepagarwal replied on Thursday, August 10, 2006
This is a runtime error. I am getting this error after I provide login information on the login screen.
Dileep
RockfordLhotka replied on Wednesday, August 09, 2006
Then I suggest reading Chapter 12, as it discusses how to
configure each of the three data portal channels - walking through the steps in
pretty good detail.
It is the case that on the server you need to register the
enterprise services host assembly. And you'll have to register the COM+
Application on each client too - this is one of two primary drawbacks to using
the ES channel (the upside being how fast it is; the other drawback being that
DCOM isn't very firewall-friendly).
I don't follow how WCF fits in here? You want to use WCF as
your data portal channel? Or you are creating a set of WCF services and want to
implement the services using CSLA objects? Or you are creating a client that is
calling WCF services and want to implement the client using CSLA
objects?
All three options are valid, but each is quite different in
its implication.
Rocky
dileepagarwal replied on Thursday, August 10, 2006
Regarding WCF integration, I want to create a WCF service that will send the data to the client and client sides (Windows form) will also having the WCF support (using NetTcpBinding). I want to make use of CSLA to create my business objects and data objects that will transfer between server and client (Across the wire over Internet). I heard that CSLA.Net providing consistent business logic and concept of data portal and data objects (Please correct me if I am wrong).
Will this make sense or do I need to think some different approach.
If I will use the CSLA to transfer large data back and forth will it hit the performance of application? As right now I am sending the data from server to client in the form of dataset and getting back the updated dataset (using diffgram or GetChanges() method) back from client to server.
Please let me know your views.
Thanks,
Dileep
RockfordLhotka replied on Thursday, August 10, 2006
In that case I think you want a WCF data portal
channel. Here's a prototype:
That channel allows you to use the full capabilities of
CSLA, and use WCF as the network transport between client and server. The only
restriction on your WCF configuration is that you must configure it to use a
synchronous approach - the data portal isn't designed to work in an async
mode.
Also be aware that, like WCF, the data portal channel is
very much a test. It is not final code, and may or may not really work for you
at this time. The current version of the code (that works with CSLA 2.0.1 or
higher) is only in cvs (www.lhotka.net/cslacvs) so you'll have
to get it from there.
To see whether CSLA is the right fit for your needs, you
need to read Chapter 1 and possibly Chapter 2. That will give you a good
understanding of the philosophy and approach I am taking with the framework and
you can assess whether that matches your requirements.
Rocky
Regarding WCF integration, I want to create a WCF service
that will send the data to the client and client sides (Windows form) will
also having the WCF support (using NetTcpBinding). I want to make use of CSLA
to create my business objects and data objects that will transfer between
server and client (Across the wire over Internet). I heard that CSLA.Net
providing consistent business logic and concept of data portal and data
objects (Please correct me if I am wrong).
dileepagarwal replied on Thursday, August 10, 2006
Thanks Rocky,
I will read the book and will get back to you.
By the way I solved the DataPortal.Fetch problem. Actualy I was using the SQL server 2005 not the Express addition. I changed the database and connection string it's working now.
Dileep
dileepagarwal replied on Thursday, August 10, 2006
One more thing, every help regarding CSLA.net is depends on either forum or on the Books (which you are referring). Will it not be good if you will provide sample chapters on your site (like 2-3 chapters) that will give idea to make a decision regarding CSLA technology and how to use it? After this if we need to go ahead with CSLA.net we can buy the book.
Dileep
RockfordLhotka replied on Thursday, August 10, 2006
Perhaps, except that the only income I make off this work
is through sales of the books (and any donations through
PayPal).
I honestly have no real incentive to convince people to
just use CSLA. Having a lot of people use the framework without buying the book
is not useful to me...
Now if I made the framework commercial (which is not my
plan), then I'd be incented to use chapters from the book as a marketing tool to
sell more copies of the framework.
But as it is, the framework is a marketing tool for the
books, so I am incented to use the framework to get people to buy the
books.
Rocky
Copyright (c) Marimer LLC