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

Two Security Exceptions

I'm really stuck with this. I have to export a pdf file and I'm using a dll
(gios if someone knows it).

If I run this in a local project it's ok but when moving it to a server, I
get a Security.Exception:

- If I try to send via http: "that assembly does not allow partially trusted
callers"
- If I try to save to disk: "request for the permission type
'System.Security.Permissions.FileIOPermission'

In both cases the message suggests changing the application's trust levels.
How can I do that?

--

Regards,

Diego F.
Nov 19 '05 #1
1 1108
It sounds like your asp.net application is configured to run in a low trust
environment. For this:
- If I try to send via http: "that assembly does not allow partially
trusted callers"
Since your ASP.NET code is not fully trusted (it's partially trusted) and
you're calling into this strongly named assembly, this is a potential security
risk and thus isn't allowed. So either make your asp.net app fully trusted
again (potential security risk) or mark this target assembly with the AllowPartiallyTrustedCallers
attribute (again, potential security risk unless you've done a security code
review). I don't know what your host setup is and what your tolerance for
this is.
- If I try to save to disk: "request for the permission type
'System.Security.Permissions.FileIOPermission'
Again, your code is has not been granted the permission to write to the filesystem.
You'd need to grant it the permission to do so.
In both cases the message suggests changing the application's trust
levels. How can I do that?


These are the docs for configuring the trust level:

http://msdn2.microsoft.com/library/w...us,vs.80).aspx

But if you're on a hosted machine then I bet the admin is locking you down
and not allowing your code to run in a more trusted environment.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #2

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

Similar topics

12
by: A.M. | last post by:
Hi at all, how can I do to insert into a HTML page a file .txt stored in the same directory of the server where is the html file that must display the text file.txt? Thank you very much P.Pietro
1
by: web1110 | last post by:
Hi, I set up my wifes machine to run .NET, some of my stuff runs but not all. First example: I have a windows program that displays environment info. It runs fine on my machine. Whan I...
29
by: Patrick | last post by:
I have the following code, which regardless which works fine and logs to the EventViewer regardless of whether <processModel/> section of machine.config is set to username="SYSTEM" or "machine" ...
3
by: Dave Wurtz | last post by:
All, Does anyone have ideas how they have implemented field (property) level security? I want to handle this from the business object level, not the database level. Is it best to have a...
4
by: Phil Mc | last post by:
Say for example you have a application running on a windows 2003 server (that is on server, not from). This application needs to start child applications (must be stand alone console applications),...
5
by: CyberLotus | last post by:
Hi, I've created a web application and through this I want to import Excel data to database. Following is the code that I've written, ...
5
by: Dave Cullen | last post by:
My version of dotnet is 7.0.9955 Studio 2002. The applications I've written refuse to run on our shared network drive, giving security exceptions. I've not been able to find a workaround for this...
0
by: alf | last post by:
I have an app that was running in my local server using full trust, now I moved it to hosting company wish run in Medium trust. Then I get a Security exception (details below) Then I configured...
5
by: VictorG | last post by:
Hello, I am trying to secure a webservice using WSE 3.0 and the turnkey usernameForCertificateSecurity profile. I am passing a valid username token, and on the server I have overridden the...
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
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...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.