Using BeforeSave Event in Web Application
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Using BeforeSave Event in Web ApplicationExpand / Collapse
Author
Message
Posted 04/26/2008 11:20:33 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 04/26/2008 6:50:27 PM
Posts: 20, Visits: 73
I'm trying to use the before save event in a web application to log changes to the database.  I need to be able to access this from the application base page so I have access to the session and other application settings as well as my application's transaction log table.  It's working, however I get an error when building (which doesn't stop it from working, it's just very annoying at this point)

"Error 104 Method 'Private Sub snpccore_BeforeDelete(e As MicroFour.StrataFrame.Business.BeforeDeleteEventArgs)' cannot handle Event 'Public Event BeforeDelete(e As MicroFour.StrataFrame.Business.BeforeDeleteEventArgs)' because they do not have the same signature. C:\projects\MetSYSDotNet\MetSYSDotNet\App_Code\MetSYSSnapShotBasePage.vb 165 121 C:\...\MetSYSDotNet\"

I get the same error showing in the editor for each line as well.  I'm not sure why it thinks that the signature is not the same since it clearly is since it's clearly working (the event is getting called and it's properly calling the method I've set up with the object reference and such so I can parse and log all the data changes and they are indeed being logged properly). 

As I said, the build succeeds, unless there is ANOTHER error, in which case it's really painful to find the real error in all the other stuff.  I'm also getting the same issue with the BeforeDelete event which I'm using the log deletes as well, but I figure it's going to be the same issue.

BTW this is with version 1.6 and upgrading to the latest version isn't a option for a few days as the boss wants to get this version out the door in about 4 days.  Obviously this isn't going to be a stopper since it's working, but if there's an easy fix it's going to make any other troubleshooting easier for me.  I'll be ok with finding out that the latest version woudl make this go away since I'll be moving to it soon, but needed to ask anyways.

Post #15914
Posted 04/26/2008 12:46:48 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 9:46:15 PM
Posts: 288, Visits: 1,135
Cyrus Welch (04/26/2008)
BTW this is with version 1.6 and upgrading to the latest version isn't a option for a few days as the boss wants to get this version out the door in about 4 days.

Hi Cyrus,

Based on the error it is clear that you have an assembly version problem.  I don't do web development yet, but the current beta version 1.6.5.1 is pretty stable and you may want to try that, and if that does not work, you could go back to the previous version and that may clear the issue since in some of your folder there should be a different assembly with the different signature.

So make a backup of your project and upgrade to the latest version which will require you to do a clean install of SF anyway.

Edhy Rijo
Progytech (Computer Consultants)
Post #15916
Posted 04/26/2008 7:05:49 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 04/26/2008 6:50:27 PM
Posts: 20, Visits: 73
Edhy Rijo (04/26/2008)
Cyrus Welch (04/26/2008)
BTW this is with version 1.6 and upgrading to the latest version isn't a option for a few days as the boss wants to get this version out the door in about 4 days.

Hi Cyrus,

Based on the error it is clear that you have an assembly version problem.  I don't do web development yet, but the current beta version 1.6.5.1 is pretty stable and you may want to try that, and if that does not work, you could go back to the previous version and that may clear the issue since in some of your folder there should be a different assembly with the different signature.

So make a backup of your project and upgrade to the latest version which will require you to do a clean install of SF anyway.

I don't see how there could be an assembly version problem since it's setup in the recommended fashion where the business object assembly builds when the web project is built.  As I mentioned, as this point in the release cycle, and based on the fact that it actually compiles and runs just fine despite the ghost errors, upgrading is not an option until I get this out.  Then the FIRST step is to upgrade to 1.6.5 right away as I start to work on the .1 release of the product.  At this point it just means that I have to comment out ALL my logging code if I create an actual error so I can find it, unless of course the error is in the logging code, but I'm finished with it now and it's working so I'm not going to be touching it again until at least the .1 release. 

Post #15920
Posted 04/27/2008 3:01:20 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 3:24:00 PM
Posts: 3,733, Visits: 3,926
Actually Edhy is right on the money.  This is the most annoying error that VS produces.  if you notice, they have the exact same signature in the error.  What this means is that there is a business assembly of (probably the StrataFrame Business assembly) in more than one location and they are not exactly the same...yet they are the same version.  This can happen when the assemblies are copied into the Bin folder, etc.  If you check all of your project folders as well as the GAC and the Common Files\MicroFour\StrataFrame folder.  I have seen this error many times in my life, and this is always the case.  It can be frustrating to track down at times also.  Sometimes when i can't find it, I will delete my local development folder altogether and get everything from source control again...as this cleans up all of the local folders.
Post #15931
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 2:36am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 9 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.