2016-11-15 3 views
0

cが拒否され、私はこのエラーにつまずく:私はこのXMLにすべての結果を書き込むためのAC#を書かれているSystem.UnauthorizedAccessException:ファイルへのアクセスが、私はセレングリッド上で私のセレンスクリプトを実行しています。#

Result Message: 
Test method AutFramework1.Tests.Smoke.RunTest threw exception: 
System.UnauthorizedAccessException: Access to the path 'C:\Users\documents\visual studio 2013\Projects\AutFramework1\AutFramework\Config\SEL_ADAccountReactivate.xml' is denied. 
Result StackTrace: 
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at 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, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) 
    at System.Xml.XmlWriterSettings.CreateWriter(String outputFileName) 
    at System.Xml.XmlWriter.Create(String outputFileName, XmlWriterSettings settings) 
    at System.Xml.Linq.XDocument.Save(String fileName, SaveOptions options) 
    at System.Xml.Linq.XDocument.Save(String fileName) 
    at AutFramework1.Helpers.ReportSample.InsertValues(String ID, String Screenshot, String Step, String Result, String Comment) in c:\Users\Documents\Visual Studio 2013\Projects\AutFramework1\AutFramework\Helpers\ReportSample.cs:line 63 

ファイルとそれは私にそれをさせません。私はすでにファイルのセキュリティ設定を調整しています。私はこれで何をすべきか分からないので、コードで何かする必要がありますか?ありがとう

+0

右クリックして、問題を解決しました。 – Steve

+0

C.以外のドライブからファイルを読み取ろうとしました。 –

+0

管理者のアクセス権がない限り、アプリケーションはドキュメントフォルダを使用できません。既定では、ウィンドウのユーザーアクセス制御に制限が組み込まれています。 – Greg

答えて

0

procエクスプローラをチェックして、私のファイルに保持されているものがあります。問題は解決されました。入力のためのおかげでみんな

関連する問題