'Access Denied' Error
'Access Denied' Error
Hi
I just downloaded Entity Developer 5.5.105 yesterday and installed the trial. After successfully importing objects from a database, I tried to generate code (C# templates) but without success. The code generation dialog says "Access to Path 'xxxxx' is denied."
I tried several options (folder permissions, UAC - Run as Admin, Compatibility, etc) but no luck.
My machine is an HP Notebook with Intel Core i5 Processor, 8GB DDR3 RAM, 500 GB SATA HDD, running Windows 8 Ultimate x64 with Service Pack (6.2 Build 9200), VS 2012 x64 Update 2, SQL Server 2012 Express x64.
I just downloaded Entity Developer 5.5.105 yesterday and installed the trial. After successfully importing objects from a database, I tried to generate code (C# templates) but without success. The code generation dialog says "Access to Path 'xxxxx' is denied."
I tried several options (folder permissions, UAC - Run as Admin, Compatibility, etc) but no luck.
My machine is an HP Notebook with Intel Core i5 Processor, 8GB DDR3 RAM, 500 GB SATA HDD, running Windows 8 Ultimate x64 with Service Pack (6.2 Build 9200), VS 2012 x64 Update 2, SQL Server 2012 Express x64.
Re: 'Access Denied' Error
1. Please post here the full call stack.
2. Try removing the ReadOnly attribute manually from the 'xxxxx' file (mentioned in the "Access to Path 'xxxxx' is denied." message).
3. Are you using TFS? Does the problem persist without TFS?
2. Try removing the ReadOnly attribute manually from the 'xxxxx' file (mentioned in the "Access to Path 'xxxxx' is denied." message).
3. Are you using TFS? Does the problem persist without TFS?
Re: 'Access Denied' Error
1. I can't see a call stack on the message box. It appears in the Code Generation progress dialog.
2. 'xxxxx' in the message is the path (e.g. C:\User\ThisUser\Desktop\Output), not a file.
3. I'm not using TSF. VS 2012 Ultimate Update 1 only.
2. 'xxxxx' in the message is the path (e.g. C:\User\ThisUser\Desktop\Output), not a file.
3. I'm not using TSF. VS 2012 Ultimate Update 1 only.
Re: 'Access Denied' Error
I'm getting the same error.
My project uses "NHibernate" (C#), "Data Annotations Metadata" and "Repository And Unit of Work" templates. If I add a "MVC Controller" or "MVC View Advanced" template and try to generate the code from the ED IDE (I'm not using the VS add-in) I get the error "Access to Path 'xxxxx' is denied." where xxxxx is my project folder. As a result, no classes are generated.
The error message appears in the Code Generation progress dialog.
Obviously, ED has access to the project folder
My project uses "NHibernate" (C#), "Data Annotations Metadata" and "Repository And Unit of Work" templates. If I add a "MVC Controller" or "MVC View Advanced" template and try to generate the code from the ED IDE (I'm not using the VS add-in) I get the error "Access to Path 'xxxxx' is denied." where xxxxx is my project folder. As a result, no classes are generated.
The error message appears in the Code Generation progress dialog.
Obviously, ED has access to the project folder
Re: 'Access Denied' Error
1. Try giving an access for Everyone to the project folder ('xxxxx' in the message).
2. Please obtain a call stack by attaching from Visual Studio (Debug | Attach to Proccess) to the process of Entity Developer. Before attaching don't forget to make these settings in your Visual Studio: a) in the (Debug | Exceptions) window select Common Language Runtime Exceptions; b) in the (Tools | Options) window, Debugging | General - clear Enable Just My Code (Managed Only).
2. Please obtain a call stack by attaching from Visual Studio (Debug | Attach to Proccess) to the process of Entity Developer. Before attaching don't forget to make these settings in your Visual Studio: a) in the (Debug | Exceptions) window select Common Language Runtime Exceptions; b) in the (Tools | Options) window, Debugging | General - clear Enable Just My Code (Managed Only).
Re: 'Access Denied' Error
The folder has full access permissions because it's the project folder and ED can save the project with no errors.
Here is the stack trace:
I hope this can help you fix the problem
Here is the stack trace:
Code: Select all
mscorlib.dll!System.IO.__Error.WinIOError(int errorCode = 258946908, string maybeFullPath = "C:\\Users\\MyUserName\\Documents\\EntityDeveloper Projects\\My Project Folder Name") + 0x169 byte
mscorlib.dll!System.IO.FileStream.Init(string path, System.IO.FileMode mode, System.IO.FileAccess access = Write, int rights, bool useRights = false, System.IO.FileShare share, int bufferSize = 4096, System.IO.FileOptions options, Microsoft.Win32.Win32Native.SECURITY_ATTRIBUTES secAttrs, string msgPath, bool bFromProxy, bool useLongPath, bool checkHost) + 0x549 byte
mscorlib.dll!System.IO.FileStream.FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options, string msgPath, bool bFromProxy, bool useLongPath, bool checkHost) + 0x43 byte
mscorlib.dll!System.IO.StreamWriter.CreateFile(string path, bool append, bool checkHost) + 0x4a byte
mscorlib.dll!System.IO.StreamWriter.StreamWriter(string path, bool append, System.Text.Encoding encoding = {System.Text.UTF8Encoding}, int bufferSize = 1024, bool checkHost) + 0x7d byte
mscorlib.dll!System.IO.File.InternalWriteAllText(string path, string contents = "\r\n\r\n", System.Text.Encoding encoding, bool checkHost) + 0x41 byte
mscorlib.dll!System.IO.File.WriteAllText(string path, string contents) + 0x2c byte
EntityDeveloper.Orm.Common.dll!EntityDeveloper.CodeGenerationService.Save(string fileName, System.Text.StringBuilder source, EntityDeveloper.TemplateEngine.OverwriteMode overwriteMode) + 0x8a byte
EntityDeveloper.Orm.Common.dll!EntityDeveloper.StandaloneCodeGenerationService.Save(System.Collections.Generic.List<EntityDeveloper.TemplateEngine.OutputFile> outputFiles = Count = 1) + 0x83 byte
EntityDeveloper.Orm.Common.dll!EntityDeveloper.CodeGenerationService.Generate(bool save, System.Collections.Generic.IEnumerable<EntityDeveloper.ModelTemplate> templates) + 0x6a byte
EntityDeveloper.Orm.Common.dll!EntityDeveloper.EditorDialogs.r.a(object A_0) + 0x73 byte
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) + 0x3e byte
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0xa7 byte
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x16 byte
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() + 0x60 byte
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x149 byte
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() + 0x5 byte
Re: 'Access Denied' Error
1. No, I don't use any custom templates.
2. I've sended you a test project with a subset of my classes and all of the templates I use.
Re: 'Access Denied' Error
Thank you for the test model. We have reproduced the error. We will post here when the problem is fixed.
Re: 'Access Denied' Error
The bug with generating "Access Denied" error when using MVC templates is fixed. We will post here when the corresponding build of Entity Developer is available for download.
Re: 'Access Denied' Error
New build of Entity Developer 5.5.130 is available for download now!
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=27378.
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=27378.
Re: 'Access Denied' Error
The error is now gone but no code is generated for "MVC View Advanced" and "MVC Controller" templates
My project uses the following templates:
My project uses the following templates:
- Data Annotations Metadata
- MVC Controller
- MVC View Advanced
- NHibernate
- Repository And Unit of Work
Re: 'Access Denied' Error
Please set the "Output > Project" and "Output > Project Folder" properties of the "MVC View Advanced" and "MVC Controller" templates to specify the location of the generated code.Joe Smith wrote:no code is generated for "MVC View Advanced" and "MVC Controller" templates
Re: 'Access Denied' Error
The output folder is set but no output is generated anywayShalex wrote:Please set the "Output > Project" and "Output > Project Folder" properties of the "MVC View Advanced" and "MVC Controller" templates to specify the location of the generated code.
Re: 'Access Denied' Error
1. Are you using predefined or custom "MVC View Advanced" and "MVC Controller" templates?
2. Please send us a small test project so that we can reproduce the issue in our environment.
2. Please send us a small test project so that we can reproduce the issue in our environment.