Powerd by dasBlog RSS 2.0
 Saturday, October 20, 2007

While looking to download BizTalk 2006 R2 off MSDN, I came across Software Licensing and Protection Online Server (SLP Services), and an offer for MSDN subscribers for free use for 1 year. This was the first time I've heard of SLP Services, so I wanted to check it out, the home page is here: http://www.microsoft.com/SLPS/Default.aspx.

Key features include:

  • Code Protection (Advanced Obfuscation?)
  • License Enforcement thru activation and client side enforcement.
  • 1 code base, "unlimited" configurations. Create trial software, add-on packages, timed demos, etc.

SLP Services is either a Microsoft hosted, or server based product that can be used to protect, license and distribute your software. In the hosted model, Microsoft runs the service, and you pay them a fee. In the server model, you install the server onto your network and host it yourself. It might also be possible to resell SLP services, but I have not read the licensing to know that for sure. This blog post indicates that reselling the SLP Service is an intened use. In addition to the traditional use for licensing, the SLP Services web site also talks about benefits of using the technology in the enterprise, for in house applications, which include monitoring application use, and controller who can use a specific application, or feature. The Downloads page, for information on downloading a trial version of the code protection tool and documentation for online and offline products.

The basic version you get thru MSDN allows you to do the following

  • 1 licensed product
  • 100 Commercial Activations (i.e. Customers who purchase a license)
  • 1000 non-commercial activations (activations that were not purchased)
  • 1 basic permutation, which allows you to "create" 5 products from a single code base.

The more expensive licenses of SLP Services allow for more activations, permutations and you get statistics and an API for license creation. Check out the How to Buy page for details. Regular retail pricing for the basic hosted version (after your free year and for non MSDN subscribers) is $500/yr, which as I already mention, includes 100 commercial activations. Additional activations cost $1000 for 1000.

I really, really like the concept, but once again feel like Microsoft could be doing a better job at making this more accessible to smaller ISV's and independent contractors (in the same way I disagree with some of the pricing for VSTS and TFS). Granted these are retail prices, but but the point of entry for someone hoping to make $9.95 on a product, and who could really benefit from something like this, is a little high. I'd like to see a starter edition that gives you the 1000 non-commercial activations but includes no commercial activations, however, you could purchase them at $1/each. This way you could develop your code using the technology and then once you start selling, start paying for the service. I think that Microsoft is trying to avoid giving away the code protection for free so that they do not directly compete with other companies offering a similar product, which if that is the case, should offer a limited functionality version with the starter edition, again to get people started.

Software Cost Number of Copies to Break Even to cover $500/yr
$9.95 51
$19.95 26
$29.95 17
$39.95 13
$49.95 11
$59.95 9
$69.95 8
$79.95 7
$89.95 6
$99.95 5
   

 

UPDATE: Someone from MS responded to a post I made on the MSDN forums, confirming that, as a MSDN subscriber, as long as you renew each year, you have access to the basic version. This does make this a little more attractive, as a MSDN professional subscription is a good deal IMO.

I fully expect to see new hosted solutions start to popup that are based on SLP Services, that include e-commerce capabilities, and charge per copy based on purchase price.

In addition to the price, which may or may not be a detractor to you, there is one other issue. Since this is a Microsoft product, you are going to have allot of talented individuals looking to crack it. It will be interesting to see if a "universal" crack could be developed, and how MS will respond.

Saturday, October 20, 2007 4:21:58 AM UTC  #    Comments [0] - Trackback
Programming | Review For Future Projects | Tools
 Monday, October 15, 2007

Assumption: You have remote performance monitor installed and running (this will be the topic of another blog post, or you can review the references at the end of this article).

Garbage Collector

  • GC Latency Time

Memory Usage

  • AppDomain and JIT Heaps:
    • Never shrinks.
    • Returns memory at the end of the applications life.
    • Impacts the 32MB virtual memory limit on Windows CE 5.0.
    • Typically these should be under 1MB, although they can be larger on really big applications.
    • Size is related to the number of types, along with the number and size of method calls.
  • GC Heap
    • Varies with the life of the application
    • Impacts the 32MB virtual memory limit
    • 4-5 MB is not uncommon.
    • The amount of change in the GC heap is of more concern

 

How can I make my app faster?

