Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8223101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:33:23+00:00 2026-06-07T14:33:23+00:00

I have a .Net 4 site that is hosted a shared server. It works

  • 0

I have a .Net 4 site that is hosted a shared server. It works fine until I access the membership provider by trying to log in, in which I get the following error:

Exception Details: System.Security.SecurityException: Request for the permission of type ‘System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.

It gives me the hint that it’s probably because of a trust level setting in web.config:

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application’s trust level in the configuration file.

Unfortunately, I can’t change the trust level because the host disabled that. But I’m not sure that I really need to have FileIOPermission access because I don’t think I need to write to the file system.

My Membership Provider is an override of the default MembershipProvider with nothing out of the ordinary that would write to a file that I’m aware of. The changes made were just adding some parameters to the Users table.

So is there a way to disable the need for FileIOPermission?

Stack Trace:

[SecurityException: Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.]
       System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
       System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, StackCrawlMark& stackMark) +31
       System.Security.CodeAccessPermission.Demand() +46
       System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share,
Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs,
String msgPath, Boolean bFromProxy, Boolean useLongPath) +597
       System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +83
       System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String
streamName) +79
       System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String
streamName, Boolean assertPermissions) +124
       System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String
streamName) +10
       System.Configuration.Internal.DelegatingConfigHost.OpenStreamForRead(String
streamName) +13
       System.Configuration.UpdateConfigHost.OpenStreamForRead(String
streamName) +38
       System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
+450
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T14:33:24+00:00Added an answer on June 7, 2026 at 2:33 pm

    Are you accessing the Web.Config at all from your code? See this answer: https://stackoverflow.com/a/2488591/69742 on how to access it without throwing a FileIOPermissionException

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .net 3.5 web site that works fine when I run it
I have a web site that is designed in asp.net and working fine in
Here the problem. I have my site hosted on a shared hosting for asp.net
I have a asp.net mvc site that being hosted via IIS 7. I believe
Background I have an ASP.NET site, hosted internally on our company's intranet server. The
We have a site hosted in IIS6 that we built using the .NET 1.1
I have an ASP.NET MVC site that contains a WCF SVC that is hosted
I have an ASP.NET MVC 3 site hosted on a normal hosting provider and
We have asp.net 4.0 web site hosted on IIS 7.5 on Windows Server 2008
I have an ASP.NET 2.0 web site hosted on Windows Server 2008 with IIS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.