Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
W

WetRivrRat

@WetRivrRat
About
Posts
96
Topics
34
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • active directory "DirectorySearcher" security
    W WetRivrRat

    Anybody out there know where I could go to lookup the process used for contacting AD via the DirectorySearcher object? What I am specifically looking for is what is used to send user password info across the wire. I am trying to create a connection with a Winform app. My concern is if someone other than the logged on account tries to access AD he/she has to enter a password, which means that either the DirecorySearcher either changes the user info into a token for transport, encrypts it to the standard AD format for comparison against the AD db, or it sends it unencrypted where it gets encrypted at the server and then compared... I've watched the net traffic of the DirectorySearcher and don't see anything (user info) in plain text, but didn't spend too much time trying to find it either. However I did see all the returned data from AD was ALL in plaintext, which is why i'm concerned about the securtiy of the user info. Any info, links, or wisdom shared is much appreciated. thankz,

    string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# question database sysadmin windows-admin security

  • Compile with specified version of .NET framework
    W WetRivrRat

    http://msdn.microsoft.com/vstudio/downloads/tools/msbee/default.aspx

    string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# csharp dotnet visual-studio help question

  • Globally accessible properties
    W WetRivrRat

    hey all, i'm sure this is a dumb question: but... How do I create / access / modify properties that are available to all classes of my solution? iow, I have a main namespace, and multiple forms that are all separate classes/.dlls. I need to beable to access the properties of the main form throughout the rest of the application, regardless of whether or not the sub classes are instaniated yet. So.. ClassA(mainFrm) calls ClassB(subUsrCrtl1) which does some work then calls ClassC(subUsrCtrl2) which displays extended info from the work done in ClassB. Then ClassA can call ClassD(E,F,G,etc)(subUsrCrtl3(,4,5,6,etc)) who make other information available based on the work done in ClassB. Many of the classes that are available are not used everytime, so they aren't instantiated yet. I need to beable to retrieve data from the work that is completed in ClassB and use that data throughout all available classes. Currently I'm only able to access that data in a class to class relationship where I end up with either old or null values becuase i'm having to instantiate the required class again from the current class...(i.e. ClassA calls ClassD, ClassD needs data from ClassB, so ClassD instantiates new ClassB but that returns null data...) hope this make sense, cause i'm lost.... ehlp.... wait i can't even spell help...

    string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# question json help

  • Can't Impersonate User Info thru ADO.Net
    W WetRivrRat

    Ok, so anyone ready for a good one??? Trying to run a vb.net webApp that connects to sql. I can NOT allow the domain username to be written in the web.config file so I must use impersonation (trusted_connection). Problem:

    Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection

    when trying to access remote SQL Server with

    <identity impersonation = "true" />

    -- I need to beable to connect/access the sql db by use of domain user accounts, but without having to manually enter the user credentials to access. IOW by use of Impersonation. Configuration: I've tried to configure IIS to both of these two possible options: A.) Anonymous Access is DISABLED and Integrated Windows Authentication is ENABLED B.) Anonymous Access is ENABLED and Integrated Windows Authentication is DISABLED with username defined as a valid domain account/password.(i'll explain this method later) I have defined my SQLConnectionString as:

    Data Source=ServerName01;Initial Catalog=StageDBid;Integrated Security=SSPI;

    I have also setup a block of code that would check the current impersonated user before executing the sqlConnection and am getting the [correct]expected User.Identity back. So I know that the Impersonation aspect is functioning, but for some reason it is not passing this info to the DB or the "Integrated Security=SSPI"("Trusted_Connection="yes" ") is not working. Requested Soultion: I need to beable to connect to SQL thru the webApp by use of the individual Users Domain Account UserNames.) Oh, yah I promised to explain my second method of connection to the db by use of the Anonymous Account.... I Can connect to the db if I use the method (B) listed above, with impersonation enabled and using a domain user account by disabling Integrated Windows Authentication and specifing the domain account.... problem is I'm still restricted to using a single account for connection to the db. I need to beable to connect/access the sql db by use of domain user accounts, but without having to manually enter the user credentials to access. IOW by use of Impersonation. string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful + " people."; Why is common sense such an un-common comodity?

    ASP.NET database security workspace csharp

  • -- Is it possible??? --
    W WetRivrRat

    Michael, Thank you for your reply, I find your soultion of using the multiple joins interesting... however I have a question on it, the possiblity exist that there will be an unnumerable amount of phone_num results available for each user. (while the truth is we "attempt" to limit it to 4) How would you propose doing the multiple joins for x number of results? My inital thought would be to use a while loop to loop thru all the results. but doing that still leaves the question of how to deal with the multiple results of the intial query... for instance when you do a left join on these tables, because there are say 4 instances of a phone_num in the phone table per user, then my list of users (say 100) will return with 400 results. even if i do the multilple joins on the same table i'll still have 400 results from the inital query, since the join doesn't consume the results in any way. --unless there is a way to include the TOP statement.... hmm, i'll look further into that.... If I figure that out then I'll post my resolution. -- 'course if you already know the resolution I'll happly accept assistance :laugh: string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    Database database question learning

  • -- Is it possible??? --
    W WetRivrRat

    EricDv, Yes I can use a SP, my ultimate goal out of all this is to setup a dataset, for select and update string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    Database database question learning

  • -- Is it possible??? --
    W WetRivrRat

    Hey guys, need to format a column of results to display as columns in another query.... let me explain a little better *hopefully* in the result set below notice how the empID is repeated in some cases

    ID empID phone_num displayTel type


         159        ** 625** 123-123-4567          1           1
         163         **625** 465-456-4657          1           1
         154         626 944-789-4515          1           1
         155         626 984-321-4567          1           2
         150         639 984-266-3336          1           1
         145         **802** 465-465-7894          1           5
         146         **802** 654-798-4657          1           6
         165         853 132-123-1324          1           1
    

    i need to beable to separate the "phone_num" data based on the "type" and then display that data in-line on another query i.e. Not This!!!

    Name empID phone_num activeUser contact


    Demo User ** 625** 123-123-4567 1 1
    Demo User 625 465-456-4657 1 1

    Instead Like This!!

    Name empID phone_num1 phone_num2 activeUser contact


    Demo User ** 625** 123-123-4567 465-456-4657 1 1

    I need to be able to do this all at once while i'm also quering about 15 other tables.... so i need to be able to do it in-line or subqueried... my only idea would be to do something like this ('course it won't work)) SELECT col1, col2, (if (select phone_num from phone where empID = @empIDNum) > 1 { for i = 1 to (select count(phone_num)) select top (i) phone_num as phone_num+(i) from Phone where empID = @empIDNum Next} ) else { select phone_num from phone where empID = @empIDNum } from employees thanks!!! string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    Database database question learning

  • IP Lookup
    W WetRivrRat

    If you have DNS you could just use HostIP = System.Net.Dns.GetHostByName(ServerName); and if you have AD, you could do a DirectorySearch of computers and get a list by name, then use that to retireve the "ServerName" for your dns lookup string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# sysadmin question

  • How does 1 thread multiply into 3 threads???
    W WetRivrRat

    Ok, trying to loop through a treeview and create connection to each node(pc). Am running a new thread to do this loop as it is taxing on the application.

    PcTree = new Thread(new ThreadStart(enumThread));
    PcTree.Name = "PollPCList";
    PcTree.Start();

    When I look at the output of my node looping I consitently find 3 connections to each node. After trying to step thru the debugger i find that sometimes it does keep this pattern(3 connections), other times i only see one loop for each node. (how odd is that?) -- why is this happening? is it due to the fact that i'm running this on a dual-proc pc? now, that obviously is the problem, here is my question: if i haven't done something wrong with my code and i'm stuck with this 'triple threat thread' then is it possible that i increment the foreach loop so that i process 3 different nodes instead of just one node 3 times?

    private void enumThread()
    {
    enumPCtree(PCmonitorTree.Nodes);
    }

    private void enumPCtree(TreeNodeCollection t)
    {
    try
    {
    foreach ( TreeNode tr in t)
    {
    if (tr.Text.IndexOf("PC")!= -1)
    {
    tr.Nodes.Equals(tr.NextNode);
    }
    else
    {
    ServerName = tr.Text;
    try
    {
    HostIP = System.Net.Dns.GetHostByName(ServerName);
    PcIpAddress = HostIP.AddressList[0].ToString();
    }
    catch
    {}
    finally
    {enumPCtree(tr.Nodes);}
    if (PcIpAddress != null)
    {
    //do scan
    if (breakLoop)
    {
    break;
    }
    }
    }
    }
    }
    catch (Exception ex)
    {MessageBox.Show(ex.Message);}

    	finally
    	{
    	//End Scan
    	}
    

    }

    string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# help question csharp debugging regex

  • Thread NOT aborting nicely!!!!
    W WetRivrRat

    okay, okay, it looks like i'm getting closer to the resolution.... it appears that either by accident( :confused: ) or by the objects design, i am actually creating at least 2 other threads at the same instance when i am starting the enumeration loop, so when i go to close it, the first actually closes nicely, its the others that are left in the loop that start #itching .... So, i'm off to see the wizard, the wonderful wizard of Threads to see what I have to do get home. Now, if i could only find my way.... :~ string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# help sysadmin tutorial question

  • Thread NOT aborting nicely!!!!
    W WetRivrRat

    Thanks for the response, i've included a small section of the code that deals with the thread abort calls. I guess a bit more description into what i'm receiving may help... its not so much the initial error, as i could find a creative way to handle it, but its that i'm receiving the error multiple times. So even if i catch the error i'll still have to deal with multiple instances of the same issue. After watching the system processes I can see that instead of increasing by only one thread, or maybe even two for that matter i'm actually increasing by 4 sometimes 7 while the app is enumerating thru the connection nodes... this is only a concern because i'm receiving sometimes 3 or more "Thread was being aborted" messages, so i wanted to see why. I've also tried to capture that message by using a try,catch, but haven't yet found a way to do it. not sure if that has anything to do with the unhandled exception nature of this message or not, but its just odd.... anyhow i'm sure i'm only confusing the situation more by explaining...

    case 3:
    result = MessageBox.Show("~","Please Verify", MessageBoxButtons.YesNo, MessageBoxIcon.Question );
    try
    {
    if(result == DialogResult.Yes)
    {
    menuItem42.Visible=true;
    menuItem45.Visible=false;
    if (PcTree.IsAlive == true)
    {
    PcTree.Abort();
    PcTree.Join();
    label1.ResetText();
    progressBar1.Value = progressBar1.Minimum;
    }
    }
    }
    catch (ThreadAbortException abort)
    {MessageBox.Show(abort.Message + abort.StackTrace);}
    break;

    string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# help sysadmin tutorial question

  • Thread NOT aborting nicely!!!!
    W WetRivrRat

    Hey, running an app that has to enumerate thru a treeView and create a connection to each node(or pc). because our network is so large i need to give the users the ablity to close the connection/exit the application prior to the connection closing itself. The problem i'm running into is that i'm running the treeView enumeration on a separate thread (due to the time/system expense and it was continually locking up the interface) and I can't elegantly kill the thread. I intermittently receive "Thread was being aborted" when trying to stop/abort the thread. I've searched around and all i can find is related to web redirects, which isn't my problem. I've attempted to follow the msdn directives regarding this but haven't had any luck(thread.join). I've also tried to look into closing the connection as that would allow the thread to close properly, but i can't find anything on how to close a managementScope object. (I may have not looked hard enought on this part :~ ) I could use any help that you may offer. string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# help sysadmin tutorial question

  • running out of swimming *pool* space..... ???
    W WetRivrRat

    actually, at this point its working...i found a piece of code that i accidently commented out.... :sigh: :doh: string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    Database database help question

  • running out of swimming *pool* space..... ???
    W WetRivrRat

    ok, so really, Here's the error message: "Failed to Connect to the Database!Timeout expired. The timeout period elaspsed prior to obtaining a connection from the pool. This may have occurred because all polled connections were in use and max pool size was reached. at System.DataSqlClient.SqlConnectionPoolManager.GetPolledConnection(SqlConnectionString options, Boolean&isInTransation) at System.Data.SqlClient.SqlConnection.Open() at WindowsApplication1.Form1.dbConnect() in c:\documents and settings\user1\desktop\windowsApplication\form1.cs:line2957" what do i need to do...i'm enumerating thru a treeView and using the node.text as a servername to create a connection to each pc(treenode). It looks like the connections to the pc's are happening much quicker than the db can store...is this possible? anyhow i could use some help.... thanks string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    Database database help question

  • why can't i start/stop separate threads inside of same block?
    W WetRivrRat

    Good point Dave, I think i picked up that bad habit from those redim-ing vb guys i work with :doh: problem fixed! string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# design help question

  • why can't i start/stop separate threads inside of same block?
    W WetRivrRat

    hey everyone... i've probably missed something very important, and just don't know it. the reason: i'm trying to populate 2 treeviews from 2 separate threads with separate data in each, both trees are pretty slow to load so i need the threads, else i lock up the ui for about 10sec. I also have to refresh the trees throughout the progress so i've had to build the threads the way i have so i can access it later. the problem: if i try to invoke both threads in the same form_load block i end up with 2 trees with the same data. if i invoke them separately (comment one or the other out) i have proven that the code works properly for both, so it leads me to believe that i've either done something terribly wrong or i just can't do what i'm trying to do........ any ideas? here is the code:

    Thread PcTree, pclist,EmpTree,emplist;

                        MethodInvoker CallCompList, CallEmpList;
    
    
    
                        private void Form1\_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    
                        {
    
    
    
                                    //                                  pclist = new Thread(new ThreadStart(initializePcTree));
    
                                    //                                  pclist.Start();
    
                                    //                                  emplist = new Thread(new ThreadStart(initializeEmpTree));
    
                                    //                                  emplist.Start();
    
                                    switch (tabControl1.SelectedIndex)
    
                                    {
    
                                                case 0:
    
                                                            initializePcTree();           
    
                                                            break;
    
                                                case 4:
    
                                                            initializeEmpTree();
    
                                                            break;
                                    }           
    
                        }
    
    
    
                        private void initializePcTree()
    
                        {
    
                                    PcTree = new Thread(new ThreadStart(PopComputerList));
    
                                    PcTree.IsBackground = true;
    
                                    PcTree.Name = "PcTree";
    
                                    PcTree.Start();
    
                        }
    
    C# design help question

  • Best Connection Method?
    W WetRivrRat

    Creating a tool that will query the wmiClass of "client" PCs. I do not want to have any software installed on the client side, all clients are behind the same router, so I don't have any concerns there. I'm looking for the best way to connect to aprox 100 PCs. -- the intended operation would be: user clicks button, button event polls pcs, listener client logs all replies, using list of replies poll each pc for all required info (i'd like to just udp the clients with the wmi login info, and query so that it just replies with the info, but not sure yet if that is possible or even a safe move) looking for any good ideas or previous attempts that were sucessful in doing this. I've considered using UDP to conduct an initial poll of the PCs, then use the returned name of the pc to conduct the TCP request of wmi. I've also considered using a static list of IPs, but dont like that idea, so maybe a semi-static ip list? and lastly i've considered finding a way to intergrate with active directory to return a list of pcs, which is fine, as long as we don't have any non-registered clients again, just looking for any thoughts of a good way to do this...and of course if you know of any refrence material that is open for use that would be much appreciated as well. string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# database windows-admin question discussion learning

  • treeView child restrictions
    W WetRivrRat

    Works like a champ! --had to do a little bit of modification as you had the nodelevel declared as a 1 so it would then increment to 4 before ever actually reaching the desired point...so mod it to a 0 rather than 1 and its pretty...course i could have just changed the if == to value to 4, but then it would not have been the soulution i was looking :-D Thanks a bunch! string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# question

  • treeView child restrictions
    W WetRivrRat

    Thanks, I'll have to check this out...as i'm not at a point right now to test it...but i will post the results of my testing shortly string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    C# question

  • Open Project From Web
    W WetRivrRat

    Well, I suppose it really boils down to what is it you are really trying to do. It seems we may be missing part of the story... In my understanding...(which isn't much) everything VS (asp.net) does is relative to the root directory of the default instance of IIS. With that said, I'm sure you can modify that, but with varied results. Please explain what it is you have done, what you need, as well what it is you hope to accomplish in this, that way we can better assist you string Beautiful; Beautiful = "ignorant"; label1.Text = "The world is full of " + Beautiful +" people."; Why is common sense such an un-common comodity?

    Visual Studio csharp help visual-studio sysadmin announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups