Jun
3
2009

Easy, Fast, Thread-safe Dictionary with a Type Key

From time to time I'll want to perform some operation on a subset of properties of a Type. However reflecting over types can be costly exercise. Since Types don't change at runtime the natural solution is to parse them once and cache the results. For small sets this works well. However  with hundreds of types, the performance starts to degrade. I've also noticed that the typeof operator is rather slow when compared to intrinsic is and as operators.

Limitations

  • It's ready only. It's a great lazily initialized structure but the factors that make it thread safe.
  • It's never garbage collected. Type information is always retained in the AppDomain so any statics created this way will always remain live.
Continue Reading
May
20
2009

Upgrading from Vista to Windows 7 RC1

When upgrading from Windows Vista to the new Windows 7 RC some customers have complained of license access errors when running their protected software. DeployLX Licensing contains anti-hacking features to detect when a hacker tries to delete the secure storage.  When detected any license that uses secure storage (such as those containing a Time limit or Activation limit) will fail -- informing the user that they need to run the application as an administrator at least once. However running as an administrator does not resolve the issue because the secure storage is still missing.

During the upgrade process the Windows Setup only copies the first entry in the secure storage database. When the protected application is run for the first time after upgrading the first run markers are found, but the secure storage is missing. DeployLX Licensing detects this and employs the anti-hacking technique described above.

A fix for this process has been added to the nightly builds. For those using the embeddable source, please contact support to obtain corresponding nightly build.

The fix will when installed before or after the OS upgrade will permit the user to run the protected application once the OS has been upgraded.

Continue Reading
Apr
20
2009

Troubleshooting Projects Rebuilding Every Time

For some reason, every project in my solution has decided to rebuild every time I try to build the solution -- even if that particular project has no changes and none of the dependent projects have any changes. I thought it might have been cause by my recent change to turn Copy Local off for inter-solution references to help speed up the build process. But even reverting the code didn't seem to fix it. Deleting the .suo and .user files that Visual Studio keeps it's editor state in didn't help either. So I decided to track down the issue.

Continue Reading
Apr
15
2009

Chasing Success with DeployLX

"We have sent dozens and dozens of questions to XHEO and we typically receive answers the same or next business day. They even added a feature for us! Some of our initial ideas turned out to be more restrictive than we really wanted but XHEO helped us tune our license parameters to fit our needs. I think we have achieved strong protection without ruining our paying customer's experience. We could not have gotten our anti-piracy solution implemented in time without their help, and we did not have to compromise."

Rolf Fischer 
Chief Architect 
DashWare

Continue Reading
Apr
2
2009

DeployLX 3.2 R3140 Released

Highlights

  • Fixed module load exception on 64-bit operating systems with kill-debuggers option enabled.
  • Added option to copy details to clipboard from the standard DeployLX Licesning extension panel.
  • Calling SecureLicenseManager.ResetCacheXXXX methods will now clear license application state. This state is not used to enforce limits but to enhance user interface such as only showing the Trial form once per session.
  • Added Test License button to DeployLX manager to make it easier to test licenses during development.
  • When the license changes on the client are persisted they normally always try to save to the original location. If access is denied changes are persisted to a shadow copy of the license. Now, when the client persistence (LicenseFile.SaveTo) is NotSet, DeployLX will detect if the license is embedded and would normally be saved to the Program Files folder and will automatically use the shared folder instead.
  • Added new option to Trial and Activation limits to control when the form is shown. The FirstTimeAndExpires value will show the form the first time the license is validated, then only again after the trial or grace period has expired.
  • Fixed FieldAccessException when referencing public fields of types that also include private fields from another assembly.
  • Added ability to obtain the deactivation codes when calling SecureLicenseManager.Deactivate.
  • Changed the CodeVeil MSBuild targets to automatically be included in the build process at the end of the CoreBuild target.
  • Resolved logic that allowed any returned value from a License Server to be ignored when Can Skip Server was selected in the Registration Limit.
  • Fixed InvalidFormatException with non-english translations.
  • When closing a project in the DeployLX Manager, if changes had occured since the last save the user was prompted. Selecting Cancel from the dialog box would result in the project being closed, unsaved, and any changes lost. Resolved the conflict to return to the project without closing it.
  • Fixed inheriting from nested class causes stack overflow exception.
  • See the complete change log for more details.

UPDATE: We had a small bug in the build script that was marking the builds and change log with an older build number. This has been fixed and the version number is correct in all locations.

Continue Reading
Mar
26
2009

Determining Win32 API Support in the .NET Framework

From time to time .NET developers will need to use a native Win32 API to get some platform specific work done. One of the first things I ask myself when I start writing out Interop signatures is "Does the .NET framework already support this?". The breadth of classes in the framework can be daunting and it's not always easy to answer that question. Often the conversations and references online revolve around the native API so that isn't always a help. Searching the MSDN docs can also lead to dead ends as the concepts and naming conventions are often modernized in the framework.

Continue Reading
Mar
25
2009

Universal .local Addresses for Testing

When developing web applications I like to use FQDN when testing locally. Primarily because it more closely matches the deployed state of the application. Cookies have specific rules when sub-domains come into play and you're much more likely to catch any variances. Traditionally I'd set just edit the hosts file on my dev machine (at C:\Windows\System32\drivers\etc on most machines) like so:

Continue Reading
Mar
18
2009

Manually Creating a Visual Studio .accessor File

Visual Studio 2008 offers a great suite of testing tools for developers. One of the the nicest things is the ability to generate reflection based accessor assemblies that let you access the private members of classes. There is still opendebate about the benefit of testing private methods but for some things -- especially security related -- where it makes a great deal of sense. Getting at those private methods however is not the easiest thing to do.

Continue Reading
Feb
23
2009

How to Report an Error

Capturing error details and exceptions is critical to the diagnosis of runtime errors. Without specific details, developers are left to guess and take shots in the dark about the potential problems leaving customers with a sour experience. It's surprising how many developers creating commercial grade software simply do not know how to capture exception details from an application. This article will cover some general techniques that apply to all software -- and some that apply to the tools available with DeployLX.

Continue Reading
Feb
18
2009

Filter Tests with xUnit and TeamCity

As part of our migration to TeamCity and our Continuous Integration efforts we've integrated our xUnit.net tests into the build and test process. One of the primary limitations I've found with xUnit is the inability to batch tests outside of the IDE. During development it's easy to run only a specific set of tests ala R#. However as part of the build process don't have that luxury.

Continue Reading

Subscribe Subscribe

Search