Tuesday, April 06, 2004

IEHost, Smart Client and DragDrop

A client of mine was working on adding drag and drop to a Windows Forms control hosted in Internet Explorer that we use.  They wanted to allow a user to drop a group of files, email messages, etc onto this control and then do something with the items that were dropped.  We got it all working great in a Windows Form but the same control hosted in Internet Explorer exhibited two strange behaviors:

  1. Whenever more than one file was dropped onto the control GetData(DataFormats.FileDrop) yielded only the first!  This was a weird one.  Come to find out this was the lack of System.Security.FileIOPermission!  Once we added this attribute: [FileIOPermission(SecurityAction.Assert, Unrestricted=true)] we started to receive more than one file.  According to PSS this is because there is a FileIOPermission demand in GetData() that fails silently after retrieving the first file.  Sounds like a bug to me!
  2. Second issue we ran into is that in the DragDrop handler we wanted to make a remoting call to our controller to have it launch a form. This failed only when we were in a DragDrop handler.  We never determined the root cause here but did determine that the source of the drop is blocked until the DragDrop completes.  Sure seems like I should be able call a method to indicate that is the case but instead you must return from the DragDrop event.  To get around this we did a this.Invoke() on a method containing the work. This allowed the DragDrop event to return and then for our form to be launched.
Tuesday, April 06, 2004 1:31:28 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Friday, April 02, 2004

HREF Exes in the Browser Oddity

If you have been reading my blog you realize that I do quite a bit with HREF exe style applications.

Well this past week I was working on a feature for a client with a co-worker and hit a bizarre problem.  We are modifying our application to act as a drop target.  This works great when the control we are using for the drop target is hosted in a windows form.  When the control is hosted in Internet Explorer dropping multiple files on the target results in only the first dropped file showing up!  Sure seems like a bug and turns out to be very problematic for us.  Anyone else ever hit this issue?

Friday, April 02, 2004 7:29:21 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Monday, March 29, 2004

Outlook Drag and Drop with .NET

Has anyone figure out how to get this to work?  I see dozens of messages inquiring about it but all answers seem to take the lame approach of looking at the current selection in Outlook instead of looking at the FileGroupDescriptor and using IStorage and IMessage to parse out the actual items.

However no one seems to have posted anything!  Any solutions out there someone is willing to send me?

Monday, March 29, 2004 5:36:22 PM (Pacific Standard Time, UTC-08:00)   #      Comments [4]  
 

  Friday, March 26, 2004

A SAN for the Rest Of Us

Ever since I started reading about iSCSI I have wanted to pick up some iSCSI devices and build my own SAN that will allow me to share storage resources amongst the multiple boxes in my office.  FC has always been way, way to expensive.

Along comes SANMelody. It isn't exactly free but at $1178 for their low end version it is the most cost effective way that I have found to build a SAN.  Just ordered some hardware today so I can give it a try.

Stay tuned for whether or not it is as cool as it looks.

Friday, March 26, 2004 4:06:49 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Thursday, March 18, 2004

Debugging Tip

Paul posted this great NUnit tip on his blog.  Of course this also works great for ASP.NET.  Just attach to the w3wp.exe process on IIS6 or the aspnet_wp.exe process on IIS 5.X.  How do you debug something however that is part of your startup code?  This is especially tough when wanting to debug the constructor of a HREF EXE or WinForms control in the browser. Use System.Diagnostics.Debugger.Break().  This will cause a debugger prompt to pop up when the line is hit allowing you to start a new VS.NET instance or select an existing instance to debug the running application.

Thursday, March 18, 2004 9:47:16 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Tuesday, March 16, 2004

Countries Visited

I have always considered myself fairly well traveled.  While I am on the road about 12-15 weeks a year I obviously return to the same places over and over again.

Check out the following map from http://www.world66.com which provides a way to track where you have lived and or visited:

Pretty cool but I have a lot of places to visit still!

Tuesday, March 16, 2004 10:35:30 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Monday, March 15, 2004

Database Build and Deployment

Mike Schinkel asked me the other day how we do database deployments.

I started thinking and realized it breaks down into two scenarios:

  1. Clean Build
  2. Version Update Build

#1 is pretty easy to describe.  We script everything.  I am way to paranoid about temporary changes getting made in development that accidentally make their way into production to allow anyone to just replicate databases, use DTS jobs, etc.

All changes must be scripted, all scripts must be in source control, the database is build out of this source tree.  Typically the scripts are broken down like this:

  • .sqt files which define the table structure
  • .sqx files which define the indexes and primary keys
  • .sqp files which define the stored procedures.  There is one file per sproc
  • .sqd files which insert initial default data

One of my current clients has an implementation of this that as part of the nightly build process it goes through a node of the source tree and runs all .sqt files to put the base schema in place.  Followed by the sqx, sqp and sqd files.  The only problems come when the sqd files come into play and they attempt to insert default data in an order not allowed by constraints, etc.  Here we have a system whereby we can impose an order in which certain ones run.  Awkward at best but it works.

#2 is even more awkward.  In the case of #2 there is existing data in the database that needs to be preserved. As such we have .NB files that are used to make changes to an existing database.  These allow us to for example instead of doing a create table use alter table to add a column.  This is where it gets really hard.  Figuring out what to run and what not to run to preserve data already in the system.

I am suprised that I don't see any tools/nant steps to help automate this type of build.  It is clearly an essential part of the process.

Monday, March 15, 2004 9:56:46 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Tuesday, March 02, 2004

.NET Passport for the masses

Mike Sax mentions the ridiculous fees for setting up Passport to use for authentication into your site. We looked into this for a customer at one point and found it pretty much prohibitive.  It would have fit quite well for this customers target market but it just was not feasible for this company who had a few hundred customers/trading partners.  Sure helps to understand why you see so few passport enabled sites.

Tuesday, March 02, 2004 10:28:44 AM (Pacific Standard Time, UTC-08:00)   #      Comments [3]  
 

  Monday, February 23, 2004

Build .NET CF Cabs with NANT

One step closer to my goal of being able to build our compact framework applications with NANT: http://blog.opennetcf.org/ncowburn/PermaLink.aspx?guid=6a7abb76-8d59-4dfa-b31c-0a2e1c1d781e

Monday, February 23, 2004 9:37:01 AM (Pacific Standard Time, UTC-08:00)   #      Comments [2]  
 

  Thursday, February 19, 2004

I'm on .NET Rocks!

Check it out!  I am on .NET Rocks talking about some of the work we have been doing over the last couple of years.

 

Thursday, February 19, 2004 11:40:46 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 


Administration
Sign In