473,396 Members | 1,924 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,396 software developers and data experts.

That assembly does not allow partially trusted callers Error

I created a console application to read and manipulate an Excel file. I added reference to the Microsoft Excel 11.0 Object Library. When I place it in Network Drive and try to run the .exe from my system, it gives error 'That assembly does not allow partially trusted callers.' I tried to make the Network Drive where my Console Application is placed a trusted location in the .NET Framework 2.0 Configuration Tool, by adding a Child Code Group to the Runtime Security Policy--> Machine -->Code Group -->All_Code --> LocalIntranet_Zone. In this child code group I selected URL for the condition type and specified the location of my console Application on the network drive. But still it doesnt work out..I am badly stuck with this problem.. Can anyone help me out please.........
Mar 16 '07 #1
2 4967
Frinavale
9,735 Expert Mod 8TB
I created a console application to read and manipulate an Excel file. I added reference to the Microsoft Excel 11.0 Object Library.

When I place it in Network Drive and try to run the .exe from my system, it gives error
'That assembly does not allow partially trusted callers.'

I tried to make the Network Drive where my Console Application is placed a trusted location in the .NET Framework 2.0 Configuration Tool, by adding a Child Code Group to the Runtime Security Policy--> Machine -->Code Group -->All_Code --> LocalIntranet_Zone.

In this child code group I selected URL for the condition type and specified the location of my console Application on the network drive.

But still it doesnt work out..I am badly stuck with this problem.. Can anyone help me out please.........
Hi there!

I'm pretty new at this stuff myself.
But maybe what I know can help....your actual console application has a bunch of "evidence" which is used by .NET's security to determine what group it falls into. This means that your application (written by you, which isn't trusted by .NET) is placed into a category that identifies it as Partially Trusted.

You have to assign your application to a Code Group using the .NET Framework Configuration Tool.

I would create a custom Code Group that is set to full trust permissions and then assign your console application to this Code Group.

This means that you'll have to do something like Sign your assembly with a Strong Name and then import its Public Key into the custom Code Group.

You will have to do this through your project's Properties and then recompile it...then go to your custom Code Group and choose Strong Name as the Membership Condition and import the key (which is in your directory with your compiled code) here.

Do you need more clarification than this?

-Frinny
Mar 16 '07 #2
Thanks a ton Frinny..

But what is troubling me here is that the assembly which throws the error is Micosoft.Office.Core. How can I get the key of this assembly to make it trusted..?
Mar 17 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: g3000 | last post by:
I developed on a Win2K3 Server with VS 2005 Published a web app to my local drive. Copied that folder to a Win2K3 Server. Configured a new virtual directory Moved the files there. Modified...
1
by: Pierre | last post by:
Hi all, I have developped a set of WSs and everything works fine when I try it on my local network. When I export them on my host's server though I get the following error on my client: ...
1
by: Matt Culbreth | last post by:
Hello All, I've got a very simple ASP.NET 2.0 application which uses a DLL from a third party. I don't have the source to this DLL. Everything has been working fine on my XP development...
5
by: =?Utf-8?B?TWFydHluIEZld3RyZWxs?= | last post by:
From the amount of articles about this one I’m sure this gets asked a lot, but I haven’t yet found a succinct article which explains what is required in its entirety. I work using Visual...
1
by: John G | last post by:
I have created an ActiveX control that does word automation. Once I creat an instance of work I get the following message System.Security.SecurityException: That assembly does not allow partially...
1
by: nish85 | last post by:
Hi, i have uploaded my sit to web server goddady.com i have a button to download dyanmically generated excel file.This button is ajax enabled.....When i am click on this button it will popup a...
3
by: Joris van Lier | last post by:
I'm running an ASP.NET 2.0 web application in a Medium Trust environment, the application uses ODBC to connecto to MySQL and the hosting company has granted OdbcPermission, the solution includes a...
0
by: John G | last post by:
I tried creating a app with Silverlight. The app works great when I run it in vs.net 2008. But when I publish the app I get the following error: Assembly does not allow partially trusted callers ...
0
by: Tammie Dao | last post by:
I used VB.Net 2005 to get a dataset from SQL server database and write to a text file. I had connection string in app.config file. I published this console application to server with strong name key...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.