Process.Start() edmgen
单击 ASP.NET 应用程序中的按钮后 process.start() 将运行带参数的 edmgen 工具。我发现错误:
var cs =ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString;
string myArgs="/mode:fullgeneration /c:\""+cs+"\" /project:nwd /entitycontainer:SchoolEntities /namespace:SchoolModel /language:CSharp ";
string filename= GetFrameworkDirectory() + "\\EdmGen.exe";
ProcessStartInfo startInfo = new ProcessStartInfo(filename,myArgs);
startInfo.UseShellExecute = false;
//startInfo.RedirectStandardError = true;
Process myGenProcess = Process.Start(startInfo);
//genInfo.Text = myGenProcess.StandardError.ReadToEnd();
如何解决这个问题?
after clicking on button in asp.net application process.start() runs edmgen tool with arguments. And I catch error :
var cs =ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString;
string myArgs="/mode:fullgeneration /c:\""+cs+"\" /project:nwd /entitycontainer:SchoolEntities /namespace:SchoolModel /language:CSharp ";
string filename= GetFrameworkDirectory() + "\\EdmGen.exe";
ProcessStartInfo startInfo = new ProcessStartInfo(filename,myArgs);
startInfo.UseShellExecute = false;
//startInfo.RedirectStandardError = true;
Process myGenProcess = Process.Start(startInfo);
//genInfo.Text = myGenProcess.StandardError.ReadToEnd();
How to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要将完整路径传递到您对输出具有写访问权限的文件夹。
You need to pass the full path to a folder that you have write access to for the output.
该错误表明您无权访问“C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\nwd.ssdl”。
检查您的进程是否对文件和树上的所有文件夹具有必要的权限。
Well the error indicates that you don't have access to "C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\nwd.ssdl".
Check that your process has the necessary permissions on the file and all the folders up the tree.