|
Hi folks!
I guess it's a newbie question in the area of AD/LDAP, but I was wondering how one could implement a single sign-on mechanism with two collaborating applications.
At the moment, I have an application (A) with its own user administration. User names and (hashed) passwords are stored in a database and the application has its own logon dialog that checks login information against the entries in the database.
Another application (B) can use (A) basically by calling the application with some command line options. One command line option is a user name and (plain) password for (A) to use. In this case, (A) stuffs the user name and password into the logon dialog and handles this information as if it was entered manually.
The disadvantage is that (B) has got to know the user names and passwords from (A) for this to work, so I have to manually keep (A)'s and (B)'s users (and passwords) in sync.
Now I wanted to add an option for (A) to use AD/LDAP for user authentication and I think the basic login dialog with AD users and checking with AD if the password is correct can be programmed easily. What I don't know (and I hope one of you can give me a hint in the right direction) is how (B) can give (A) the information that a user already has authenticated himself in (B) and (A) can use these user credentials without asking the password again. AFAIK there's no way to get the plain password out of AD, so (B) can't give the plain password to (A) like before...
Any ideas?
Thanks in advance,
mav
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
On a data grid is there a way to set the current row number? For example if I know that the black pointer on the left is pointing at current row index 10 and I want the current row to be 11 how do I set it?
DataGridView1.CurrentRow.Index is read only.
|
|
|
|
|
Jawa2006 wrote: On a data grid is there a way to set the current row number?
You really want to work with a CurrencyManager, and the BindingSource class does a great job of working with an underlying data source associated with your DataGridView. The BindingSource has a Position property you can use to set the position, which is reflect in the DataGridView.
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
i wanna create a form which shows list of all systems in network
If, u know please help.
Thanks
siddhartha
|
|
|
|
|
I seen an article on this subject here on code project some months ago, search through the aricles section.
|
|
|
|
|
i wanna create a form which shows list of all systems in network
If, u know please help.
Thanks
|
|
|
|
|
When fast user switching is enabled, how can a service find out which user is the active user?
(I realise this is more of an operating system question than a C# one, but there didn't seem to be a suitable operating system message board, and I am developing with C#/.NET 2.0, so I hope it's OK here.)
Dave
|
|
|
|
|
Ok, I have to admit that I am more of a VBer (no flames PLEASE) than a C#er here but I am trying to work through something that just does not seem to make sense and am looking for some help. I am trying to convert a OS project called NClass over form C# to VB, mostly just as an exercise in reading C#, learning the REAL differences between the two as well as to end up with a component that I can use latter on.
I have run across the following lines of C# code that, although I can convert it to VB no problem, makes little sense to me and in fact throws an error.
shapes[i].Draw(g, shapes[i].Location - (Size) area.Location + marginSize);
Does C# allow you to cast a Point type to a Size type?
I THINK I get the idea about what they are trying to do here (draw a shape on an image based upon its location in relation to the location of the shape on the drawing area plus adding a bit for a margin) but it simply makes no sense to me that you would be allowed to do this in this manner.
Can anyone enlighten me?
Seems to me this falls into the category of one of those things that C# lets you get away with but is not all that proper.
|
|
|
|
|
Ray Cassick wrote: Does C# allow you to cast a Point type to a Size type?
Yes.
public static explicit operator Size (
Point p
)
Specifically so you can use points in size operations. Otherwise you would have to do something like "new Size(p.X, p.Y)". Of course, that's what's happening internally, I imagine.
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
There is an explicit conversion (op_Explicit) defined for a Point to a Size structure.
public static explicit operator Size (Point p)
You can do this in Visual Basic as well. The syntax is just different.
//C#
Point myPoint = new Point();
Size mySize = (Size)myPoint;
'Visual Basic
Dim myPoint As New Point
Dim mySize As Size = CType(myPoint, Size)
'or
'Dim mySize As Size = Point.op_Explicit(myPoint)
|
|
|
|
|
Thanks for that...
I guess you DO learn something new every day.
|
|
|
|
|
I splitted an image into small pieces (segments) and made some functions on them, then now i want to merge (reconstruct) these pieces into one image agian using c#, does anyone know how can I do this?
Thank you
Mayy Magdy Saad
Junior Solutions Developer
|
|
|
|
|
You can create a new Bitmap (an empty one with known size, or a copy of an existing image),
then create a Graphics object for it with Graphics.FromImage
then perform whatever drawing operations you want to apply,
and maybe end it all with a Bitmap.Save()
Luc Pattyn
|
|
|
|
|
Good anwser .. it almost sounds like a breakfast recipe
|
|
|
|
|
|
Hi all,
We have developed a web application with .net 2.0 in asp.net.
I am trying hard for the last couple of weeks to use sitemap for role based access.
we are authenticating users with our custom code (LDAP and database table based on user type).
I am not able to use the role based access for sitemap.
tried enabled securitytrimming in web.config and enabling rolemanager etc. but when i enabled that nothing was visible in the menu bar.
when i dont keep security trimming in web.config i see all the menu items (roles are not applied).
any one who has worked on this, could you please through some light on this.
this is bit urgent.
|
|
|
|
|
Is there a way to compile C# applications to native win32 executables that don't need the framework to be executed?
Thanks in advace.
Mohamed El Gohary
|
|
|
|
|
Yes, using this tool. But doing so is not recommended at all.
|
|
|
|
|
i read from database but i dont know how many labels ill need. so how can i make label in for loop:
DataTable strani= upo.return(ime);
for (int i = 0; i!=x; i++)
{
//i dont want that->
Label1.Text = strani.Rows[i][0].ToString();
HyperLink1.Text = strani.Rows[i][1].ToString();
HyperLink1.NavigateUrl = strani.Rows[i][1].ToString();
...}
|
|
|
|
|
...just on first glance, I would assume that you could just create a new System.Windows.Controls.Label inside your for loop, set the label text appropriately, and offset it's location on your form...you'd probably want to resize the form while you're at it so you don't end up running off the appspace while you're dynamically creating this thing
(Nyquist Rate || ! Nyquist Rate)
{
Console.WriteLine("That is the question.");
}
|
|
|
|
|
i am making it in asp.net,so i dont know if that is the same you wrote. i tried Label neki = new Label(); but it doesn work
|
|
|
|
|
Hello,
boss-tech wrote: i tried Label neki = new Label(); but it doesn work
What, doesnt work?
Have you added your new label instance to the controls collection of youre form?
YourForm.Controls.Add(YourLabel);
P.S.: * I just cant find the question mark on that french keyboard Im working on!
found it
All the best,
Martin
-- modified at 9:59 Monday 22nd January, 2007
|
|
|
|
|
You're going to want to use a PlaceHolder.
protected PlaceHolder ph = new PlaceHolder();
.
.
.
for(int i = 0; i < numberOfLabels; i++)
{
Label l1 = new System.Web.UI.WebControls.Label();
l1.ID = "Label" + i;
l1.Text = strani.Rows[i][0].ToString();
ph.Controls.Add(l1);
}
...You're probably not going to want to add it to the form.Controls default placeholder. ...It could screw your formatting up later on
(Nyquist Rate || ! Nyquist Rate)
|
|
|
|
|
It works
Does anyone know how to get datatable size- not original size, but how many data was written into datatable- how many rows? help
-- modified at 16:09 Tuesday 23rd January, 2007
|
|
|
|
|