I would suggest reading the post referenced below published by the MS Compact Framework team. I've seen it copied almost word for word at several places, so I'm not going to do that here. There is also an entire section in MSDN on Compact Framework Performance (see references below).

References:

Monday, October 15, 2007 10:43:17 AM UTC  #    Comments [0] - Trackback
Programming
 Sunday, October 14, 2007

WCF support was something I was really looking forward to, but I seem to have missed some announcements on what was, and was not supported. I came across this blog post today http://blogs.msdn.com/andrewarnottms/archive/2007/08/21/the-wcf-subset-supported-by-netcf.aspx and similar confirmations on the MSDN forums. The blog post was from late August, so it looks like I need to stay on top of these things a little better.

 

Basically, the lack of TransportWithCredentials as a security option kills WCF for us out right. I was able to get this working using traditional ASMX web service client on our devices communicating back to a WCF service, thanks in large part to the work Casey Chesnut did to get WSE working on the compact framework (which is now part of OpenNetCF). It looks like X.509 is the preferred method, but we have had extremely bad luck with certs, and I don’t think management will ever allow their use again. I see managing certs for thousands of remote devices to be a little more complicated than a simple username/password approach.

 

I was really hoping for binary formatting, but can’t say I’m surprised that it’s not included, because it seems like binary serialization has never been part of the compact framework. No support for Streaming Messages is also a let-down. I find it ironic that functionality such as binary formatting and streaming messaging is left you, give that the usual argument with respect to the compact framework one of size limitations. I see there is mention of a Gzip Encoder which sounds promising, but is unusable for us until we can implement a work around to no TransportWithCredentials security.

 

I was talking with Travis (president of Madison DotNet UG), and we both agreed that one of the best things MS could do with regard to the Compact Framework, is allow developers to customize what modules are included. Start with a small base install, similar to what it is now, but at least give developers the option to deploy additional functionality (without having to re-invent the wheel themselves) when needed.

 

I guess once CF 3.5 Is released, I’ll be on the lookout for what types of extensibility options are available, but probably won’t be able to program anything custom until after our first release in April.

 

From what I can tell from a few posts online, it sounds like I’m not alone in my criticism and hopefully, enough developers send MS feedback so that we can get some of this functionality introduced as an add-on at least.

Sunday, October 14, 2007 11:46:48 PM UTC  #    Comments [0] - Trackback
Programming
 Friday, October 12, 2007

