473,378 Members | 1,411 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

CreateInstance security violation

guy
i have some code that worked fine that has now been moved out to a separate
assembly, (simplifeid below)

Dim asm As System.Reflection.Assembly =
System.Reflection.Assembly.GetAssembly(OwningMainF orm.GetType)
Dim o As Object = asm.CreateInstance(frm, True)

and i now get a system.security.ipermission exception:-
"Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

anyone know how i can get round this? (the assembly and frm are both correct)

*guy*
Jan 24 '06 #1
1 1407
Don't quote me on this... ... that folder where the solution is newly located
might not be set up in the .NetFramework configuration with in that machine.
best luck to you though.

Ronin

"guy" wrote:
i have some code that worked fine that has now been moved out to a separate
assembly, (simplifeid below)

Dim asm As System.Reflection.Assembly =
System.Reflection.Assembly.GetAssembly(OwningMainF orm.GetType)
Dim o As Object = asm.CreateInstance(frm, True)

and i now get a system.security.ipermission exception:-
"Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

anyone know how i can get round this? (the assembly and frm are both correct)

*guy*

Mar 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mp | last post by:
I just upgraded to Tomcat 4.1.29 and I am receiving the following error when I connect via ODBC to an oracle database: java.lang.ClassNotFoundException: Security Violation, attempt to use...
0
by: Stephane D. | last post by:
I have currently an issue with the following piece of code. The assembly is to run under com+ (as Library) and the class derives from ServicedComponent. Code: C# - .NET framework V1.1.4322 //...
7
by: Osvaldo Bisignano | last post by:
I'm using Assembly.CreateInstance (3rd overload) to create an instance of one of the types included on that dll. But what the hell are the bindingflags? I get this exception: ...
15
by: Brian Rogers | last post by:
Hello everyone, I apologize for the cross and re-post, but I am still searching for an answer. Why can C++ can create this object, but C# can't? I am trying to create an instance of the...
3
by: Daylor | last post by:
hi. im loading assembly from my computer and createInstance from it. till now it worked ok. now, im changing the path from : c:\myfolder\myassembly.dll to
7
by: hazz | last post by:
this is a repost with more concise code (well, for me) and better questions (I hope....) . given the following two classes, my intent is to use either Activator.CreateInstance or InvokeMember pass...
0
by: Just D. | last post by:
All, Did anybody try using this in WebApps? Assembly.GetAssembly(oSomeObject)).CreateInstance(sSomeObjectType) The situation is interesting, the Web app works just great on my developer...
8
by: Dan Holmes | last post by:
Isn't CreateInstance(typeof(int)) the same as CreateInstance<int>()? i don't understand how this method helps anything. dan
8
by: Geoff Cox | last post by:
Hello, I have been using Javascript to access some audio files from another server and there has been no associated problem with IE or FF but Opera gave an error message which led me to read...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.