Examples of a .Net Encapsulated Invoke, Custom Auth project.

Examples of a .Net Encapsulated Invoke, Custom Auth project.

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


gajit posted on Thursday, February 16, 2012

Can anyone help with this?

I am still struggling to make significant progress with implementing CSLA 4 - in a VB.Net Forms environment and can't help but feel that I - and this section of the community has been left to out own devises, without a paddle, etc.

The CSLA eBooks and source examples in my opinion don't provide enough information for me to get this new project off the ground - and I can't believe I'm the only person who is  struggling with this. I appreciate it may not make commerical sense to provide a VB/Windows Forms eBook - but some more significant libraries/source code packagaes for each platform would have, in my opinion, been helpful. In CSLA2 we had the luxury of a 'complete' ProjectTracker library and WindowsForms/WebForms solutions - in 4, we have nothing of the sort, and that's making it VERY frustrating to build something from scratch - with no concrete examples.

All I am trying to do at this point is create a simple form, implementing a custom (CSLA) authenticated login/logoff - on a simple 2-tier platform.

I find myself looking at the 'EncapsulatedInvoke' solution which I was hoping to use to get an idea of how the various DAL components should be structured, and also the 'Custom' Authentication project from codeplex that should give have given me plenty og clues to how to implement that - but I'm not even sure what data access model it is using??!!

I now find myself using an online c# to vb.net code translator, trying to build the classes in vb and creating a new project. But frankly, I'm getting no closer to figuring this out. Paths are not being resolved correctly - specifically in the CustomIdentity and CustomPrincipal classes.

Namespaces don't appear to be referencing correctly, and I'm getting errors that make ZERO sense. E.g. In  my AuthorizeDataPortal class

 

 

 

Implements IAuthorizeDataPortal

 

 

Public Sub Authorize(clientRequest As AuthorizeRequest)

...

The "Implements IAuthorizeDataPortal" errors with "Class 'AuthorizeDataPortal' must implement 'Sub Authorize(clientRequest As AuthorizeRequest)' for interface 'Csla.Server.IAuthorizeDataPortal'.

What the...?

If anyone has a little time - and patience to help, it would be greatly appreciated - or even some pointers in a direction where I could find relevant code. It doesn't have to be VB - but a .Net encapsulated invoke model with custom authentication would help.

Thanks,

Graham

 

JonnyBee replied on Thursday, February 16, 2012

gajit

All I am trying to do at this point is create a simple form, implementing a custom (CSLA) authenticated login/logoff - on a simple 2-tier platform.

Well, then you have absolutely no need to dig into IAuthorizeDataPortal!!!

You only need to create your own custom CslaPrincipal and CslaIdentity (both serializable) and configure the data portal to not use Windows Authentication.

Then add AuthorizationRules for the "root" data portal methods (CanCreate, CanGet, CanEdit, CanSave, CanDelete).

Have a look at the:

all use CustomPrincipal and is included in the CSLA Samples download.

gajit replied on Thursday, February 16, 2012

Jonny

You must be mistaken. I've just downloaded the latest samples - to be absolutely sure. But there isn't a WfUI for project tracker.

Can you pinpoint exactly where you are seeing it?

 

JonnyBee replied on Friday, February 17, 2012

Hi,

It is the CSLA trunk and is recently added so it does not exist in the Samples download. 

You will need to download the latest source from trunk - instructions is here: http://www.lhotka.net/cslanet/Repository.aspx

 

gajit replied on Friday, February 17, 2012

ahhh...  Thanks Jonny. I'll take a look.

Graham

RockfordLhotka replied on Friday, February 17, 2012

Yes - although I'm not convinced that I can justify writing a Windows Forms book at this point, I have decided to add a Windows Forms UI project to the ProjectTracker sample for 4.3.

To this end, I took the 3.0.5 Windows Forms project and updated it for CSLA 4 and .NET 4. It will be in the 4.3 samples download when 4.3 releases in a couple weeks, and as Jonny pointed out, it is in svn now.

gajit replied on Sunday, February 19, 2012

Thank you Rocky.

 

I think that is the correct decision.

I can understand the reluctance to write an eBook. But this will help immensely - with this being the only 'real-life' reference for us 'Forms' developers.

I should be able to use this to move forward.

Thanks again.

Graham

 

gajit replied on Sunday, February 19, 2012

Hmmm, trying to grab the latest version on svn.

Do I need different credentials? Seems that the credentials I use for Lhotka.net don't work when connecting using TortoiseSvn...

?

 

gajit replied on Sunday, February 19, 2012

never mind.

figured it out.

figured it out

Copyright (c) Marimer LLC