我正在使用MVC4,C#,Entity框架和存储库模式,我安装了Elmah nuget包.我已将Elmah设置为在出现应用程序错误时发送电子邮件,因为我收到此消息:
System.Web.HttpException:控制器的路径"/ 3582be999d2646eca85b82b5302fc0af/arterySignalR /平"没有被发现,或者不执行一个IController.
生成:星期二,2013年11月5日14时43分21秒GMT System.Web.HttpException(0X80004005):该控制器为路径"/ 3582be999d2646eca85b82b5302fc0af/arterySignalR /平"没有被发现,或者不执行一个IController.在System.Web.Mvc.DevaultControllerFactory.GetControllerInstance(RequestContext requestContext,Type controllerType)中的System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext,String controllerName)at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext,IController&controller) ,IControllerFactory&factory)
在System.Web.Mvc.MvcHandler.BeginProcessRequest在System.Web.Mvc.MvcHandler.BeginProcessRequest在System.Web.Mvc.MvcHandler.System(HttpContext的HttpContext的,AsyncCallback的回调,对象状态)(HttpContextBase HttpContext的,AsyncCallback的回调,对象状态) System.Web.HttpApplication.ExecuteStep上的System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()中的.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext上下文,AsyncCallback cb,Object extraData)(IExecutionStep step,Boolean&completedSynchronously) )
我不知道为什么我收到这个错误,我甚至不知道什么arterySignalR /平的,我想知道,如果你知道某人的解决方案来解决这一点.
非常感谢你,
卡林纳
我有一个网页使用两个URL参数进行重定向:id和bidId我还有一个其他网页,其中包含两个其他URL参数的重定向:id和templateId.
我想创建一个路由来获得一个格式良好的URL,如:localhost/12/50,但我的路线有问题.
routes.MapRoute(
name: "SubmitBid",
url: "{controller}/{action}/{id}/{bidId}/",
defaults: new { controller = "Tender", action = "SubmitBid", id = UrlParameter.Optional, bidId = UrlParameter.Optional });
routes.MapRoute(
name: "Tender",
url: "{controller}/{action}/{id}/{templateId}",
defaults: new { controller = "Tender", action = "Create", id = UrlParameter.Optional, templateId = UrlParameter.Optional });
Run Code Online (Sandbox Code Playgroud)
当我进入SubmitBid页面时,URL工作正常,但如果我去模板页面,我有一个这样的URL:localhost/5 /?templateId = 0
我不明白为什么它不起作用,我需要你的帮助才能理解它为什么这样做.谢谢您的帮助.卡林纳
编辑:我导航的方式是这样的:
@Html.ActionLink(this.LocalResources("Use"), VIA.Enums.ActionName.UseTemplate.GetStringValue(), new { Id = "0", templateId = item.Id })
@using (Html.BeginForm("SubmitBid", "Tender", new { id = Model.Id, bidId = …Run Code Online (Sandbox Code Playgroud) 我有五个结果要从表中检索,我想写一个将返回所有所需行的存储过程.
我可以暂时写下这样的查询:
Select * from Table where Id = 1 OR Id = 2 or Id = 3
Run Code Online (Sandbox Code Playgroud)
我想我需要收到Id要拆分的s 列表,但是我该怎么写这个WHERE条款?
我有此LINQ查询,它返回非静态方法异常,因为左联接有时会为context.Betas返回一个空值。
return (from t in context.Alphas
join b in context.Betas on new { Id = t.Id } equals new { Id = b.AlphaId } into b_leftjoin
from b in b_leftjoin.DefaultIfEmpty()
where
t.UserProfileId == userProfileId
&& t.IsClosed == false
&& t.IsCancel == false
&& t.EndDate <= DateTime.Now
orderby
t.Title
select new AlphaSelection()
{
Title = t.Title,
CurrentUser = b.UserProfile == null ? null : b.UserProfile,
BetaId = b.Id == null ? 0 : b.Id,
ProjectNumber = t.ProjectNumber,
AlphaId = t.Id
}).ToList(); …Run Code Online (Sandbox Code Playgroud)