|
Hi
i'm looking for any example or article about how to implement user-level security for mu application.
my app scenario is :
1. My app have some forms
2. Users & Roles can define in app
3. Each user must have a role
4. Each role must have it's security level (i want in my app, admin can select a role and give a appropriate right on selected objects(forms) to that role)
How to implement this ?
A Good Idea : if u familiar with SharePoint, u saw, even users can assign a permission just for an specific Item! but don't know how to that.
any other idea would be great appreciated.
Thanks
|
|
|
|
|
We have a seperate app (user manager) that assigns the user/role/permissions for all the apps we have built.
Each app references a DLL that manages the logon, that delivers up a table of permissions to the client app. This table is referenced whenever an object requiring security authentication is used.
The biggest issue is coding for each object that needs security applied eg: a form may need rights, a button (save/delete) each needs rights. I find it impossible to second guess the userrs requirements for security so I do a screen shot of every form and make the business owner scribble on the forms the security required. This tends to reduce the security requirements dramatically.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: This tends to reduce the security requirements dramatically.
I concur. Asking very specific questions, preferably requiring some thinking *and* some tangible action, tends to simplify the requirements all the sudden.
|
|
|
|
|
I've confusing what data store in each table ?
con u give me more explain ?
modified on Friday, April 17, 2009 6:53 AM
|
|
|
|
|
I created a ftps utility in c# (console app). The uitilty works great (push and pull) for the root secure folder. So ftp.mysite.com works fine. The problem happens when I try to access a sub folder (ftp.mysite.com/ClientA). I get the following error msg from the ftp.loginWithoutUser() function:
The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for
I can not be the only developer who needs to access multiple secured folders at the same address.
Thanks in advance for your help.
dwa
|
|
|
|
|
Hi, my background is in VB, but I am trying to implement in c# form app. The installer is being held onto even after the close method. Any help is appreciated.
Object installerClassObject = Activator.CreateInstance(classType);
WindowsInstaller.Installer MSIInstall = (Installer)installerClassObject;
WindowsInstaller.Database MSIdb;
WindowsInstaller.SummaryInfo MSIsis;
WindowsInstaller.Record MSIRecord;
WindowsInstaller.View MSIView;
MSIdb = MSIInstall.OpenDatabase(strFile, 0); //0 is for read-only mode
// show current SIS subject - MSI
MSIsis = MSIInstall.get_SummaryInformation(strFile, 0); //0 indicates number of properties we will be adding or changing
txtSISSubject.Text = MSIsis.get_Property(3).ToString();
// show patch display name - MSI
MSIView = MSIdb.OpenView("SELECT * FROM `MsiPatchMetadata` WHERE `Property` = 'DisplayName'");
MSIView.Execute(null);
MSIRecord = MSIView.Fetch();
if (MSIRecord != null)
{
txtPatchDisplay.Text = MSIRecord.get_StringData(4);
}
// cleanup MSI objects
MSIView.Close();
MSIRecord = null;
MSIdb = null;
MSIsis = null;
MSIView = null;
MSIInstall = null;
|
|
|
|
|
I'm unsure if my usage of terminology is proper.
What I am doing is the following:
1) I am invoking the following method: GetOutboundBacklogFileIdRecords
2) This returns:
[in] string VersionVector,<br />
[out] DfsrIdRecordInfo BacklogIdRecords[],<br />
[out] uint32 IdRecordIndex
3) DfsrIdRecordInfo contains an attribute that I'd like to get called FileName of type string.
If I use object[] blah, then I can't assign blah["FileName"]. What do I do to access the FileName attribute?
Thanks very much,
Matt Brown
|
|
|
|
|
The FileName in a DfsrIdRecordInfo is read only why do you want to assign to it?
What type is blah?
There is a GetFullFilePath Method, could this give you what you want?
Regards
David R
|
|
|
|
|
blah is an object[] collection, an I'm attempting to use it to access the DfsrIdRecordInfo.GetFullFilePath.FileName string.
DfsrIdRecordInfo is not a type, but apparently is a class. I am unsure how to handle accessing the DfsrIdRecordInfo.GetFullFilePath.FileName string within this. Again, DfsrIdRecordInfo is being returned from GetOutboundBacklogFileIdRecords. How do I do this?
The DfsrIdRecordInfo.GetFullFilePath method would be an interesting extra feature, but querying the DFS DB on what could possibly be +500,000 files (although it would probably be limited far below this) for their full path would be fairly intensive.
See this code for what I have written: pastebin
However, ManagementObject has no GetEnumerator and can't be enumerated (foreach (ManagementObject returnedsub in returned)), so I am unsure how to access the the DfsrIfRecordInfo so that I can access it's properties. How do I do this?
Thanks for your response,
Matt
modified on Friday, April 17, 2009 9:30 AM
|
|
|
|
|
Ok, I think I see what you're trying to do, so here goes.
GetFullFilePath is a method of DfsrIdRecord that returns a string giving the full path. You can't get the file name using DfsrIdRecordInfo.GetFullFilePath.FileName.
In your code you have:
item.InvokeMethod("GetOutboundBacklogFileIdRecords", methodArgs);
This means that the second parameter should be an array of DfsrIdRecordInfo.
I think you need something like this:
DfsrIdRecordInfo [] blog = new DfsrIdRecordInfo []();
uint32 lastID;
Object[] methodArgs = {"your string", blog, lastID };
When GetOutboundBacklogFileIdRecords returns the blog array will have the backlog DfsrIdRecordInfo records.
you should then be able to iterate using something like:
foreach(DfsrIdRecordInfo rec in blog)
{
string path = rec.GetFullFilePath();
}
Caveat - I've never used DfsrIdRecordInfo in my life However from what I know of WMI and the MSDN documentation, that's what I would expect to do.
Second caveat - there may be some typos in the code fragments.
Regards
David R
|
|
|
|
|
I work around some devs; I'm the "Network and Systems Engineer," hence all this DFSR talk.
I was able to annoyingly tear one of them away from their work. She was able to aim me in the right direction of this (declaring the type DfsrIdRecordInfo). Except there is no type accessible DfsrIdRecordInfo to be assigned. See my response to myself (top of the tree) where I figured out that I'll probably get it by using Type and System.Reflection.
Very interesting situation; and very good to know. Being this "Network and Systems Engineer" thing, I tend to use WMI for all my work, while you all (devs, like my co-workers who I incessantly ask questions) don't. WMI's interface is all sorts of weird. It's basically like if you stored a bunch of classes in an SQL DB instead of storing them in a class. Maybe I'm simply a novice, but I find that kinda weird. Apparently, Reflection is part of the .NET framework, so if that's an indication, I suppose it isn't weird.
Hopefully this will work, and I'll post code when it does.
Thanks,
Matt
modified on Friday, April 17, 2009 12:29 PM
|
|
|
|
|
Good to here you've got some help
I only know about WMI because I've played with it on my home network - don't do anything with it at work.
Regards
David R
|
|
|
|
|
|
I think what I'm going to have to do is use Type and use Reflection!
Type MSDN
using System;<br />
using System.Reflection;<br />
<br />
class Example<br />
{<br />
static void Main()<br />
{<br />
Type t = typeof(String);<br />
<br />
MethodInfo substr = t.GetMethod("Substring", <br />
new Type[] { typeof(int), typeof(int) });<br />
<br />
Object result = <br />
substr.Invoke("Hello, World!", new Object[] { 7, 5 });<br />
Console.WriteLine("{0} returned \"{1}\".", substr, result);<br />
}<br />
}<br />
<br />
|
|
|
|
|
|
Hi evryone
I need to build a Listener that run GG.exe program evry 30 minute
what is the best way ?
1. to build Windows Service
2. or to build WinForm program that start up when the computer Rise up
if 1 is the best way, how can i run external exe file ?
i'll try this:
System.Diagnostics.Process G = new Process();
G.StartInfo.FileName = @"d:\demo.exe";
G.Start();
but it dont work
thank's
|
|
|
|
|
I have an excel file and want to copy data to sql server. The excel file has a field name: device name , and a field named: model...(there are 30 more fields)
deviceName model
laptop acer 1640
laptop fujitsu
laptop sony
notebook ibm
laptop ibm.
I need to transfer these files into the sql server database. i know that i require 2 tables in sql with one table for devices and another for models and both should have a relationship of M:N. hence another table is required.
My question is that is there any easy way of doin this in sql server or do i have to program it... I have searched regarding dts and it seems that dts works well when only one table has to be transtered to one table. there is a possibility that dts does it but i don't know how to develop scripts in dts as i am an asp.net developer. Do i have to find a way out using C# or are there any tools that solve such problems
any help will highly appreciated.
thanx
haseeb
|
|
|
|
|
Suddenly there are a heck of a lot of posts about this.
Is this the latest coursework assignment?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Unless it's an international course they're doing.....no
but still there's a heck of a lot of them
|
|
|
|
|
how can i load and play multiple videos using the "axWindowsMediaPlayer" tool ????
plz help -----
|
|
|
|
|
By building a playlist, either in the control ( I believe that's possible ), or by handling the event when a video ends and loading the next one.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
when the first video gets over the next one should be loaded automatically and should start playing....
I tried a lot bt, I am nt able to do it...
plz help -----
---mist----
|
|
|
|
|
Hi,
I am a .NET developer using VB.NET but not haven't had a chance to
learn and fell the OO priniciples to the fullest in a way they are
supposed to be learn. I want to switch to C# as the whole world slowly
moving towards it and at the same time learn all the OO priniciples in
a right way. In this process I am trying to find a book which explains
all fundamentals of OOP and illustrate how to develop a small
application implementing all these OO priniciplese would help me
understand the whole thing in one shot.
Are there any great books or videos that would help me accomplish my
goals? I am desperate to find an excellent book that mainly illustrate
an sample project/case study implementing all OOP with comments for
better understanding of the OOP techniques and scope of the project as
well.
Please advice.
Thanks,
-L
|
|
|
|
|
"Head First C#"[^], from O'Reilly was a good read. It assumes no prior programming knowledge and is being used in the classroom. It's loaded with examples, and fun to read.
For video's, I'd like to recommend the MSDN library "How Do I"[^] section. It's filled with short tutorials, not limited to C#.
Enjoy
I are troll
|
|
|
|
|
Thanks for the quick reply. I will sure look into this book.
Thanks,
L
|
|
|
|