Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ERROR: Sytem.Security.Permissions.SecurityPermission, mscorlib, version=1.0.3300.0, Culture=neutral PublicKeyToken-b77a5c561934e089 failed

Posted on 2006-07-06
7
Medium Priority
?
2,153 Views
Last Modified: 2008-02-01

 hello experts,

I have an application built in .Net. The client computers have the .Net Framework installed. I can run the application locally with no errors, however. if i put the exe on a network drive it will not run. i always get

The application attempted to perform an operation not allowed by the security policy. the operation required the SecurityException. To grant this application the required permission please contact your system administrator, or use the Microsoft.Net security policy administration tool.

Request for the permission of type Sytem.Security.Permissions.SecurityPermission, mscorlib, version=1.0.3300.0, Culture=neutral PublicKeyToken-b77a5c561934e089 failed.

I have already done

-gave the app a strong name with sn -k
- addde an AssemblyKeyFileAttribute n then recompiled
- Trusted all versions with full trust with the same key (using .net wizards trust an assembly)
- Enabled full trust on local intranet

the connection string i am using in the code is
SqlConnection("Data Source=servername;Initial Catalog=DBasename;User ID=userid;Password=xxxxx");

I am using visual studio 2003, sql server2000, and windows server 2003
 
 
0
Comment
Question by:kishorebanda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 12

Expert Comment

by:topdog770
ID: 17051211
Try giving the app full rights on the local computer as well.

It's a quick and dirty test, but it should work if you provide full trust on both the local computer and full trust on the local intranet as well.


0
 

Author Comment

by:kishorebanda
ID: 17052224
Thanks a lot topdog770 for the reply.

I already gave all permissions at machine level and user level. I have tried setting all zones(local intranet, my computer, strong name,.......).

Do i have to do anything on client machine. How do we give full trust on the local computer?

Thank You
0
 
LVL 12

Accepted Solution

by:
topdog770 earned 750 total points
ID: 17052374
Yes--just to confirm--on a computer trying to run the app from the network getting the security exception--go into control panel, administrative tools, Microsoft .NET Framework 1.1 configuration, Runtime Security Policy, Adjust Zone Security, Make changes to this computer, Set My Computer to full Trust and Local Intranet to Full Trust

Try running the application
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:kishorebanda
ID: 17052511
I login to my domain and then i log into server remotely( locally). I have Microsoft .NET Framework 1.1 configuration on the server. But i dont have it on local machine.
0
 

Author Comment

by:kishorebanda
ID: 17052549
Hey its working now.....
I found out that it doesnot work on shared drives. If itry to drag n drop it on local computer.then it works.
Thanks a lot topdog770 fro all these replies
0
 
LVL 12

Expert Comment

by:topdog770
ID: 17052551
Ok!  I'm making this too hard and forgot the most basic thing of all... and it gets me every once in a while too..

Install the .NET Framework on thier computer and then set permissions and then, finally, the app should work.
0
 

Author Comment

by:kishorebanda
ID: 17052566
Thanks again,
i did have framework installed on the client machine

Kishore
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question