Continuing Problem with Error in Project Tracker Demo Code

Continuing Problem with Error in Project Tracker Demo Code

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


av_harris posted on Thursday, May 17, 2007

I was monitoring the thread http://forums.lhotka.net/forums/thread/13731.aspx for a resolution and it seems to have been abandoned.

I've tried following the instructions pertaining to setup for the DataPortal but there were many options and it is possible that I've confused my IIS installation.

Does anyone know how to resolve the stoppage at:

Throw New DataPortalException( _
String.Format("DataPortal.Fetch {0} ({1})", My.Resources.Failed, ex.InnerException.InnerException), _
ex.InnerException, result.ReturnObject)

in the DataPortal.vb assembly?

RobKraft replied on Friday, May 18, 2007

If I recall correctly, the PTWeb project is configured to use .Net Remoting by default.  If you just want to run it on your local machine, you need to turn this off.  In the web.config file of PTWeb, comment out these two keys in <appsettings>

add key="CslaDataPortalProxy"

add key="CslaDataPortalUrl"

RockfordLhotka replied on Friday, May 18, 2007

It is actually configured to use EnterpriseServices by default. The reason I chose that is to minimize the configuration effort required to get PTWeb running to start with.

If you choose local, then you need to put the database files somwhere that they can be reached by ASP.NET and change the connection strings. I didn't want to do that, because then I couldn't share those db files with the other UI projects.

If you choose remoting or web services, there's extra security configuration required to get IIS/ASP.NET to allow the web app to call the data portal server.

The easiest channel to configure for this purpose, is the EnterpriseServices channel, because all you need to do is run regsvcs to register one assembly and set one path in a properties dialog to point to the right folder. No complex db or security setup required.

av_harris replied on Friday, May 18, 2007

Thanks for pointing me in the right direction. Since I will be developing a web app, I decided to go with the WebServices. After a little research, I got the connection string to issue the correct validation against the user I created in SQL Server. The demo is now working fine and I hope to learn from a working model as I complete reading the book.

RockfordLhotka replied on Friday, May 18, 2007

Though that is fine (to use web services), I always recommend that people use as few physical tiers as possible.

 

What this means in practice, is that you should, if at all possible, use the data portal in local mode. Your performance will be best that way, and your complexity reduced.

 

In a web environment, the only real reason for using a remote data portal at all is if you need to put a second firewall between your web server and app server for increased security. If that’s your setting, great. But if not, I strongly recommend the use of the local configuration (2-tier) for web apps.

 

Rocky


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.7.3/809 - Release Date: 5/17/2007 5:18 PM

av_harris replied on Friday, May 18, 2007

Alll right. I'd like to try your preferred method because I doubt we will have the 2-firewall scenario.

Which key do I activate in web.config? And, when you say local, does this refer to the db too? I moved everything from the mdf file into SQL Server 2005 because this is what my development environment will be.

I've got the book sitting here (VB version) so if you want to point me to the page I need to read, that's fine.

Copyright (c) Marimer LLC