StrataFrame Forum

Business Object Mapper - Configure Business Object - Attempted to perform an unauthorized operation - Vista

http://forum.strataframe.net/Topic10292.aspx

By Kari Paukku - 7/15/2007

Hi,

in a Vista Business environment, using SF 1.6.1, SQL Express 2005 and Oracle 10gR2 (with Oracle client 10.2.0.3 for Vista) I get the following error when trying to configure a business object.

The error message is:

UnauthorizedAccessException
  Attempted to perform an unauthorized operation.

Source     : mscorlib

Stack Trace:
   at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
   at Microsoft.Win32.RegistryKey.SetValue(String name, Object value, RegistryValueKind valueKind)
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderBODialog.SaveFormStateToRegistry(Boolean ShowOptions)
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderBODialog.ToggleWindowSize()
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderBODialog..ctor(Int32 BusinessObjectPK, String BusinessObjectName, DTEprojectsBO ProjectsBO)
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ConfigureBusinessObject(TreeNode SelectedNode)

The application is just a brand new application created to find the reason for the error. It has only one form (no field, buttons etc) and the project only contains one business object that I'm trying to configure the first time.

I can access the Oracle database from "Configure Project" and I can access the SF database from Database Connection Wizard.

When closing the Business Object Mapper after the error message the Visual Studio crashes and restarts.

I tried the same thing using SQL Server as the data source and at the precise same point I received this error message:

UnauthorizedAccessException
  Attempted to perform an unauthorized operation.

Source     : mscorlib

Stack Trace:
   at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
   at Microsoft.Win32.RegistryKey.SetValue(String name, Object value, RegistryValueKind valueKind)
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderBODialog.SaveFormStateToRegistry(Boolean ShowOptions)
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderBODialog.ToggleWindowSize()
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderBODialog..ctor(Int32 BusinessObjectPK, String BusinessObjectName, DTEprojectsBO ProjectsBO)
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ConfigureBusinessObject(TreeNode SelectedNode)

What might be that "unauthorized operation" I'm trying to do and how could I fix this...?

TIA,

Kari

By Ben Hayat - 7/15/2007

Kari, when did you download 1.6.1? Recently or Friday/Sat (July 6/7)?



If you downloaded and installed on those two days, then re download and install again. But if this is from recent download/install I'll wait for SF team to respond!
By StrataFrame Team - 7/16/2007

That error is coming from the BOMapper... it's trying to store it's location and form size to the registry so that it can remember it's location and size when you open it the next time.  You should have access to read/write to/from the registry if you're running Visual Studio with administrative privilages.  When you run VS2005 on Vista, it should show you a dialog up front that asks you if you want to run VS as an administrator... if you didn't choose yes, then you'll get that error. 

I also think you have to have VS2005 SP1 and VS2005 SP1 Vista Update installed on your computer for VS to work properly with the registry and the UAC (User Access Control) of Windows Vista.

By Kari Paukku - 7/16/2007

Hi,

setting the "run VS as an administrator" option did the trick. No more crashing and the Business Object Manager works nicely.

Thank you for the help,

Cheers,

Kari

ps. For the record just in case other run to the same problem, both VS2005 SP1 and VS2005 SP1 Vista Update were installed


 

By StrataFrame Team - 7/16/2007

Glad you got it up and running Smile

It's also good to know you had those updates installed.  I think the first time I ran VS after installing all of the updates, I selected the "Always run as administrator" option (or something to that effect)... and I haven't had the pop-up since.