cancel
Showing results for 
Search instead for 
Did you mean: 

Security Error with SAP Connector 2.0

Former Member
0 Kudos

Hi,

I am using SAP Connector 2.0 currently and when I try to drag my proxy class from the toolbox onto the form I get an exception message with "The exception was Security Error"

I was using SAP Connection 1 before, but I uninstalled that, but get the feeling it may have something to do with this since SAP Connector 2.0 runs without problems on another computer that has never had version 1.

Any suggestions??

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thank you for your answer. I did as you said and here are the results :

mscorlib.dll!System.Activator.CreateInstance(System.Type type, bool nonPublic) + 0x43 bytes

mscorlib.dll!System.RuntimeType.CreateInstanceImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) + 0x117 bytes

mscorlib.dll!System.Activator.CreateInstance(System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) + 0xc9 bytes

microsoft.visualstudio.dll!Microsoft.VisualStudio.Designer.Host.DesignerHost.CreateObject(System.Type objectClass, System.Object[] args, System.Type[] argTypes, bool fThrowException) + 0x12b bytes

microsoft.visualstudio.dll!Microsoft.VisualStudio.Designer.Host.DesignerHost.CreateComponent(System.Type componentClass, Microsoft.VisualStudio.Designer.Host.DesignSite newSite) + 0x11a bytes

>microsoft.visualstudio.dll!Microsoft.VisualStudio.Designer.Host.DesignerHost.CreateComponent(System.Type componentClass) + 0x8 bytes

system.drawing.dll!System.Drawing.Design.ToolboxItem.CreateComponentsCore(System.ComponentModel.Design.IDesignerHost host) + 0x64 bytes

system.drawing.dll!System.Drawing.Design.ToolboxItem.CreateComponents(System.ComponentModel.Design.IDesignerHost host) + 0x2c bytes

sap.connector.design.dll!SAP.Connector.Design.TableTool.BaseToolboxItem.CreateComponentsCore(System.ComponentModel.Design.IDesignerHost host = {Microsoft.VisualStudio.Designer.Host.DesignerHost}) + 0x346 bytes

system.drawing.dll!System.Drawing.Design.ToolboxItem.CreateComponents(System.ComponentModel.Design.IDesignerHost host) + 0x2c bytes

system.design.dll!System.Windows.Forms.Design.OleDragDropHandler.CreateTool(System.Drawing.Design.ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize) + 0x185 bytes

system.design.dll!System.Windows.Forms.Design.ParentControlDesigner.CreateToolCore(System.Drawing.Design.ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize) + 0x2e bytes

system.design.dll!System.Windows.Forms.Design.ParentControlDesigner.CreateTool(System.Drawing.Design.ToolboxItem tool, System.Drawing.Point location) + 0x18 bytes

system.design.dll!System.Windows.Forms.Design.ParentControlDesigner.OnDragDrop(System.Windows.Forms.DragEventArgs de) + 0xa8 bytes

system.design.dll!System.Windows.Forms.Design.ControlDesigner.OnDragDrop(System.Object s, System.Windows.Forms.DragEventArgs e) + 0xc bytes

system.windows.forms.dll!System.Windows.Forms.Control.OnDragDrop(System.Windows.Forms.DragEventArgs drgevent) + 0x51 bytes

system.windows.forms.dll!System.Windows.Forms.Control.DropTarget.System.Windows.Forms.UnsafeNativeMethods+IOleDropTarget.OleDrop(System.Object pDataObj, int grfKeyState, long pt, int pdwEffect) + 0x5a bytes

reiner_hille-doering
Active Contributor
0 Kudos

Do you remember what kind of Exception it was? If it was any kind of Security Exception, please try the following:

- Open a Visual Studio Command Prompt (Programs->Microsoft Visual Studio .NET 2003->Visual Studio .NET Tools->VS Command Prompt)

- Execute "caspol -s off".

- Try again.

Note: the mentioned command turns .NET security completely off, so don't forget to turn it on again later.

Former Member
0 Kudos

Thank you very much, you are a genius. With the security off it works like a charm.

reiner_hille-doering
Active Contributor
0 Kudos

Thanks.

Anyway, it's strange that the error happens, because normally everything running inside Visual Studio runs in full trust. Perhaps you have changed something is the security configuration (the MMC-snap-ins that are installed into Control Panel). If you don't find exactly the reason but prefer to turn security on again you can use these tools to increase the trust for the SAP.Connector.Design.DLL in \program files\microsoft Visual Studio .NET 2003\Common7\IDE.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, I have allready tryed

regsvr32 "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\vcpackages\csproj.dll"

without any luck, and I have installed the fix.

I cannot belive I have to install VS.NET again or better yet re-format my computer?

reiner_hille-doering
Active Contributor
0 Kudos

The problem could be also related to some security settings on your machine. Could you please do the following step:

- Before you do the action that causes the error message, start a second Visual Studio instance.

- In this attach debugger to the first VS (Tools->Debug Processes...->Devenv.exe->Common Language Runtime (only) )

- Turn on "First chance execption break (Debug->Exceptions...->CLR Exceptions->When exception is thrown->Break into the debugger).

- Execute the step that causes the error message on first VS.

- In second VS you will see an exception. Go to callstack (Debug->Windows->Call stack) and paste it to the answer.

reiner_hille-doering
Active Contributor
0 Kudos

There is two typical issues:

- Uninstalling NCo 1.x sometimes causes some registry entries to be destroyed. This can be fixed calling

regsvr32 "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\vcpackages\csproj.dll"

- There is some small bugs in the shipped version that are corrected in the fix available in OSS note 506603.