"The project location is not fully trusted by the .NET runtime

P

paul_pals

Hi All..

Still hanging around this prob. "The Project location is not fully trusted by the .NET runtime..Your code will not execute as fully trusted and u may receive unexpected security exceptions"..I'm trying open a asp.net application from a server in a local intranet. When i open that appln in my machine the above mentioned error occurs. what could be the solution?



**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
R

Robert Jarratt [MSFT]

This is because by default there is a policy not to give full trust to code
that is executed from another machine on the intranet, it is considered to
be in the intranet zone. If your code needs to execute under full trust
(especially if you are running ASP.NET 1.0) then you need to change the .NET
Framework configuration using Control Panel/Administrative Tools/Microsoft
..NET Framework Configuration (or Microsoft .NET Framework 1.1 Configuration
if you are using the 1.1 framework).

You could use the configuration tool to change the policy to allow all
intranet code to have full trust. However, it is safer to use a specific
code group for your code and assign full trust to this code group instead.
The code group could either refer to the URL of the server you are using or
to the strong name you have assigned to the code. I would suggest that using
a strong name is better.

Please make sure, however, that your code really does need full trust before
doing this. If you are running on the 1.1 framework then there is a good
chance that you don't. Run the application and see what security exceptions
you get. If you do get some exceptions check them out and see if your code
really needs the permissions, and if it does then consider creating a custom
permission set rather than just granting full trust. I would recommend
reading "Writing Secure Code" by Michael Howard and David LeBlanc, the
material on running under least privilege is especially relevant here.

I hope this helps, if you have any queries with regard to the above please
do not hesitate to post again.

Regards
--
Robert Jarratt
Microsoft
(e-mail address removed)

This posting is provided "AS IS" with no warranties, and confers no rights.


Paulraj R said:
Hi All..

Still hanging around this prob. "The Project location is not fully trusted
by the .NET runtime..Your code will not execute as fully trusted and u may
receive unexpected security exceptions"..I'm trying open a asp.net
application from a server in a local intranet. When i open that appln in my
machine the above mentioned error occurs. what could be the solution?
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top