RadComboBox – load even if value is missing in dataset

In developing a web application, I’ve frequently run into an issue with the dataset for a Radcombobox not being equal to historical data in the database.

For example, a table that stores equipment, with a column of employee numbers representing “assigned to”.

In the web application, I only want users to select Active employees so this is the contents of my Radcombobox dataset.

However, employees frequently transition to Inactive as they leave the company and there may still be equipment assigned to them. If they are marked Inactive and the Radcombobox is loaded for that record, it will error out with “Selection out of range Parameter name“.

Luckily I found this exact same situation on the Telerik forums, and the last post in the thread is what I needed.

In my case I have validation for empty Assigned Employees, so I modified the function to look like this:

protected void PreventErrorOnbinding(object sender, EventArgs e)
            RadComboBox cb = sender as RadComboBox;
            cb.DataBinding -= new EventHandler(PreventErrorOnbinding);
            cb.AppendDataBoundItems = true;

            catch (ArgumentOutOfRangeException)
                RadComboBoxItem cbI = new RadComboBoxItem("", "");
                cbI.Selected = true;

Then in my Radcombobox, I added “OnDataBinding="PreventErrorOnbinding".

Read More

Locked files on SMB share

I’ve been experiencing an issue with files becoming read-only locked on a Server 2012 R2 file share, typically across the WAN.

Usually once per day at least, we would have a user report that a file had been marked read-only on the file server in an unexpected way.

Here’s some of the instances that have occurred:

  • A person is working on a drawing over a period of an hour or two, attempts to save the drawing they’ve had open for a while and receive “file is read only”
  • A person goes to open a drawing, gets warning it’s read-only, but the user who previously had it open closed it minutes or hours ago.
  • A person goes to open a drawing, gets warning it’s read-only, but the user mentioned in the warning has not touched the drawing since the last restart (perhaps “recent files” holding it open?)

95% of these issues were related to AutoCAD .dwg files, but it occasionally happened to Excel files too.

I used handle.exe from sysinternals to verify that the file was actually opened by a process (acad.exe) and it consistently was; there was just no explanation for why or how this process was opening or holding open the file handle without user interaction or knowledge.


I finally traced this to a series of registry changes that were being pushed out as ‘optimizations’ for SMB, which had been recommended here: https://msdn.microsoft.com/en-us/library/dn567661%28v=vs.85%29.aspx#clients

Primarily, we had defined:

Key New Value Original Value
FileInfoCacheEntriesMax 32768 64
DirectoryCacheEntriesMax 4096 16
FileNotFoundCacheEntriesMax 32768 128

When I reverted these values back to original, the reported issues universally stopped according to my users.

This just speaks to the increased need of change tracking in my organization; it would have been relatively simple to correlate the first reported instance to a set of changes in the same time frame. Implementing that system is easier said than done however.

Read More

EqualLogic SAN HQ and VC++ issue

When installing Dell EqualLogic SAN HQ 3.10 on a new server, I ran into an issue where the installer looked like it needed to deliver a message about the VC++, but nothing appeared.

I tried installing various versions of the VC++ Redistributable, until I finally hit the right one:

Microsoft Visual C++ 2008 Redistributable – x64 9.0.30729.17

Once this was installed, my installation of SAN HQ proceeded normally.


Read More

Dell 2162ds KVM Network Connect Error

I have a Dell 2162ds KVM switch in my server room for out-of-band management instead of individual DRAC cards.

I recently went to use this, but the Java connection produced an error of “Network Connect Error”.

Luckily someone already found a workaround for this issue here.

Here’s how to get it to work:

  1. Run Notepad as Administrator
  2. Navigate to C:\Program Files (x86)\Java\jre1.8.0_65\lib\security
  3. Open the file “Java.Security”
  4. Find the line that looks like this: jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768
  5. Remove this text from that line: “, DH keySize < 768”
  6. Save the text file

Now your KVM session should start properly.

Read More

Network up but DNS mysteriously broken

I was recently troubleshooting a computer for a family member, where they reported “I can’t access the Internet” and the resolution was something I’ve never seen before.

This was a laptop with both an Ethernet and Wifi connection. They were both set to DHCP with dynamic DNS, and IPCONFIG displayed the correct information.

I could ping to confirming network connectivity, and an NSLookup found my gateway acting as a DNS server which could properly resolve external names.

However, as soon as any browser attempted to access a DNS name, it failed. Chrome gave a “DNS_Probe_Finished_Nxdomain” error, and IE simply stated “Page could not be found”.

I checked the Hosts file for malicious entries, ensured no proxy was enabled within IE, and verified the routing table was all normal.

I ran ComboFix and GMER to look for rootkits, and started the computer in Safe Mode with Networking but none of these resolved the issue.

Finally I decided to install WireShark and run ProcessMon while the browser connection was made, in an attempt to see where these requests were going.

When trying to run WireShark after the install though, it gave an error about a missing “dnsapi.dll” file. I verified the file was in the proper location (c:\windows\system32), but on a hunch decided to refresh it from SFC with this command:

sfc /scanfile=c:\windows\system32\dnsapi.dll

The output confirmed a corrupted file was replaced, and then I rebooted Windows. Once it came back up, all external browsing worked!

I suspect that some malware had gotten onto this machine and modifed the dnsapi.dll file, but at some point had been partly removed.

This one left me confused for a while, so hopefully this helps anyone else coming across the issue.


Read More