- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我将程序集 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/
根据 Google 在 Video sitemaps 中的定义,有一些xml标签应该添加到视频的站点地图中,应该是这样的: http://www.example.com/videos/some_
目前,我有一个 Controller与 Index()需要授权的 Action 方法: public partial class CustomerController : BaseDocumentSt
如果当前 session IP 在以色列,我想从菜单中隐藏某个页面。这是我尝试过的方法,但实际上菜单项没有出现在任何地方。 我测试了 GeoIP 提供商,它似乎工作正常,我做错了什么? 下面是我如何创
我想用 CSS 类标记当前节点及其父节点。我四处搜索并找到了这些链接: http://mvcsitemap.codeplex.com/discussions/257786 http://mvcsite
我正在尝试为我的站点开发站点地图,以便在需要时维护 URL 参数。我正在使用 MvcSiteMapProvider 并尝试使用动态节点来保存各种节点的路由数据。但是,我遇到的问题是动态节点的子节点。当
我有一个可以采用可选 id 参数的操作方法。 public ActionResult Details(int id = 0) {...} 以及一个应该链接到具有空 ID 的操作方法的站点节点。 不
现在我有 Mvc.sitemap xml 文件,其中包含以下数据: 我想将所有这些节点存储在数据库中,并且只有一个非根节点,如下所示:
Mvc 5、.Net 4.5 我按如下方式实现 MvcSiteMapNodeAttribute: [MvcSiteMapNode(Title="Running Events", ParentKey="
MvcSiteMapProvider 似乎会自动缓存。是否有禁用缓存的机制?我们编写了自定义缓存例程,我想通过这些例程运行它,而不是依赖任何内置的缓存机制。 最佳答案 尝试在呈现菜单或站点地图之前调用
我正在使用 wcf 服务数据层开发类似网上商店的 asp.net mvc 4 网站。我的应用程序是用主类别、子类别和产品构建的。每个产品只能属于一个子类别,我的网址是这样的: /maincategor
我希望能够显示当前节点的父节点的标题。 站点地图: 因此,在“第 1 页”上,我可以使用以下方法显示标题(某页): Html.MvcSiteMap().Si
尝试运行/调试应用程序时出现以下错误 CS0246:找不到类型或 namespace 名称“MvcSiteMapProvider”(您是否缺少using指令或程序集引用?) 在我的Web.Config
我在安装 mvc 的 sitemapprovider 时遇到此错误: Install-Package : Updating 'Microsoft.AspNet.Razor 3.2.2' to 'Mic
在我的 MVC3 项目中,我安装了 Maartenba 的 MvcSiteMapProvider v.3.2.1,并且我创建了一个非常简单的静态两级菜单。下面是概念图结构。 - Home - Memb
我尝试以几乎任何方式本地化 MvcSiteMapProvider,但我不明白。正如我发现的,当您使用 app_globalresources 文件夹时它可以工作,但如果您使用 MVC,则这不是一个选项
我已经安装了 MvcSiteMapProvider v4,现在我想动态加载站点地图。我的需求很简单——根据当前登录的用户角色,例如在每个页面请求上加载 XML 站点地图。 AdminSiteMap.x
我正在尝试构建这样的菜单: 作为引用,我正在使用这个库 https://github.com/behigh/bootstrap_dropdowns_enhancement @Html.MvcSiteM
我现在很喜欢通过 Nuget 使用制作精良的 MVCSiteMapProvider,但我遇到了障碍。 我正在尝试修改 @Html.MvcSiteMap().Menu() 助手的模板。我正在修改的文件是
您好,我已经在我的网络配置中添加了提供商,如下所示: 我在一个单独的类文件
tl;博士: 来自 MvcSiteMapProvider 的菜单有时无法在应用程序重新联机后呈现自身,即使代码运行并且在页面刷新后呈现菜单也是如此。 我在 ASP.NET MVC 3 项目中使用 Mv
我是一名优秀的程序员,十分优秀!