I have a key-value pair array that contains an LDAP distinguished name, and I want to retrieve the DNS domain name of the host.  (Only the DC's not the fqdn)  Assume that the LDAP parsing is done correctly, and the DC entries when combined constitute the DNS domain name of the host.  Given the code below, is it possible to convert  DC = my DC = domain DC = com   into  my.domain.com   I could use a for...each with a stringbuilder but it doesn't feel elegant.  Is there a better way?   My code is below:  var kvList = ParseDistinguishedName(ldapName); StringBuilder sb = new StringBuilder(); var names = (from k in kvList              where k.Key == "DC"               select k.Value);
120559
I'm storing an ArrayList of Ids in a processing script that I want to spit out as a comma delimited list for output to the debug log. Is there a way I can get this easily without looping through things?  EDIT: Thanks to Joel for pointing out the List(Of T) that is available in .net 2.0 and above. That makes things TONS easier if you have it available.
26241
I have the following string array:  var sa = new string[] {"yabba","dabba","doo"};   I can convert it to "yabba, dabba, doo" it using string.Join() but what is the super-cool LINQ way of doing it?  The Join extension method seems promising but for a novice like me very confusing.
54923
If is possible to find out which nameservers a domain was previously pointing too? I need to try and find where a domain was previously hosted so that I can try and gain access to an old hosted email account.   Any ideas?
2352
This is a  about Active Directory domain naming.   After experimenting with Windows domains and domain controllers in a virtual environment, I've realized that having an active directory domain named identically to a DNS domain is bad idea (Meaning that having example.com as an Active Directory name is no good when we have the example.com domain name registered for use as our website).   , but I'm still not sure about what other rules there are around naming Active Directory domains.  Are there any best practices on what an Active Directory name should or shouldn't be?
116725
I've just read  which essentially says that when I set up DNS for example.com, the root record can't be a CNAME, it has to be an A record.  My question is, why?   I'm sure the clever people who designed DNS didn't make arbitary restrictions for no reason, but I don't see what we gain by requring root domains to be A records. I would love to just point my example.com domain to someserver.somewebhost.example and forget about it, but I can't.  Please enlighten me, billpg.
20965
How do I use OpenDKIM with multiple domain names on a single server?  I own 3 domain names, and I have a single server that's running postfix for sending email. How do I use OpenDKIM?  Can I use the same keyfile for all 3 domain names? Do I have to create a TXT record for each domain name?
34186
With OpenDNS now needing one to be on the pro package to have filtering turned on, being on a tight budget, we are in need of free DNS filtering.  After reading , I collected SquidGuard blacklists and concatenated domains in the categories i needed into one big list. I then fed it to  generating a file containing about 2 million zones.  named-checkconf parses it just fine, but reloading named takes almost 10 minutes, then it wont resolve anything, and the server slows down to a crawl. Removing the include results in named working properly again.  Whats the proper way to set up BIND9 to work as a DNS firewall efficiently? If it's possible to also block any domain that resolves to specific IP addresses that would solve the whole problem.   I'm running bind as non-authoritative, just a caching server.
87499
Can someone provide a regular expression for parsing name/value pairs from a string?  The pairs are separated by commas, and the value can optionally be enclosed in quotes.  For example:  AssemblyName=foo.dll,ClassName="SomeClass",Parameters="Some,Parameters"
99149
When I type mynewdomain.com into my browser I believe the following happens.   My computer sends a request to my ISP's name servers to find the IP address of mynewdomain.com My ISP name server sends a request to the "." name server. The "." sends a response back to the ISP name server, saying try using the com. nameserver. My ISP name server sends a request to the com. nameserver. The com. nameserver finds mynewdomain.com. and sends my ISP nameserver back the A record. My ISP nameserver sends this back to my computer.    My question is about step 5. How does mynewdomain.com. get into the list on the com. nameserver? And given that there are hundreds of millions of registered .coms, how does it find mine in such a short time?
72304
I've recently begun virtualizing servers - one of which is a DNS server running BIND 9 on Debian 7.  My DHCP server correctly issues it as the primary DNS for the network, but I get the following error if I try to use dig kilraine.lan @dns.kilraine.lan  couldn't get address for 'dns.kilraine.lan': not found   Though I get the original dig output from dig kilraine.lan @192.168.1.2.  Details:  BIND 9 on Debian 7; Virtualized CT through Proxmox.  Zone file (the email has been changed to hide my personal info)  ; BIND data file for kilraine zone ; $TTL    604800 @       IN      SOA     kilraine.lan. myaddress.myemail.com. (                      2014060303         ; Serial                          604800         ; Refresh                           86400         ; Retry                         2419200         ; Expire                          604800 )       ; Negative Cache TTL          IN      A       192.168.1.2 ; @       IN      NS      dns.kilraine.lan @       IN      A       192.168.1.2  dns2    IN      A       192.168.1.1 dns     IN      A       192.168.1.2 dhcp    IN      A       192.168.1.3 main    IN     A      192.168.1.10   Reverse zone file  ; ; BIND reverse data file for kilraine.lan ; $TTL    604800 @       IN      SOA     kilraine.lan. myaddress.myemail.com. (                      3006201401         ; Serial                          604800         ; Refresh                           86400         ; Retry                         2419200         ; Expire                          604800 )       ; Negative Cache TTL ; @       IN      NS      dns. 1       IN      PTR     dns2.kilraine.lan 2       IN      PTR     dns.kilraine.lan 3       IN      PTR     dhcp.kilraine.lan 10      IN      PTR     main.kilraine.lan   And lastly my named.conf.local file.    // // Do any local configuration here //  // Consider adding the 1918 zones here, if they are not used in your // organization // include "/etc/bind/zones.rfc1918";  zone "kilraine.lan" {         type master;         file "/etc/bind/db.kilraine.lan"; };  zone "1.168.192.in-addr.arpa" {         type master;         file "/etc/bind/db.192"; };   I have restarted BIND 9 numerous times, and I have always gotten "OK".  I used the dnsutils tool 'dig' on both the server and a client, each return the following      ; &lt;&lt;&gt;&gt; DiG 9.8.4-rpz2+rl005.12-P1 &lt;&lt;&gt;&gt; kilraine.lan ;; global options: +cmd ;; Got answer: ;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: SERVFAIL, id: 46467 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0  ;; QUESTION SECTION: ;kilraine.lan.          IN  A  ;; Query time: 2 msec ;; SERVER: 192.168.1.2#53(192.168.1.2) ;; WHEN: Mon Jun 30 21:53:41 2014 ;; MSG SIZE  rcvd: 30
41562
I am trying to write a generic Parse method that converts and returns a strongly typed value from a NamedValueCollection.  I tried two methods but both of these methods are going through boxing and unboxing to get the value.  Does anyone know a way to avoid the boxing?  If you saw this in production would you not like it, how bad is it for performance?  Usuage:  var id = Request.QueryString.Parse&lt;int&gt;("id");   Attempt #1:  public static T Parse&lt;T&gt;(this NameValueCollection col, string key) {     string value = col[key];      if (string.IsNullOrEmpty(value))         return default(T);      if (typeof(T) == typeof(int))     {         //return int.Parse(value); // cannot convert int to T         //return (T)int.Parse(value); // cannot convert int to T         return (T)(object)int.Parse(value); // works but boxes     }     if (typeof(T) == typeof(long))     {         return (T)(object)long.Parse(value); // works but boxes     }     ...      return default(T); }   Attempt #2 (using reflection):  public static T Parse&lt;T&gt;(this NameValueCollection col, string key) {     string value = col[key];      if (string.IsNullOrEmpty(value))         return default(T);      try     {         var parseMethod = typeof(T).GetMethod("Parse", new Type[] { typeof(string) });          if (parseMethod == null)             return default(T);          // still boxing because invoke returns an object         var parsedVal = parseMethod.Invoke(null, new object[] { value });         return (T)parsedVal;     }     // No Proper Parse Method found     catch(AmbiguousMatchException)      {     }      return default(T); }
18012
I have a single string that contains the command-line parameters to be passed to another executable and I need to extract the string[] containing the individual parameters in the same way that C# would if the commands had been specified on the command-line. The string[] will be used when executing another assemblies entry-point via reflection.  Is there a standard function for this? Or is there a preferred method (regex?) for splitting the parameters correctly? It must handle '"' delimited strings that may contain spaces correctly, so I can't just split on ' '.  Example string:  string parameterString = @"/src:""C:\tmp\Some Folder\Sub Folder"" /users:""abcdefg@hijkl.com"" tasks:""SomeTask,Some Other Task"" -someParam foo";   Example result:  string[] parameterArray = new string[] {    @"/src:C:\tmp\Some Folder\Sub Folder",   @"/users:abcdefg@hijkl.com",   @"tasks:SomeTask,Some Other Task",   @"-someParam",   @"foo" };   I do not need a command-line parsing library, just a way to get the String[] that should be generated.  Update: I had to change the expected result to match what is actually generated by C# (removed the extra "'s in the split strings)
62088
I am new to the world of setting up servers and am baffled by the term hostname and fully qualified domain name (FQDN). For example, if I want to set up a server that hosts files on the local network i.e. a file server, what would I use a hostname such as myfileserver or something else? What if I wanted to set up a web server, mail server, etc. that external users could access?
37272
I'll try to explain this as best I can...  I'm on ubuntu 13.04, and I am running a local BIND instance at 127.0.0.1 for access to basic wild-card DNS for development (i.e. "*.dev == 127.0.0.1" - yes, I know, don't create fake tlds, etc. This is entirely local to my machine, though).  I also have clients who have their own DNS servers set up through a VPN (at 192.168.140.111 or something similar).  My problem is that if my resolv.conf has their DNS server listed first, I can't access my *.dev, and if I have my DNS server listed first, I can't access their *.vpn records.  Currently, this is my resolv.conf:  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 192.168.140.111 search ns1.vpn nameserver 127.0.0.1 nameserver 127.0.1.1 search fritz.box   The first three lines of the config are in /etc/resolvconf/resolv.conf.d/head, so they'll survive through a resolvconf -u.  Essentially what I want to know is this: is there a way for me to set this up so *.dev goes to my dns server, and *.vpn goes to theirs, (and everything else goes off to my ISP).
37233
Let me use the following example to explain my question: public string ExampleFunction(string Variable) {     return something; }  string WhatIsMyName = &quot;Hello World&quot;; string Hello = ExampleFunction(WhatIsMyName);  When I pass the variable WhatIsMyName to the ExampleFunction, I want to be able to get a string of the original variable's name. Perhaps something like: Variable.OriginalName.ToString()  Is there any way to do this?
97169
I need to return this value:     Is there anyway to get the registered Force.com domain for a given org, with raw Apex code or Metadata API?
15666
This is a  about Active Directory DNS Settings. Related:     Assuming an environment with multiple domain controllers (assume that they all run DNS as well):  in what order should the DNS servers be listed in the network adapters for each domain controller? Should 127.0.0.1 be used as the primary DNS server for each domain controller? Does it make any difference, if so what versions are affected and how?