473,324 Members | 2,002 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,324 software developers and data experts.

IIS website on shared folder and PolicyException

Hello,

I have a website on a NAS.
Permissions are set correctly because I can open HTML files.
When framework is involved i receive this exception:
System.Security.Policy.PolicyException: Required permissions cannot be
acquired.
It happens on file 'Microsoft.ApplicationBlocks.
Trace below.

I already tried to specify Full Trust in Webconfig.
Do you have any idea?
Thank you very much.

Andrea

Stack Trace:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission) +5343916
System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission) +115

[FileLoadException: Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +465
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +181
System.Reflection.Assembly.Load(String assemblyString) +42
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +190

[ConfigurationErrorsException: Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +3642024

System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory() +402
System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo ai)
+155
System.Web.Configuration.AssemblyInfo.get_Assembly Internal() +36

System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection compConfig) +235
System.Web.Compilation.BuildProvidersCompiler..cto r(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName) +76

System.Web.Compilation.CodeDirectoryCompiler.GetCo deDirectoryAssembly(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories, Boolean isDirectoryAllowed) +2944151
System.Web.Compilation.BuildManager.CompileCodeDir ectory(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories) +204
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +613

[HttpException (0x80004005): Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Compilation.BuildManager.ReportTopLevel CompilationException()
+79
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +2943544
System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters) +1163

[HttpException (0x80004005): Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +2739623
System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +88
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr)
+2739533
Jun 27 '08 #1
2 1909
This seems to be really usefull.
http://blogs.msdn.com/shawnfa/archiv.../20/57023.aspx
I will let you know if it works.
Jun 27 '08 #2
It works for me.
Wonderful article.
Jun 27 '08 #3

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

Similar topics

1
by: Hubert Wong | last post by:
Hi, I am writing some C# code that moves files from a source folder to a target folder on the same machine. However, if the target folder is a shared folder, using the File.MoveTo method alone...
2
by: Mr. Smith | last post by:
As the subject suggests, If I have a file path; C:\My documents\UMS\Cat1\File.txt and UMS is a shared folder shared as 'UMSPictures', is there any way I can test if each folder in the...
10
by: BLiTZWiNG | last post by:
When I try the following: System.IO.File.Copy("C:\\test_read\\test.txt", "\\\\192.168.0.5\\test_write\\test.txt", false) I get an UnauthorizedAccessException. I cannot however, seem to find...
3
by: Keith Smith | last post by:
Are there any alternatives to sharing a database without creating a shared folder? I guess I could create a client/server app, but I'm trying to avoid that. On the other hand, I am also trying to...
6
by: Jeff | last post by:
Hi - I understand how to create a directory folder, but how can I programatically create a _shared_ directory folder and set its permissions?? (I'm using VB.NET.) Thanks for your help. -...
3
by: ehaffey | last post by:
Hi, Im trying to get a VB.NET program to create a shared folder. I can make the folder but I cant figure out how to make it as a shared folder. Also I will want to set the permissions on the...
6
by: jzdeng | last post by:
Hi, All I use VS 2005 to create a web service. The web service is used to create a sheared folder. It works fine we I run it from VS 2005. But, when I move it to inetpub, it does not work...
7
by: Ibrahim. | last post by:
Hello, How can I access a Shared Folder of the Server by using the following control. 1. I need to download files from c:\resumes folde by using the following; <asp:HyperLink...
0
Pittaman
by: Pittaman | last post by:
Hello, I've searched the net (and this site in particular) but haven't found anything useful yet. I guess this could be a .NET question too, but I believe it's a windows permissions question in the...
0
by: abhimusale | last post by:
Hello, You can use this code to get list of users from shared folder of source path and also add users to destination path. It will also make destination folder shared. It is useful to copy...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.