转到文章 cy f · 九月 6, 2021 I have make a demo for visted cache on centos and write this demo .it work well on my windows machine but on my linux machein it get this error`The Error System.UnauthorizedAccessException: Access to the path '/root/0000/00/Debug/dbnet5.0' is denied.---> System.IO.IOException: Permission denied--- End of inner exception stack trace ---at System.IO.Enumeration.FileSystemEnumerator1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator1.Init()at System.IO.Enumeration.FileSystemEnumerator1..ctor(String directory, Boolean isNormalized, EnumerationOptions options) at System.IO.Enumeration.FileSystemEnumerable1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)at System.IO.Directory.GetFiles(String path, String searchPattern)at Microsoft.DotNet.CommandFactory.ProjectFactory.GetMSBuildProjPath(String projectDirectory)at Microsoft.DotNet.CommandFactory.ProjectFactory.GetMSBuildProj(String projectDirectory, NuGetFramework framework, String configuration, String outputPath)at Microsoft.DotNet.CommandFactory.ProjectToolsCommandResolver.ResolveFromProjectTools(CommandResolverArguments commandResolverArguments)at Microsoft.DotNet.CommandFactory.ProjectToolsCommandResolver.Resolve(CommandResolverArguments commandResolverArguments)at Microsoft.DotNet.CommandFactory.CompositeCommandResolver.Resolve(CommandResolverArguments commandResolverArguments)at Microsoft.DotNet.CommandFactory.CommandResolver.TryResolveCommandSpec(ICommandResolverPolicy commandResolverPolicy, String commandName, IEnumerable1 args, NuGetFramework framework, String configuration, String outputPath, String applicationName) at Microsoft.DotNet.CommandFactory.CommandFactoryUsingResolver.Create(ICommandResolverPolicy commandResolverPolicy, String commandName, IEnumerable1 args, NuGetFramework framework, String configuration, String outputPath, String applicationName)at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)at Microsoft.DotNet.Cli.Program.Main(String[] args) ` try { if (conn.State != ConnectionState.Open) { conn.Open(); } CacheCommand cmd = new CacheCommand(); cmd.Connection = this.conn; if (inTransaction) cmd.Transaction = trans; DataSet ds = new DataSet(); CacheDataAdapter ad = new CacheDataAdapter(); cmd.CommandText = QueryString; //CLogger._log.Debug(QueryString); ad.SelectCommand = cmd; ad.Fill(ds); ad.Dispose(); return ds; } catch (Exception e2) { throw e2; } can anyone hava a look for this?