StrataFrame Forum

Type or namespace name 'SecurityDialog' could not be found

http://forum.strataframe.net/Topic17824.aspx

By Keith Gordijn - 7/12/2008

Hi All,



I am a rank novice with .NET so please bear with me if I ask completely stuid questions. I guess the only really stupid question is the one you don't ask...



I have been evaluating StrataFrame today by working my way through the tutorials and spending some considerable time delving into the forum. I have just started going through the user contributed sample, specifically the StrataFrame Windows Application with Security by Charles Thomas Blankenship, thanks Charles.



I have just added the button that calls the following:



private void LaunchSecurityEditor()

{

//-- Establish Locals

SecurityDialog loForm = null;

//-- See if the current user has rights to the security dialog

if (SecurityBasics.CurrentUser.GetPermission("Application Security").Action == PermissionAction.Grant)

{

loForm = new SecurityDialog();

loForm.Show();

}

else

{

MicroFour.StrataFrame.Messaging.MessageForm.ShowMessage("Access Denied",

"Security Editor access has been denied.", "",

MicroFour.StrataFrame.Messaging.MessageFunction.OK,

MicroFour.StrataFrame.Messaging.MessagingIcon.Forbidden,

MicroFour.StrataFrame.Messaging.MessagingSounds.Warning);

}



and get the error:



Error1The type or namespace name 'SecurityDialog' could not be found (are you missing a using directive or an assembly reference?)C:\Projects\Visual Studio Projects\SFSecurity\SFSecurity\frmMain.cs3113SFSecurity



Is this just because I only have the evaluation version of StrataFrame or am I missing something simple? I have attached a screen image of the code, compile error and references.



Any help is appreciated and I have to say I am impressed with what I have seen of StrataFrame so far.



Cheers, Keith
By Greg McGuffey - 7/14/2008

Keith,



You'll need three things to make this work.



1. You need the role based security module. Since you in trial, I believe this is included, so you should be good to go. If you need this going forward, this is a separate purchase than the framework.



2. You need to reference the security library. Just right click the project in the solution explorer and click on properties (or somehow open the properties for the project). Make sure there is a reference to the Microfour StrataFrame Security module. If not, click the add button and scroll down until you find it.



3. You will need to use the correct names space or fully qualify the name (Microfour.StrataFrame.Security.SecurityDialog). Just put a using statement at the top:

using Microfour.StrataFrame.Security




Or in VB

Imports Microfour.StrataFrame.Security




Hope that helps! ...and don't worry about asking questions. Many of us were/are in you shoes, so by asking you help both yourself and anyone else who is in the same boat (I was a bit over a year ago myself)!
By Keith Gordijn - 7/14/2008

Hi Greg,



Thanks for the reply.



Last night I purchased StrataFrame the role based security an the database deployment package. BigGrin



I then saw your reply but by then I had installed the trial version then reinstalled the licensed version and now I am getting an SQL Server connection error that I need to sort out.Unsure Did I mention that I am also a complete SQL newbie so I am now climbing two learning curves at once and actually looking forward to it. I purchased StrataFrame personally, away from work, but am hoping one of our SQL Server gurus at work can give point me in the right direction.



Regards, Keith
By Greg McGuffey - 7/14/2008

I'm with ya...I've always like hill climbing myself w00t



If you have any more trouble/issues/questions, post 'em!
By Keith Gordijn - 7/14/2008

I sorted out my SQL issue and your suggestion number 3 did the trick so I'm back into it. BigGrin



Thanks Greg.
By Greg McGuffey - 7/14/2008

Cool! Cool
By Trent L. Taylor - 7/15/2008

Good answers, Greg! Smile