Slow week on the blog. Been busy with work, flooring project at home, and getting ready to announce a new personal development project (and all the research I've been putting into it).

VsTestHost was crashing on me today. It started out that TD.Net was failing, so I switched over to using the TestView to invoke the tests, fail. Since I'm running VS 2008 B2, I switched back to VS 2005 and created a new solution with only a handful of projects, fail. Installed the latest version of TD.Net, fail. Googled on VsTestHost.exe, only got a handful of results, one of which suggested re-installing VS (argh). Finally decided to test in debug mode, oh look a stack over flow exception. One of the posts on Google even mentioned that stack overflow exceptions are not (always) caught by VsTestHost. The stack overflow exception was caused by a property referencing itself, which was the result of an over ambitious find replace all.

Friday, October 12, 2007 10:33:50 PM UTC  #    Comments [0] - Trackback
Programming
 Sunday, October 07, 2007

I'm not even sure what led me to start playing around with the new Linq to SQL (formerly called DLinq) DAL in VS2008B2, but I'm glad I did. I discovered some very fascinating functionality that I believe will really shake up the way most developers approach the DAL. I see some similarities  between Linq to SQL and other OR/M plugins (tools, methodologies) out there, but since this is Microsoft's approach, I anticipate it will catch on en mass. I don't believe Microsoft is trying to make the other methods obsolete, but that they are delivering a product demanded by their customers. One of the problems with the current OR/M scene, is that there are so many options to choose from, that you never know if you've made the right choice. While Linq to SQL, may have some deficiencies, it will give developers, and their managers a little piece of mind when breaking from the traditional DAL mold. I can only hope that Linq to SQL does not disappoint, even after taking into consideration it's a Gen 1 product. Issues such as performance, extendibility, and plugability (into one's code or way of doing things) are some things that I want to explore (as with any tool such as Linq to SQL).

I used this article to help jump start my foray into Linq to SQL (let's just call it L2S from here on). Being away from WinForms for so long, I've missed out on some of the data binding features available, and was surprised to see how easy it was to get up and going with a grid and details form. I remember seeing the videos when VS 2005 was coming out, but never had a need to play around with it until now. I've also never had good luck with drag and drop data binding, as it assumes to much, I'm hoping that there are plenty of hooks available to help customize the data binding experience, but any fault with data binding should not be confused with L2S as they are 2 separate features (actually data binding is a feature, and L2S is a feature of VS 2008, and part of the .Net Framework 3.5).

In a couple of minutes, I was able to generate a data class using the new visual OR/M tool in VS2008, create a binding source, drag/drop elements from the binding source onto my form, and create a functional application. Functional should not be confused with enterprise level, nor was I expecting it to be. If I could create something like that in 2 minutes using drag and drop, my value ($$$$) as a developer would be on the decline. Allow me to recap some of my steps I took to create a functional application.

  1. Create a new Winforms 3.5
  2. Right click on the new project and select add new item, choose Linq To SQL Classses.
    1. This will create a new .dbml file. It will open a design surface where you can drag/drop tables, views and stored procedures. This creates a DataContext class.
  3. Create a new database connection, or open an existing connection on your Server Explorer Window
  4. Drag tables from the database from the Server Explorer to the design surface of your DataContext class.
  5. From the top menu bar, choose Data/Add new data source, or, show the data sources window, and choose the add new data source option
    1. Create a project data source
    2. Here is where it starts to get tricky. Select an object to make a data source for. It will depend on what you are trying to accomplish and your database schema. The schema I was using, relies heavily on extended tables, and it took me a couple of tries to pick the object that made the most sense. It's possible that I will have to go back and create a different object down the road as I get more into this.
  6. If you haven't already opened the Data Source window, do so now. Select some elements from your data source, and drag/drop them onto the default Form1. I chose a grid to list a collection of objects, and then their details below. A BindingNavigator was added for me automatically. If you didn't get one, or need to add one later, just drag one onto the form from the tool box, and set it's BindingSource property to the bind source you created in step 5.
  7. Open the code view of Form1
  8. Add a private member variable: DataClasses1DataContext test;
  9. Under the form's constructor, do the following
  10.    1: public Form1()
       2: {
       3:  InitializeComponent();
       4:  test = new DataClasses1DataContext();
       5:  if(test.DatabaseExists() == false) //Not required, just testing feature found thru intellisense
       6:   test.CreateDatabase();
       7:  x_t_personBindingSource.DataSource = test.x_t_persons;
       8: }
  11. Jump back to the Form, and add a button to your binding navigator for saving. Double click on the new button to have the event handler code generated and add the following:
  12.    1: private void saveToolStripButton_Click(object sender, EventArgs e)
       2: {
       3:  test.SubmitChanges(); //Need to add exception handling and pre-save validation
       4: }
  13. Build and Debug.

A connection string is automatically added to your App.Config file for you. You can test out the CreateDatabase feature by changing the connection string to a non-existent database. You should be able to add/edit/delete records in your database, using this simple application we just created. The DataContext class, is the top level class in the hierarchy used to work with your database. It controls the connection to the database, and, as you've seen, has support for creating and deleting the database. The create database feature reminds me of a similar feature in the Castle's Active Record project. Just take a look via object explorer or intelli-sense, all of the methods available to you. I've listed the ones that caught my attention below. 

  • Create/Delete Database
  • Deferred Loading Enabled: Implies that L2S uses deferred loading for many to one relationships
  • ExecuteCommand: Direct execution of a command.
  • ExecuteQuerey: Returns IEnumerable or <T> based on a provided query.
  • GetChangeSet: Returns changes tracked by the DataContext
  • Transaction: Set a transaction object to support transactions

Validation - Check out ScottGu's part 4 on L2S

  • Schema Validation - Linq is supposed to check for obvious schema issues, such as null values. However, the exception I got when I tried to insert a null value, came from SQL, not Linq. Also I was adding items on a grid, and added 2 items in a row. Their Id fields were both set to 0, and when I went to save, I got a Linq exception saying I couldn't have duplicate keys. Setting the ID values to something different, allowed me to get to the database at least, so I need to look into this more.
  • Property and Submit Validation - Create a partial class, then a partial method that implements validation when a property is changed. If you type partial in the code view window, you will get a list of partial methods you can implement. You have access to 2 methods for each property, OnChanging and OnChanged. You also get access to a OnValidate method. If there is an error, you throw an exception. This works OK, but doesn't provide the nicest feedback available. However, for anything less then an enterprise application, this may be OK, especially in a proof of concept, or highly iterative application, where you can add better a better user experience later. 
  • Insert/Update/Delete Validation - Same scheme as property and submit validation, but you can have validation in response to an Insert, Update or Delete.
  • ChangeSet: Starting with Beta2, you can get access to all of the changes in the DataContext. One possible use, is to inherit the DataContextClass, and override the SubmitChanges method, checking the ChangeSet and performing validation.
  • My Take on validation:
    • There is some work that needs to be done with validation. I could see an edition to the Enterprise Library designed specifically for L2S.
    • My own idea would be to create a class to track validation errors.
      • New custom exception called validation error.
      • A collection of validation errors, including error text, and the property that is invalid
      • Starting to sound allot like CSLA

Other things I noticed

    • You can manually create classes in the Design Surface, as well as edit the auto generated ones
      • Control nullable, access modifier, and inheritance modifier.
    • There is an inheritance property you can set on the design surface, allowing you to indicate which objects inherit from another. This looks very promising for some of the schemas I work with.  

What's Next?

I'm going to read over ScottGu's 7 part series on L2S to get some good ideas on what I can do with L2S, and see how it can fit into future and existing projects. I am really excited to see how people start to integrate L2S with their existing projects and frameworks. Of particular interest would be using CSLA and L2S.

Additional Resources

Note: First post where I've had formatted HTML for source code. I'm using the Code Snippet Plugin for Windows Live Writer.

Sunday, October 07, 2007 10:02:14 PM UTC  #    Comments [0] - Trackback
Programming | Review For Future Projects
 Saturday, October 06, 2007

PolyMon is an open source agentless monitoring application written in the .Net Framework, and available, with source on CodePlex. It is designed as a client/service/server architecture, consisting of a WinForms management application, Windows Service monitoring engine, and uses SQL 2005 for it's data store. I have written about Polymon before in my post about Network Monitoring, so you should check that out for some more details. I will re-iterate the available monitors here.

  • CPU
  • Disk
  • File (Age and Counts)
  • Windows Performance Counters
  • Ping
  • PowerShell Scripting
  • SQL Monitor via Stored Procedures
  • SNMP
  • TCP Port
  • URL
  • Windows Service Monitor
  • WMI Monitor

I set this up at home, with limited success, and at work (to monitor dev and test instances) with better success. The only difference between the 2 installs is I'm using integrated authentication at home, and SQL authentication at work. I've noticed some other issues with domain authentication at home, so I feel that it's an AD issue at this point, and not a problem with Polymon, although there may be the opportunity for more robust error logging in Polymon if this turns out to be the case.

I setup Ping and SQL monitors based on our production monitoring system at work, and only had to monitor the SQL monitors slightly to support Polymon, which requires two output parameters defined in the stored procedures. I wanted to setup the WMI and Powershell monitors in place of some of the custom SQL monitors, but didn't have the time. I've added some links at the bottom to BizTalk Powershell resources for future reference.

Pros:

  • Free and Open Source
  • Actively Developed with a road map that makes sense
  • Extensible without modifying the core application
  • Little need to extend given the excellent coverage provided by the default monitors, especially PowerShell
  • Runs on SQL 2005, so you get all of the benefits of SQL 2005, plus you could write custom reports in Reporting Services and have those emailed.
  • Monitor not just uptime, but other stats as well. For example, response times are logged, and the SQL monitor supports returning

Cons: 

  • Monitoring Engine is not multi-threaded - If you had 61 monitors set to run every minute, and they all took 1 second, you would start to see lag. This is a know limitation and can be worked around by not having that many monitors set to run that often. It is on the development roadmap for the project, and is going to be addressed in two ways. The first is to multi-thread the monitor engine, which will allow scale-up. However, any good developer would know that just multi-threading is not the end all solution, and you could run into additional limitations as a result of running multiple threads. Therefore, the second part is to allow monitoring engines installed on separate computers, to run off the same database, effectively adding scale-out capabilities. Another possible benefit to this, is it would allow you to install the service on the servers you want to monitor and not have to deal with as much security. However, this would be the same as a monitoring application that requires an agent.
  • Database can grow large very quickly, which can also slow performance. You need to use some common sense, set appropriate retention policy, and possibly re-index to meet your individual needs.
  • No web interface. I actually like the WinForm application, but can also see were a web app would have it's advantages. There is a plan to replace the WinForm application with a Web Application. I'd like to see both, but can understand limited resources.
  • No Operator Groups - Operators are defined individually. However, if you have a distribution list setup, it makes it a little easier.
  • Only Email Alerts
  • No email of reports that I can see, however, this could be considered a Pro, as you could use SQL Reporting Services to make your own reports
  • Remote connections for monitors represent administrative and security considerations. For example, you need port 1433 open to make remote sql connections, WMI does not look very administrator friendly for remote connections, and the same would apply to WMI thru power shell. This is a limitation of the technologies themselves, and not Polymon, but worth pointing out.

Links

Saturday, October 06, 2007 10:12:22 PM UTC  #    Comments [0] - Trackback
Review For Future Projects | Tools
 Thursday, October 04, 2007

Just a quick post about a project called Rifidi, an open source project developed by Pramari and the University of Arkansas. Rifidi allows you to simulate how RFID would affect your processes using a graphical interface. I've only had the chance to do a quick once over of the web site, but it defiantly looks interesting. While I don't know if it will have an immediate impact on my current project, it may in the future.

Almost more interesting, is in the programming behind the simulation, and the fact that it is open source. Pramari is characterized as a "world leader in open source RFID software" in the press release, so I will defiantly be checking out their web site to see what they offer.

Thursday, October 04, 2007 7:12:38 PM UTC  #    Comments [0] - Trackback
Review For Future Projects
 Wednesday, October 03, 2007

Wow! Microsoft is making available, starting with the core libraries of .net 3.5, the full, commented source code for the .Net Framework. ScottGu posted about it here, and ScottH has a podcast about it here. Not only are they releasing the source code, but they are doing it in such a way as to make it actually useful to the end developer, by offering full support in Visual Studio 2008. Not only can you download the source and install it, but Visual Studio 2008 will be smart enough to go out to a server hosted by Microsoft and dynamically download the correct source file. By correct, I mean, that the service is smart enough to know what patches, service packs, etc you have installed. Chalk this up as one huge reason to jump on the VS 2008 band wagon.

For those of you in legal, the code is released under the Microsoft Reference License, which in a nutshell, states you can review, but not compile. Now at first, I thought, who cares if you can't recompile, but then I got to thinking, and remembered a project someone was telling me about where they used reflector to view the source and implement an asp.net server running off the compact framework. Given the use of the compact framework on my current project, I could see a similar need arising. I will have to monitor this closely and see what other people say, as I'm sure I won't be the only one looking to implement some full framework features on our closed WinCE systems.

Wednesday, October 03, 2007 6:42:53 PM UTC  #    Comments [0] - Trackback
Programming

My friend dialed up 1-800-MyComputerIsBroken and got me on the other end (as usual). The problem, a partially broken network adapter, you know when windows says your NIC is connected, but it just doesn't seem to work reliably. In this case, my friend was unable to connect, or stay connected to World Of Warcraft (the horror). Short of replacing the NIC, my friend had tried most of the common stuff, like different network cable, trying a different computer with his normal network cable, plugging a different computer into the same port on the firewall, etc. My first thought was, maybe WoW got corrupted, but after my friend started browsing the web he noticed timeouts and other issues which led us to believe it was a wider problem.

I know I had come across some dos shell commands that is supposed to reset your NIC, so I set out to rediscover those commands. I was pretty sure Scott had posted something awhile back, and after a quick search, I had what I was looking for. The following commands are taken from Scott's post:

   1:  ipconfig /flushdns 
   2:  nbtstat -R 
   3:  nbtstat -RR 
   4:  netsh int reset all 
   5:  netsh int ip reset 
   6:  netsh winsock reset
 

While the post's title makes it sound like it's a Vista only fix, it did work for my friend who was running WinXP SP2. I had also come across another site that talks about some of the commonly used command line utilities.

Wednesday, October 03, 2007 10:45:43 AM UTC  #    Comments [0] - Trackback
Technology
Archive
<October 2007>
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2009
Adam Salvo
Sign In
Statistics
Total Posts: 176
This Year: 0
This Month: 0
This Week: 0
Comments: 10
Themes
All Content © 2009, Adam Salvo
DasBlog theme 'Business' created by Christoph De Baene (delarou)