Xerratus
Happily stressed out, since 1974


 
Monday, March 27, 2006

As luck would have it, a friend of ours, Michael Hogan, owns a couple of race horses.  This past Sunday my wife (her story here) and I went out to Portland Meadows to watch his latest horse, Nova Ice, run.  She's a beauty and won her fourth straight race.  And, to our amazement, we were invited into the winners circle for the post-race picture.

The official picture took in the winners circle.



From left: Jonathon (The Trainer), Mark, Sandy (Ethan's wife), Ethan, Me, Nikki (my lovely wife), Doug (our neighbor and avid gambler), Marie's landlord, some gambler we met, Marie (Michael's better half), Mike (the owner), some strange man making out with the horse, and last but not least, the Jockey Juan.



Congrats Mike and Marie... and thanks for the invite, we had a great time.
Friday, March 24, 2006

Problem:
Error in Visual Studio 2005
Invalid access to memory location. (Exception from HRESULT: 0x800703E6). File: web.config. Line: 86

Line 86 of the web.config file:
<add assembly="Microsoft.SqlServer.Replication, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>

Explanation:
First off, why is "Replication" being referenced by the web project in the first place?

The project I'm working on is quite complex with about 12 projects within the web solution.  Of these projects, a database project exists which utilizes replication.  While the web project does not access this project directly it does access it indirectly thru a business logic layer project which references a data access layer project which references the database project.  

With that said, when I compiled, Visual Studio automatically added <add assembly="Microsoft.SqlServer.Replication, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/> to the web.config file which in turn thru the error Invalid access to memory location. (Exception from HRESULT: 0x800703E6). File: web.config. Line: 86.  

There is no way around it.  Even when I strip out line 86, Visual Studio just adds it right back.  What's worse is that the web.config file in our web project is under source control.  So every time we compiled the web solution, Visual Studio would prompt to check out the web.config.  For a while, my team and I would just ignore the prompt and NOT check out the file (stripped of line 86 of course) and all would be fine.  But just recently, I put it back because the prompting was just too much throughout a normal work day and set out to fix this once and for all.

Solution:
Quite honestly, I don't know if this is a solution or more of a work around because I think the problem is truly a Visual Studio bug that needs to be fixed.  

With that said, here’s the work around:
First, in the database project (the project that is actually referencing the replication) right click the references in question and select "properties" and set "Copy Local" = True.  In my case, the files in question are:

Microsoft.SqlServer.ConnectionInfo
Microsoft.SqlServer.Rmo

Now compile the database project ONLY.  Once this is complete, go to the bin directory of this project and you'll see the following dlls:

Microsoft.SqlServer.BatchParser.dll
Microsoft.SqlServer.ConnectionInfo.dll
Microsoft.SqlServer.Replication.dll
Microsoft.SqlServer.Rmo.dll

Select and copy these.

Now, navigate to the web directory Bin folder and Paste the copied files there.

Side note: If, like me, you are using source control you can add these files to Visual Studio THEN right-click each file and select "Exclude From Project".  This will simply create a file of the exact name suffixed with the .exclude extension.  Simply, this will allow the solution to be compiled without prompting you to check out the newly added dlls.

Finally, right-click the solution in Solution Explorer and select "Clean solution" then build the solution WITH line 86 in the web.config.

Viola, it should compile without errors and the dreaded Invalid access to memory location exception should be gone.

Now, I'm not quite sure why this works but I do believe that when compiling Visual Studio is trying to access all of the referenced components but can't seem to find the Microsoft.SqlServer files.  Yes, all 4 of these files are in the GAC (Global Assembly Cache) which is why I think the error is with the Visual Studio environment.  IMHO, Visual Studio should first check to see if the referenced files are in the GAC and access them there if found.

Note: 
When "publishing" a site, be sure to strip out the Microsoft.SqlServer dll files before pushing live.  Ironically, when the project is fully compiled and published, the error no longer appears (because the .NET framework knows to look in the GAC for the files).  Because of this, my theory that the error is within Visual Studio has some weight.

Credits:
None!  This has taken my team and I quite a while to figure out.  Every week for the past few months, I've Googled this error in hopes that somebody had found a solution to no avail.  

I hope by posting my "solution" (pronounced work around), others frustrated by this error will find this entry and put an end to the elusive (Exception from HRESULT: 0x800703E6) error.

Wednesday, March 22, 2006

Thank you!  Thank you to the person who completely circumvented a built in .NET function for creating new Guids.  This was so bad and frickin unbelievable that I actually stopped my work to post this because of my complete disbelief. 

First off, here is the CORRECT way to create a new Guid:

   1:  // Uses the built in function to return a guid
   2:  private Guid _globalId = Guid.NewGuid();

That's it!  Easy, right?  Uses built in functionality.

But here is the ingenious way I found this morning that completely wowed me:

   1:  // Goes to the database, uses select newid() from a sproc to return a new guid
   2:  private Guid _globalId = LicenseVerification.ClientAccessLicenseBusiness.CreateGuid();

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Text;
   4:   
   5:  namespace LicenseVerification
   6:  {
   7:      public class ClientAccessLicenseBusiness
   8:      {
   9:          //...snip...
  10:   
  11:          public static Guid CreateGuid()
  12:          {
  13:              return LicenseData.CreateGuid();
  14:          }
  15:   
  16:          //...snip...
  17:      }
  18:   
  19:      public class LicenseData
  20:      {
  21:          //...snip...
  22:   
  23:          public static Guid CreateGuid()
  24:          {
  25:              Guid newGuid = (Guid)SQLHelper.ExecuteScalar(DataConfig.ConnectionString, CommandType.StoredProcedure, "ClientAccessList_CreateGuid");
  26:              return newGuid;
  27:          }
  28:   
  29:          //...snip...
  30:      }
  31:  }

   1:  CREATE PROC [dbo].[ClientAccessList_CreateGuid]
   2:  AS
   3:  select newid() 

Yes, you are seeing this correctly!  The programmer who wrote this thought that going thru the business & data layer to call a stored procedure would be the best way to create a new Guid.  I'm in complete shock. 

Friday, March 17, 2006

My wife is home sick for Paris. We went there for our honey moon in the summer of 2005 but unfortunately lost our camera during our trip back home. Since she's home sick and needed to see Paris again, I thought I'd help. I sent a "friend", we'll call him Google, to Paris to take some pictures of our time there in that great city. Enjoy!


Here's the hotel we stayed at; Les Trois Poussins at 15 Rue Clauzel


The reception desk where we met the lovely unforgetable staff


Our room


The little cafe in the hotel where we ate breakfast every morning


The bistro we ate in our first night; ham and cheese sandwhiches -yum


Gard Du Nord, we walked there the first day to get our metro passes


Sacre Cur, we walked there next


More Sacre Cur


A map of the metro


Another mapWe


found the metro a few blocks away from our hotel


One of the many bistros we ate at, the patio chairs always faced the street


The Louvre


The Louvre again


The upside down triangle in the Louvre, NOW I know what it means


My wifes favorite piece in the lourve, The winged goddess of victory


The crowd in front of the Mona List, about as close as we got


The Arch De Triumph on Champs Elysées


ManRay, the BEST restaurant in Paris; the owner gave us a gift before we left


Notre Dame


The Eiffel Tower


Beneath the Eiffel Tower, we ate lunch there


Another


A view from the Eiffel Tower


And last but not least, Starbucks; we found it on our last day... we both nearly shat!


A view from inside Starbucks

Honey, I love you... I hoped this little montage helped make you feel like Paris isn't that far away.


When I got home from work yesterday my wife had some news that would make any grown man giddy... well any grown man who's a geek that is.  That afternoon she saw a truck laying fiber behind our house on the main street.  Fiber!  Did you hear me, fucking FIBER! 

WOO HOO! 

Soon we'll be able to drop our cable modem for a real internet connection.

Tuesday, March 14, 2006

Well it took a while, I even put up a good fight but in the end I got the sickness. 

Yup, everybody has been getting sick around me (my wife, co-workers, strangers on the elevator, etc) and I was doing so well at NOT getting sick but I guess I just couldn't fight it off any longer.  It's day 3 or 4 and the crud (as my wife calls it) is not getting any better.  Fuckin' A!  My wife has had it for about a week longer than I and she's STILL fighting it off which means that I have at least another week of this crap to look forward to.

Anywho, just thought I'd let the world know so my avid readers don't think I've given up blogging; I haven't.  Just need to get rid of the crud!

Thursday, March 09, 2006

It's snowing!  Rather, it snowed last night!  

My wife and I have wanted it to snow here for a while; just before the holidays we got a quick, freak snow storm which satisfied our craving.  After a month or so, we wanted more snow (if you haven't noticed already, we both love snow) but all we got was rain, and lots of it.  

So this morning, at around 5am, I awoke (one of our cats wanted out) and noticed that our porch was covered with a layer so the white stuff.  Not able to keep my excitement down, I woke my sweet wife by basically saying "Oh my god, there is 2 inches of snow outside".  As you can imagine, she was up and wide awake in about 7/10th's of a second (slightly faster than if I had said the house was on fire) looking outside with me like 2 little kids seeing snow for the first time, I hoping school would be cancelled.  Then, realizing that it was late, we both laid back down and went to sleep.  To put this into perspective, the entire event, from the time I first saw the snow to when we both laid back down, took less than 5 seconds.  But time is relative; we all know that, so to me, it was much, much longer.

Happy Snow Day!

Oh, and to the local weatherman... WTF!

Tuesday, March 07, 2006

My wife has been behind me and Pytheus from the very beginning.  If it wasn't for her delicate pushing and total support, I don't know if Pytheus would have ever made it this far.  More to the point, with her continued support, I feel that Pytheus can and will succeed.

She wrote a nice congratulatory entry on her blog concerning the launch of Pytheus, I emplore everyone to read it.  She truly is amazing!

Thank you for your support honey!


It's been driving me crazy ever since I heard Becks new song Que onda guero, what does it mean?  Now, I know a little spanish and I know "Que onda" is "What's up" but I had no idea what guero was.  Back in my restaurant days (when I shaved my head) I was called pelon (which roughly means baldy) but I never heard guero nor was I ever called guero (even though I am a guero).  Well, curiosity got the better of me so I did some searching this morning and I found it; "Que onda guero?" is "What's up, whitey?" 

Hey, that's me... i'm a guero, rather; soy guero.

Ok, back to work.

UPDATE: For those of you reading the comments, guey (pronounced 'way') is basically spanish for dude.  Am I wrong here?

Monday, March 06, 2006

Well, I was a bit surprised to see that a few people signed up for a Pytheus account over the weekend.  I chalked it up to some of my blog readers curiosity.  Nope! 

As part of my daily morning ritual, before I actually start working, I log into Google Analytics.  I checked my blog stats first, because it gets more traffic than you might think then I checked Pytheus.  What I saw kind of surprised me, 32% of my traffic for the past week was from digg.com.  How the hell did that happen, I wondered.  I hadn't posted it up there yet.  So I went to digg and searched for Pytheus and wouldn't you know it, my friend from L.A. posted it there (only 6 diggs so far... come on people, don't you digg my site?  Pytheus needs more diggs than that!). 



A Bigg thanks to Faderisimo for the Digg!  It's nice to know that your hard work is appreciated.  Ready or not, my soft launch is not so soft anymore; Pytheus is going mainstream.
Friday, March 03, 2006

It’s been a busy week and I barely made my launch date but finally, my pet project (Pytheus) is live –the free version at least.  I’m still trying to work out some bugs and fix a few known issues but I feel that it’s finally at a point to allow people to start using.  The public informational site and the blog are still being finalized but the secure site is 98% functional.

What is Pytheus?  Pytheus is my attempt to bring order to those individuals who access or work on multiple computers throughout your day yet want to or need to access the same information (links, notes, files, etc) while on different machines.  On top of that, it’s also a place to collaborate with other Pytheus users via a shares feature.  Have a favorite site you visit a lot and want to let your friends know about it?  Have a file you want your co-workers to have access to but don't want to email it out all the time?  Simply share it out and anyone who’s accepted your invitation to access your shared items can see it.  No more emailing links or files around. 

There is also nothing to download and you always have access to the latest code.  I've developed Pytheus following the Software as a Service model, not the advertising model.  With that said, you will never see an advertisement on our site and you can feel safe that Google isn't scanning any information you input for direct marketing.  Our revenue stream is subscription based and we feel that this site will be something you'll want to pay for.

Some more features:
  • All of the sections are searchable.
  • No advertisements.
  • You can save a brief description with every item (which is also searchable).
  • The site utilizes AJAX (an Anthem.NET implementation) for fast server interaction without the need for page reloading.
  • Links has a built in password holder for those who have to access multiple sites and sometimes forget your password.
    • The passwords are all encrypted and can only be accessed from the logged in user ONLY after they answer a challenge question.  This safeguards your information in case somebody accesses your account without your permission.
  • All of the sections have their own trash bin for deleted items (items are permanently removed after 24 hours).
  • There is a utility that you can download to export your FireFox Bookmarks and/or your IE Favorites so that you can import them into Pytheus.
  • You can add a toolbar link that opens a small pop-up window for saving web pages to your account easily.
And more is still coming.  In the next month or so, I’ll be offering the Basic ($5 per month) and the Extended ($15 per month – includes files section and 1 GB of storage space) versions for those who need more.  Also in the development stages: Calendar, Reminders & Tasks.

So sign up and let me know what you think.  I’m always open to new ideas and ways to improve existing pieces.  Believe me, you'll be wondering what life was like BEFORE Pytheus once you begin using it.

Pytheus, your personal web assistant.