 |
| ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

April 27th, 2010, 11:30 PM
|
|
Authorized User
|
|
Join Date: Dec 2007
Posts: 59
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
Server Error in '/' Application.
I'm getting this error when building and running an website
Server Error in '/' Application.
Security Exception
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.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Obj ect demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +58
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) +644
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +66
System.Configuration.Internal.InternalConfigHost.S taticOpenStreamForRead(String streamName) +85
System.Configuration.Internal.InternalConfigHost.S ystem.Configuration.Internal.IInternalConfigHost.O penStreamForRead(String streamName, Boolean assertPermissions) +124
System.Configuration.Internal.InternalConfigHost.S ystem.Configuration.Internal.IInternalConfigHost.O penStreamForRead(String streamName) +10
System.Configuration.Internal.DelegatingConfigHost .OpenStreamForRead(String streamName) +13
System.Configuration.UpdateConfigHost.OpenStreamFo rRead(String streamName)
Can anyone help me please, I'm been in this for the past more hours...
I really appreciate all the help you can give me!
Thanks in advance
Phuc Hoang
|
|

April 28th, 2010, 12:31 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
Hi...
You are clearly attempting to write to the disk and you don't have permissions.. I don't know if we can do anything else, unless you know exactly where this happens, and where you are trying to write info...
__________________
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the proof.
================================================== =========
|
|

April 28th, 2010, 01:57 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
|
It appears your site is running in what's called Medium Trust.Is this a site hosted with an ISP? If so, you either need to remove the dependency on the IO actions in your site, or move to a site that allows for higher trust levels.
For more info:
http://www.google.nl/#hl=nl&source=h...b3a3d1601fd84c
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

April 28th, 2010, 04:55 AM
|
|
Authorized User
|
|
Join Date: Dec 2007
Posts: 59
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
How can i control the site , in the host , may be the host know it .I do not know my site is running Medium Trust or not, in the normal the site is run the Medium Trust, it is safety.
What should i do now in order to my site is work
I do not really know it
I really appreciate all the help you can give me!
Thanks & Best Regards
Phuc Hoang
|
|

April 28th, 2010, 05:28 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
If you're not resonsible for the hosting of your site, you should contact the party that hosts your site. They know whether it runs in Medium Trust or not, because if it does, they did that deliberately.
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

April 28th, 2010, 07:25 AM
|
|
Authorized User
|
|
Join Date: Dec 2007
Posts: 59
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
Thanks for helping me.
I will try to contact with the host site
Thanks & Best regards
Phuc Hoang
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Server Application Error |
subrata_boss |
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 |
1 |
August 12th, 2004 04:21 AM |
|
 |