gpt4 book ai didi

asp.net-mvc - Mvc 4 FileNotFoundException MvcSiteMapProvider 问题

转载 作者:行者123 更新时间:2023-12-04 00:43:12 25 4
gpt4 key购买 nike

我将程序集 MvcSiteMapProvider 添加到我的项目中,但决定不使用它。我删除了程序集,但我不断收到以下错误。我找不到对该文件的任何引用,我不确定这是如何失败的。

Exception Details: System.IO.FileNotFoundException: Could not find file 'C:\Users\jmynsb000\Documents\Visual Studio 2013\Projects\t2dashv6\t2dashv6\Mvc.sitemap'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[FileNotFoundException: Could not find file 'C:\Users\jmynsb000\Documents\Visual Studio 2013\Projects\t2dashv6\t2dashv6\Mvc.sitemap'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +10527478
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) +1305
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) +63
System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) +77
System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) +69
System.Xml.XmlTextReaderImpl.FinishInitUriString() +75
System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver) +186
System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext) +70
System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext) +26
System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings) +6
MvcSiteMapProvider.Xml.SiteMapXmlValidator.ValidateXml(String xmlPath) +273
MvcSiteMapProvider.DI.Composer.Compose() +224

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +192
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +108
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
WebActivatorEx.BaseActivationMethodAttribute.InvokeMethod() +217
WebActivatorEx.ActivationManager.RunActivationMethods(Boolean designerMode) +455
WebActivatorEx.ActivationManager.RunPostStartMethods() +28
WebActivatorEx.StartMethodCallingModule.Init(HttpApplication context) +101
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9950728
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

最佳答案

我怀疑当您运行项目时,MvcSiteMapProvider 程序集仍然存在于您的 bin 文件夹中。 The MvcSiteMapProvider dynamically registers itself to run some start up code during the PostApplicationStart event .

如果您是从 Visual Studio 运行它,请转到“构建”菜单,然后选择“重建解决方案”。如果您在服务器上运行它,请检查部署的 bin 文件夹中是否有 MvcSiteMapProvider.dll 程序集。如果存在,请将其删除。

关于asp.net-mvc - Mvc 4 FileNotFoundException MvcSiteMapProvider 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26330502/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com