|
I'm looking for a faster way to determine AD inheritance. Example: User object "JDOE" is a member of security group "Test Group". "Test Group" is a member of "Test Group 2". The "JDOE" object does not show as being a member of "Test Group 2" exclusively, so a recursive search is the only way I've been able to figure it out. Problem with this is that it takes about 1 second per query -- if the user object belongs to a complex network of groups it takes a second for each group.
I a method that given the user object and group object, it will call itself for each group that its a member of recursively. In my case I belong to 14 groups, it had to query 23 group objects before it found "Test Group 2".
I may even be going about this the wrong way; perhaps AD is the wrong tool for the job. Any suggestions?
|
|
|
|
|
Hello Everyone,
I have decided to learn C# , having a good C++ backgroung , could you recommend me a good C# programming book for beginners.
PS. My favourite C++ programming book is C++ How to Program - Harvey M. Deitel
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
"Programming c#" from O'Reilly. It doesn't cover all the really advanced topics but ~98% of what I've needed to do in c# so far was cover. YMMV
I have the 4th ed which is .net2.0 most of it's contents are back applicable to 1.1 if you're required to work in the old environment.
Be careful with the title O'Reilly also has a book targeted at nonprogrammers with an extremely similar name.
|
|
|
|
|
I started with "Programming C#" from O'Reilly and it is a good book. But I picked up "Beginning Visual C#" from Wrox and I have to say that I prefer that one. I think it does a better job at explaining things. The first half is devoted to syntax using console application examples and the second half is devoted more towards the windows side of things using Windows application examples.
Sean
|
|
|
|
|
Hello,
When I work with Microsoft.Office.Interop.Excel i have a error "Old format or invalid type library." becouse the culture is not set corectly. Then i set the culture for english and it's work:
oldCl = System.Threading.Thread.CurrentThread.CurrentCulture;
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
...
System.Threading.Thread.CurrentThread.CurrentCulture = oldCl;
The problem is that i don't know what excel (what language) the user heve install. mybe he have excel in german... How can i find what kind of excel the user have install (englis version, german version...) to set then the culture for english or german?
Where i can find a list with all culture (code of culture)?
Thanks,
Mihai
|
|
|
|
|
Hi, i have a project that uses a crystal report file. So i link this file to my access database and everythings is ok. But after creating the setup project and intalling it, the report is opening, there is no error, but there is no data in it. My guess is that here isn't anymore a connection with the database (because the setup changed the path or something). Does anone has any idea what this could be and how can i fix it? I'm trying to solve this problem for 2 weeks now and...no results so far.
Thanks!
|
|
|
|
|
Hi,
I have created a crystal report and exported too.
The problem is need to save that report in harddisk through C#code?
can I save this in database?
Thanks
Pooja
|
|
|
|
|
you can save a crystal report using code.. there are a lot of articles here in CP iteslf..
http://www.codeproject.com/csharp/leTaonarticle2.asp
|
|
|
|
|
Hi,
I am facing one problem while connecting my project to connecting with visual source safe(VSS).
actually it's problem of VSS
I am working with Visual studio 2005 beta 2 and my project database is on some another pc which is in LAN.Till date it's working fine without any problem but from yesterday i am getting problem, i don't reason.
Problem is that when i am tring to connect from my project to visual source safe database which is in another pc(in LAN),it directly ask me for visual source safe Internet database and asking for DNS and folder name in internet,actually which is not true becoz my actual vss database is in LAN.
I had reinstall vs 2005 beta 2 again but it is not solved.I am thinking that there must be some setting in vss administration to resolve this problem.
so any body is knowing solution about this type of problem?
if yes then pls. help me out.
thanks.
regards,
montu3378
|
|
|
|
|
In exploring the VS2003 IDE, i tried out the Mark All feature in the replace dialog. How do you unmark code that gets marked?
|
|
|
|
|
|
So those markings are bookmarks. Now i know. Thanks for the tip.
|
|
|
|
|
Hi,
Last year I created a program that uses binary serialization for file saving. In the near future I'm planning on creating a new revision of this program, which will include many class structure changes from the current version. It seems that when using object serialization, adding and changing variables to current classes will cause errors during deserialization of older files. Are there ways to allow files created by older software versions to be compatible with newer ones? This is an area of programming I've never really explored. I'm unsure of common practices.
Thanks for any tips!
|
|
|
|
|
If you're using C# 2005 you can use the [OptionalFieldAttribute] on new class variables, and when you deserialize the class, the vars that have the above tag wont be required and therefore wont throw an exception.
If you're using C# 2003, you can look into manually controlling the serialization process.
BTW: M$ is giving away C#, VB, and C++ express for free until Nov. 2006.
If you get them before then, you will never have to pay for them. You can download CD images of each.
|
|
|
|
|
hi...
my problem is... that I have some rtf text without Rtf headers. For example: "hell\\`b1".
The plain text should be "Helló".
Is there a quick way to do this translation (rtf to plain)?
I know, there is a way to do it...but it is complex.
thanks
|
|
|
|
|
read it in a text box
"Not everything that counts can be counted..."
-Albert Einstein
|
|
|
|
|
Hi!
You could try adding a minimal RTF header yourself:
string rtf = @"{\rtf1\ansi"+myRtfFragment+"}";
richTextBox1.Rtf = rtf;
MessageBox.Show("Plain text is '"+richTextBox1.Text+"'");
Regards,
mav
|
|
|
|
|
How can I add days to a rowfilter column?
I want to add 30 days to ExpirationDate which is a column name in the dataview. dt is current date. In a nutshell, expirationdate + 30 days >= current date
Please help!
dv.RowFilter = "ProducerNameCode = '" + agentCode +"' AND ExpirationDate >= '" + dt +"'";
|
|
|
|
|
|
this is what i whant to do
private void Form1_Load(object sender, EventArgs e)
{
Test(CLLER);
Test(Bob);
}
private void Test(?????? t)
{
//t should be the sub i want to call! so how would i do this?
t("Test");
}
private void CLLER(string T)
{
MessageBox.Show(T);
}
private void Bob(string T)
{
this.Text = T;
}
thanks
codegreen
-- modified at 19:52 Thursday 17th November, 2005
|
|
|
|
|
I think you have the wrong impression of method overloading. Why not just do
..In the form load event
{
Test(CLLER); <<-- Assuming these are string objects
Test(Bob); <<-- Assuming these are string objects
}
void Test(string T)
{
if(String.Compare(T,"CLLER")== 0)
{
MessageBox.Show(T);
}
else
{
this.Text = T;
}
|
|
|
|
|
because i have a more complex code
public void CheckCrossThread(string data, string scase)
{
//DataReceived(this, data);
if (((System.Windows.Forms.Form)_Form).InvokeRequired)
{
SetTextCallback d = new SetTextCallback(CheckCrossThread);
((System.Windows.Forms.Form)_Form).Invoke(d, new Object[] { data,scase });
}
else
{
switch (scase)
{
case "DataReceived":
DataReceived(this, data);
break;
case "Disconnected":
Disconnected(this);
break;
case "TCPError":
TCPError(this, new Exception(data));
break;
default:
TCPError(this, new Exception("Not Found")); ;
break;
}
}
I use this for most of my projects but its hard to keep editing it over and over again. i would like (scase) to call the sub it was passed
thanks
codegreen
|
|
|
|
|
Take a look at the "delegate" keyword.
|
|
|
|
|
Instead of having to do a switch and determine which method to execute based on the string value, I'd recommend passing some delegate that contains the code to execute. For example, using C# 2, if I wanted CheckCrossThread to execute DataReceived method, I could do:
this.CheckCrossThread("someData", "DataReceived", (System.Threading.ThreadStart)delegate{ DataReceived(this, "someData") });
public void CheckCrossThread(string data, string scase, ThreadStart methodToExecute)
{
...
methodToExecute();
}
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
that is what i need thanks, BUT C# doesn't like
this.CheckCrossThread("someData", "DataReceived", (System.Threading.ThreadStart)delegate{ DataReceived(this, "someData") });
it says } needs ;
I fix that but it needs a method the DataReceived is and event
-- modified at 18:01 Friday 18th November, 2005
|
|
|
|