ASP.NET application trust level from the web.config file

Posted on 2006-05-02
Last Modified: 2012-05-05

I want that my ASP.NET application run on the FUL trust level but in the shared hosting environment it is not possible so what configuration i do for my web.config file so i can run my application.

Cani change my application trust level at run time How?

Now my application compile in the Full trust level but now i wnt it run in medium trust level this is possible through the web.config file HOw??

[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
Question by:Sam Panwar
    LVL 23

    Expert Comment

    Is there any reason that you want full trust level? What is that you are trying to do that triggered Ssecurity exception? Instead of runing your app in full trust level, you should ask your self do I really need it?

    hosting provider will never allow anybody mucking with the secutity permissions on their server. Once they give you full access, they can jeoprdize other hosted apps security.

    If you can narrow down your requirements to minimum possible level and explain it to hosting provider they may be able to put your app in a separate pool and configure the security accordingly.
    LVL 18

    Author Comment

    by:Sam Panwar

    Actually I have server access and i also try with the another pool so i want how to possible through the web.config file .
    IF our server only support midium trust level.then how to change run time my application trust level as server trust level.??
    LVL 18

    Author Comment

    by:Sam Panwar

    I got the solution of it .

    In shared hosting environment its so difficult. and dedicted server its run.

    we can use full trust in the web.config file in the domain folder in shared hosting but trust level not enable in machine config file so its not possible.

    Close it ....
    LVL 18

    Author Comment

    by:Sam Panwar

    Can i get point this solution yourself.

    Accepted Solution

    PAQed with points refunded (500)

    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    758 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now