Azure工作者角色-“;TargetInvocationException”;在调试中启动时
本文关键字:调试 启动 TargetInvocationException 工作者 角色 Azure | 更新日期: 2023-09-27 18:20:28
在调试(Visual Studio 2012)中尝试运行WorkerRole项目时,我收到了"TargetInvocationException",这是因为它找不到所需的cfg文件。暂时,我已经为所有用户提供了对C:''users''johsmith''AppData''Local''dftmp的完全写入访问权限,但这并没有什么不同。
任何人在这里都很感激,因为我现在很困。
作为参考,我正在运行Windows 8、VS2012和最新的Azure SDK。
这是堆栈跟踪
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.GetDebugListener()
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.Initialize(String[] args)
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.Initialize(String[] args)
at Microsoft.WindowsAzure.Hosts.Worker.Loader.CreateConsoleRole(Parameters parameters)
at Microsoft.WindowsAzure.Hosts.Worker.Loader.Main(String[] args)
内部消息是
{"Could not find a part of the path 'C:''Users''johsmith''AppData''Local''dftmp''deployment20(21)''config''deployment20(21).EventHandler.WorkerRoleWithSBQueue1_IN_0.1.cfg'."}
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)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.FinishInitUriString()
at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings)
at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
at System.Xml.Linq.XDocument.Load(String uri)
at Microsoft.ServiceHosting.Tools.DevelopmentFabric.Runtime.DevelopmentFabricTraceListener.TryGetProviderGuid(Guid& ret)
at Microsoft.ServiceHosting.Tools.DevelopmentFabric.Runtime.DevelopmentFabricTraceListener.Init()
我已经通过卸载所有与"Azure"相关的程序并重新安装最新的SDK使其正常工作。我注意到我安装了一些旧的Azure SDK应用程序,这些应用程序可能搞砸了。