Asp.Net MVC HttpContext.User.Identity.Name为空

做单点登录的时候遇到的问题.
Hashtable singleOnline = (Hashtable)filterContext.HttpContext.Application["Online"];
// 判断当前SessionID是否存在
if (singleOnline != null && singleOnline.ContainsKey(filterContext.HttpContext.User.Identity.Name))
{
if (!singleOnline[filterContext.HttpContext.User.Identity.Name].Equals(filterContext.HttpContext.Session.SessionID))
{
filterContext.Result = new ContentResult() { Content = "if(confirm('你的账号已在别处登陆,是否返回登陆页面重新登陆?')){window.location.href='/Authentication/Login';}else{window.close();}" };
}
}

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
MVC 用户认证为空
MVC,controller 中定义 ApplicationUser。rn当用web访问IndexList 时,currentUser不为空,当用app 访问时,currentUser为空,报错rn求解为什么? app用 WeX5 开发的。rnrn[code=csharp]rn protected UserManager userManager;rn protected ApplicationUser currentUser; rnrn public PhController()rn rn userManager = System.Web.HttpContext.Current.GetOwinContext().GetUserManager();rn currentUser = userManager.FindById(System.Web.HttpContext.Current.User.Identity.GetUserId());rn rnrn [HttpPost]rn [AllowAnonymous]rn public ActionResult IndexList()rn rn currentUser.......rn rnrn[/code]
【ASP.NET】 传递数据为空
传递数据为空。不能对 Null 值调用此方法或属性。
ASP.NET MVC 运用JQuery 来验证TextArea是否为空!
ASP.NET MVC 运用JQueryrn页面上有2个TextArea控件,一个按钮rn<%= Html.TextArea()%>rn<%= Html.TextArea()%>rnrn[color=#FF0000]但是不知道2个TextArea的ID[/color]rn我想用Jquery来验证点击提交按钮,2个TextArea的内容都不能为空,Jquery代码应该怎么写?rn解决马上给分,谢谢高手帮忙解答下,我是个Jquery的初学者
asp.net Request 为空判断
请问如何做?rn谢谢
MVC 数据库添加数据的时候不让为空
public virtual void Create(WorkerEntity entity)rn rn Db.WorkerEntities.Add(entity);rn Db.SaveChanges();rn rn调试时,传来的参数不为空啊,但是数据库里还没任何记录呢rnrnpublic virtual List GetEntity()rn rn var workerEntity = Db.WorkerEntities;rn return workerEntity.ToList();rn rnrn这个也是不让为空,真不知道该怎么解决阿
事件为空为空
事件为空值代表你没有+=任何方法 如果你没有绑定任何方法 你去给事件传递参数 报错 这个仇 我记下了
[ASP.NET MVC] ASP.NET MVC 1.0
☆ 资料说明:☆ ASP.NET MVC 1.0 provides a new Model-View-Controller (MVC) framework on top of the existing ASP.NET 3.5 runtime; ☆ 文件清单:☆ ASP.NET MVC 1.0.7z ☆ 相关网址:☆ ASP.NET MVC 1.0 主页网址: http://www.microsoft.com/en-us/download/details.aspx?id=5388
判断DataSet是否为空
if(ds == null)//ds为空if(ds.Tables.Count == 0)//ds中没有表if(ds.Tables.Count == 1 && ds.Tables[0].Rows.Count == 0)//ds中的表没有数据
ASP.NET执行存储过程为何返回值为空?
string sql="PR_Select_MainTree";rnSqlCommand cm=new SqlCommand(sql,db.cn); cm.CommandType=CommandType.StoredProcedure; cm.Parameters.Add("@ParentID",SqlDbType.Int);rncm.Parameters["@ParentID"].Value=0;rncm.Parameters.Add("ReturnValue",SqlDbType.Int);rncm.Parameters["ReturnValue"].Direction=ParameterDirection.ReturnValue;rnSqlDataReader dr=cm.ExecuteReader(); rnResponse.Write(cm.Parameters["ReturnValue"].Value);rnrn存储过程代码:rnrnCREATE PROCEDURE PR_Select_MainTreern @ParentID INT=0rnWITH ENCRYPTIONrnASrnSELECT * FROM MainTree WHERE ParentID=@ParentID ORDER BY Sort,TierNumberrnRETURN @@ROWCOUNTrnrnrnrn以上代码是用存储过程来查询表并返回记录总数..但Response.Write(cm.Parameters["ReturnValue"].Value)这个返回值没任何值.为空.这是为何?请指教
判断结果集是否为空?(asp.net(vb))
DataSet也好,DataReader也好,怎么在执行一个select查询后,判断结果集是否为空?比如要看看数据库中有没有用户提交的资料,小弟刚学asp.net,,请高手赐教
asp.net ajaxcontroltoolkit 为空或不是对象
ajaxcontroltoolkit在我本地没有任何错误,可是传到服务器上就报JS错误了rn 具体的错误如下:rn ajaxcontroltoolkit.PositioningMode.BottomLeft为空或不是对象,这个错误有个时候会不出现,但是大部分的时间老是报这个错,整个效果也没有了!请各位大哥大姐帮帮忙,我在网上找了很久的资料还是没有得到好的解决方案!
asp.net 前台 数据为空 报错 处理
<%=(dr1["name"].ToString())%> 这个是加再 里面的,后台数据绑定时加了try catch异常,数据为空时跳过异常直接报错,有什么办法判断没,用Convert .IsDBNull(dr1["name"].ToString())?"11":"22" 也不可以,.net的有什么方法来判断
ASP.NET 判断字符创是否为空
 GetIsNullOrEmpty当我们从数据库取值或者在从URL获取参数值的时候,不确定这个值是否存在(是否是null),使用下面这个写好的方法非常有用,不会出现异常,只会返回一个字符串 #region GetIsNullOrEmpty         public static string GetIsNullOrEmpty(object obj)         {  
ASP.NET中怎么验证是否为空
用正则验证是否为数字后,不输入数字也能通过验证,rnRequiredFieldValidator 网上看了下这个控件也能验证是否为空,不知道怎么用rn用正则怎么验证是否为空呢。谢了
ASP.NET MVC ModelState.IsValid 总是为false
今天不知道是怎么了,代码执行老是为false,不知道是哪里出了问题。键值都没错的感觉啊。rnModel:rn[code=csharp]rnnamespace MvcApplication1.Modelsrnrn public class EBlogLoginModelsrn rn /// rn /// IDrn /// rn [Key]rn public int ELoginId get; set; rnrn /// rn /// 账号rn /// rn [Required(ErrorMessage = "账号不能为空")]rn [RegularExpression(@"^[a-zA-Z]1,1[a-zA-Z0-9_]5,14$", ErrorMessage = "只包含字母、数字和下划线的6-16位字符,而且只能是以字母开头")]rn [Remote("account", "Account", ErrorMessage = "用户名已存在")]rn public string ELoginAccount get; set; rnrn /// rn /// 密码rn /// rn [Required(ErrorMessage = "密码不能为空")]rn [RegularExpression(@"^[a-zA-Z0-9]6,16$", ErrorMessage = "只包含字母、数字的6-16位字符")]rn public string ELoginPassword get; set; rnrn /// rn /// 验证密码rn /// rn [Required(ErrorMessage = "请再次输入密码")]rn [System.Web.Mvc.Compare("BlogPassword", ErrorMessage = "密码不一致")]rn public string ELoginPwd get; set; rnrn /// rn /// 邮箱rn /// rn [Required(ErrorMessage = "邮箱不能为空")]rn [RegularExpression(@"^(\w1,)@(\w1,5).(\w1,5)$", ErrorMessage = "请输入正确的Email,提高密码的高效性")]rn public string ELoginEmail get; set; rn rnrn[/code]rnrn数据上下文:rn[code=csharp]rn public class DB:DbContextrn rn public DbSet EBlogLogin get; set; rn rn[/code]rnrnController 注册判断:rn[code=csharp]rn public ActionResult Register(EBlogLoginModels EBloggerLogin)rn rn if (ModelState.IsValid)rn rn db.EBlogLogin.Add(EBloggerLogin);rn db.SaveChanges();rn FormsAuthentication.SetAuthCookie(EBloggerLogin.EloginAccount, false); //为用户创建一个票证rn Membership.CreateUser(EBloggerLogin.EloginAccount, EBloggerLogin.EloginPassword); //将用户添加到权限数据库rn Roles.AddUserToRole(EBloggerLogin.EloginAccount, "Bloger"); //将指定的用户添加到指定的角色中rn return RedirectToAction("Index", "PersonalCenter", new id = EBloggerLogin.EloginId );rn rn return RedirectToAction("Index");rn rn[/code]rnrnController 用户名是否存在:rn[code=csharp]rnpublic JsonResult account(string ELoginAccount)rn rn var Name = Membership.FindUsersByName(ELoginAccount).Count == 0; //判断账号是否存在于角色数据库中rnrn return Json(Name, JsonRequestBehavior.AllowGet);rn rn[/code]rnrnView:rn[code=csharp]rn@rn ViewBag.Title = "Index";rn Layout = "~/Views/Shared/_Layout.cshtml";rnrn@model MvcApplication1.Models.EBlogLoginModelsrn rn rn rn @using (Html.BeginForm("Register", "Account", FormMethod.Get))rn rn 账号: @Html.TextBox("EloginAccount") @Html.ValidationMessage("ELoginAccount")rn 密码: @Html.Password("EloginPassword") @Html.ValidationMessage("ELoginPassword")rn 重复密码: @Html.Password("EloginPwd") @Html.ValidationMessage("ELoginPwd")rn 邮箱: @Html.TextBox("EloginEmail") @Html.ValidationMessage("ELoginEmail")rn @Html.Hidden("ELoginId")rn rn rn rn rn[/code]rnrn求教啊,真心找不出来哪里出错了。如果把注册判断那里的 if (ModelState.IsValid) 给去掉的话会报错,说对一个或多个实例验证失败。头大了,新手 求教~~~
ASP.NET MVC 参数为NULL异常
直接上代码:rnCONTROLER:rn public ActionResult ProductHome()rn rn //ViewData["Content"] = cs.GetAll();rn ViewData["Content"] = Get();rn return View();rn rnrn private ArrayList Get()rn rn IList ls = new List();rn ls = cs.GetAll();rn //IList < string> lls = new List();rn ArrayList myarr = new ArrayList();rn if (ls != null)rn rn foreach (HelperContent hcon in ls)rn rn string rs = hcon.Parentfolder;rn string result = rs.Substring(rs.IndexOf("Content") + 7, rs.Length - rs.IndexOf("Content") - 7);rn //int i = result.IndexOf("/", 2);rn myarr.Add(result);rn //lls.Add(hcon.Parentfolder);rn rn rn return myarr;rn rn 这段代码不需要仔细看,就是把截取的string 全部装到arraylist 里去。。。rnrnVIEW:rn <% IList Arrylist = (ViewData["Content"] as IEnumerable).ToList(); %>rn到这就报错了rnargumentnull exception was unhandled by user code
ASP.NET WebForm 与 ASP.NET MVC
最近一直在弄ASP.NET MVC. 先说一下我自己的看法,不知道是否准确。rnrnASP.NET MVC是在ASP.NET WebForm的基础上发展而来的,也就是说,是对WebForm,从request开始进入到服务器,在管道事件上进行了拦截,再进行相应的处理。像IHttpModule, IHttpHandler,用的都是原来webform的。rn只是在URLRouting拦截之后,调用相应的Controller, Action,然后就返回结果,没有了控件渲染的过程。rnrn我觉得,对于整个request的处理引擎,和webform还是同一个。像HttpApplication等,都还是同一个,或者是从原来的进行了扩展。
asp.net mvc 和 asp.net 项目
在windows 2003 server 上,用IIS6.0发布asp.net 项目,当然OK,没有问题,接着再发布asp.net mvc3.0的项目,就有问题了,导致asp.net 项目不能访问,asp.net mvc3.0的项目也无法访问,请问各位大侠,是不是.net framework 2.0和4.0有冲突,还是有别的什么问题?
[ASP.NET MVC 2] ASP.NET MVC 测试驱动开发 (英文版)
☆ 资源说明:☆ [Pragmatic Bookshelf] ASP.NET MVC 测试驱动开发 (英文版) [Pragmatic Bookshelf] Test-Drive ASP.NET MVC (E-Book) ☆ 出版信息:☆ [作者信息] Jonathan McCracken [出版机构] Pragmatic Bookshelf [出版日期] 2010年06月15日 [图书页数] 296页 [图书语言] 英语 [图书格式] PDF 格式
[ASP.NET MVC 1] ASP.NET MVC 实战 (英文版)
☆ 资源说明:☆ [Manning Publications] ASP.NET MVC 实战 (英文版) [Manning Publications] ASP.Net MVC in Action (E-Book) ☆ 出版信息:☆ [作者信息] Jeffrey Palermo, Ben Scheirman, Jimmy Bogard [出版机构] Manning Publications [出版日期] 2009年10月05日 [图书页数] 392页 [图书语言] 英语 [图书格式] PDF 格式
js对象为空,延迟加载defer为空
[code=JScript][/code] [code=JScript][/code]rn rnrnrnrn
[ASP.NET MVC] ASP.NET MVC 4 实战 (英文版)
☆ 资源说明:☆ [Manning Publications] ASP.NET MVC 4 实战 (英文版) [Manning Publications] ASP.NET MVC 4 in Action (E-Book) ☆ 图书概要:☆ ASP.NET MVC 4 in Action is a hands-on guide that shows you how to apply ASP.NET MVC effectively. After a high-speed ramp up, this thoroughly revised new edition explores each key topic with a self-contained example so you can jump right to the parts you need. Based on thousands of hours of real-world experience, the authors show you valuable high-end techniques you won't find anywhere else. Written for developers, the book arms you with the next-level skills and practical guidance to create compelling web applications. ☆ 出版信息:☆ [作者信息] Jeffrey Palermo, Jimmy Bogard, Eric Hexter, Matthew Hinze, Jeremy Skinner [出版机构] Manning Publications [出版日期] 2012年06月05日 [图书页数] 440页 [图书语言] 英语 [图书格式] PDF 格式
[ASP.NET MVC] ASP.NET MVC 4 高级程序设计 (英文版)
☆ 资源说明:☆ [Apress] ASP.NET MVC 4 高级程序设计 (英文版) [Apress] Pro ASP.NET MVC 4 (E-Book) ☆ 图书概要:☆ The ASP.NET MVC 4 Framework is the latest evolution of Microsoft’s ASP.NET web platform. It provides a high-productivity programming model that promotes cleaner code architecture, test-driven development, and powerful extensibility, combined with all the benefits of ASP.NET. ASP.NET MVC 4 contains a number of significant advances over previous versions. New mobile and desktop templates (employing adaptive rendering) are included together with support for jQuery Mobile for the first time. New display modes allow your application to select views based on the browser that's making the request while Code Generation Recipes for Visual Studio help you auto-generate project-specific code for a wide variety of situtations including NuGet support. ☆ 出版信息:☆ [作者信息] Adam Freeman [出版机构] Apress [出版日期] 2013年01月16日 [图书页数] 756页 [图书语言] 英语 [图书格式] PDF 格式
[ASP.NET MVC] ASP.NET MVC 4 开发技巧 (英文版)
☆ 资源说明:☆ [Apress] ASP.NET MVC 4 开发技巧 (英文版) [Apress] ASP.NET MVC 4 Recipes (E-Book) ☆ 图书概要:☆ ASP.NET MVC 4 Recipes is a practical guide for developers creating modern web applications, cutting through the complexities of ASP.NET, jQuery, Knockout.js and HTML 5 to provide straightforward solutions to common web development problems using proven methods based on best practices. The problem-solution approach gets you in, out, and back to work quickly while deepening your understanding of the underlying platform and how to develop with it. ☆ 出版信息:☆ [作者信息] John Ciliberti [出版机构] Apress [出版日期] 2013年02月30日 [图书页数] 632页 [图书语言] 英语 [图书格式] PDF 格式
ASP.NET MVC 发展历史及ASP.NET MVC 新特性
ASP.NET MVC4.0新特性: APS.NET MVC5新特性 ASP.NET WebAPI2新特性: ASP.NET WEB Form与ASP.NET MVC5区别: MVC 与三层架构的关系:
asp.net mvc
AspNetMVC2_RC_VS2008.exe ASP.NET MVC 2 Release Candidate Release Notes This document describes the Release Candidate release of the ASP.NET MVC 2 framework. Installation Notes 2 Documentation 2 Support 2 Upgrading an ASP.NET MVC 1.0 Project to ASP.NET MVC 2 2 New Features 3 ASP.NET MVC validation scripts have been moved to their own file 4 ASP.NET MVC validation scripts can be included at the top or bottom of a page 4 ASP.NET MVC validation scripts support globalization 4 Html.ValidationSummary helper method can display model-level errors 4 T4 templates in Visual Studio generate code that is specific to the target version of the .NET Framework 4 Other Improvements 4 Bug Fixes 5 Breaking Changes 5 Changes in ASP.NET MVC 2 Release Candidate 5 Changes in ASP.NET MVC 2 Beta 6 Changes in ASP.NET MVC 2 Preview 2 6 Changes in ASP.NET MVC 2 Preview 1 7 Known Issues 7 Disclaimer 8 This document describes the Release Candidate release of ASP.NET MVC 2 for Visual Studio 2008 SP1. Installation Notes The ASP.NET MVC 2 Release Candidate for Visual Studio 2008 SP1 can be downloaded from the following page: http://go.microsoft.com/fwlink/?LinkID=157071 ASP.NET MVC 2 can be installed and can run side-by-side with ASP.NET MVC 1.0. Note   Because Visual Studio 2008 and Visual Studio 2010 Beta 2 share a component of ASP.NET MVC 2, installing the ASP.NET MVC 2 Release Candidate release on a computer where Visual Studio 2010 Beta 2 is also installed is not supported. Documentation Documentation for ASP.NET MVC 2, which includes tutorials, technology overviews, code samples, and API reference, is available on the MSDN Web site. A good starting point is the ASP.NET Model View Controller (MVC) topic (http://go.microsoft.com/fwlink/?LinkId=159758). Tutorials and other information about ASP.NET MVC are also available on the ASP.NET Web site (http://www.asp.net/mvc/). Support This is a Release Candidate (RC) release and is not officially supported. If you have questions about working with this release, post them to the ASP.NET MVC forum (http://forums.asp.net/1146.aspx), where members of the ASP.NET community are frequently able to provide informal support. Upgrading an ASP.NET MVC 1.0 Project to ASP.NET MVC 2 To upgrade an existing ASP.NET MVC 1.0 application to version 2, follow these steps: Make a backup of the existing project. Open the project file in a text editor (the file with the .csproj or .vbproj file extension) and find the ProjectTypeGuid element. As the value of that element, replace the GUID {603c0e0b-db56-11dc-be95-000d561079b0} with {F85E285D-A4E0-4152-9332-AB1D724D3325}. When you are done, the value of that element should be as follows: <ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> In the Web application root folder, edit the Web.config file. Search for System.Web.Mvc, Version=1.0.0.0 and replace all instances with System.Web.Mvc, Version=2.0.0.0. Repeat the previous step for the Web.config file located in the Views directory. Open the project using Visual Studio, and in Solution Explorer, expand the References node. Delete the reference to System.Web.Mvc (which points to the version 1.0 assembly). Add a reference to System.Web.Mvc (v2.0.0.0). Add the following bindingRedirect element to the Web.config file in the application root under the configuraton section: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/> <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/> </dependentAssembly> </assemblyBinding> </runtime> Create a new ASP.NET MVC 2 application. Copy the files from the Scripts directory of the new application into the Scripts directory of the existing application. Compile the application and run it. If any errors occur, refer to the Breaking Changes section of this document for possible solutions. New Features This section describes features that have been introduced in the ASP.NET MVC 2 Release Candidate release. ASP.NET MVC validation scripts have been moved to their own file To help reduce conflicts with other Ajax libraries, the built-in ASP.NET MVC validation scripts are now in a separate JavaScript file. ASP.NET MVC validation scripts can be included at the top or bottom of a page The server component that renders the client validation metadata now renders the metadata into a JavaScript variable. This allows the validation scripts to be included either at the top of the page or at the bottom, because the scripts will look for the variable and load the metadata when it is available. ASP.NET MVC validation scripts support globalization When the required ASP.NET Ajax globalization scripts are included in a page, the validation logic uses the culture-specific data for data types (such as dates and numbers) when it validates input text. The new Html.GlobalizationScript helper method can be used to render a reference to the globalization script for the current culture. Html.ValidationSummary helper method can display model-level errors Instead of always displaying all validation errors, the Html.ValidationSummary helper method has a new option to display only model-level errors. This enables model-level errors to be displayed in the validation summary and field-specific errors next to each field. T4 templates in Visual Studio generate code that is specific to the target version of the .NET Framework A new property is available to T4 files from the ASP.NET MVC T4 host that specifies the version of the .NET Framework that is used by the application. This allows T4 templates to generate code and markup that is specific to a version of the .NET Framework. In Visual Studio 2008, the value is always .NET 3.5. In Visual Studio 2010, the value is either .NET 3.5 or .NET 4. Other Improvements The following additional changes have been made to existing types and members for the ASP.NET MVC 2 Release Candidate release. The default HTML markup that is generated by the Add View dialog box has been changed to be consistent with the markup that is rendered by the templated helpers (Editor, EditorFor, Display, and DisplayFor). Buttons in a form can specify that they do not cause validation logic to run. The default is that every button in a form causes validation logic to run, and if validation fails, the validation logic blocks submission of the form. Enabling validation selectively for buttons lets you create forms that can post information even if a form is not complete or if the form contains data that is temporarily invalid. Client validators can specify when they run. Possible values are input (while the user is typing), blur (after the user is done typing and moves to another field), and submit (when the user submits the form). Bug Fixes The following bugs have been fixed in the ASP.NET MVC 2 Release Candidate release. The FileResult action result now supports non-US-ASCII characters in file names. Methods and properties of the TempDataDictionary class have been improved to better handle the case when items are flagged for removal from the dictionary. Support for validation in the IDataErrorInfo interface has been fixed. Breaking Changes The following changes might cause errors in existing ASP.NET MVC 1.0 applications. Changes in ASP.NET MVC 2 Release Candidate IIS script mapping script is no longer available in the installer The IIS script mapping script is a command-line script that is used to configure script maps for IIS 6 and for IIS 7 in Classic mode. The script-mapping script is not needed if you use the Visual Studio Development Server or if you use IIS 7 in Integrated mode. The scripts are available as a separate unsupported download on the ASP.NET CodePlex site. The Html.Substitute helper method in MVC Futures is no longer available Due to changes in the rendering behavior of MVC view engines, the Html.Substitute helper method does not work and has been removed. Changes in ASP.NET MVC 2 Beta The IValueProvider interface replaces all uses of IDictionary<string, ValueProviderResult> Every property or method argument that accepted IDictionary<string, ValueProviderResult> now accepts IValueProvider. This change affects only applications that include custom value providers or custom model binders. Examples of properties and methods that are affected by this change include the following: The ValueProvider property of the ControllerBase and ModelBindingContext classes. The TryUpdateModel methods of the Controller class. New CSS classes were added in the Site.css file that are used to style validation messages. Changes in ASP.NET MVC 2 Preview 2 Helpers now return an MvcHtmlString object In order to take advantage of the new HTML-encoding expression syntax in ASP.NET 4, the return type for HTML helpers is now MvcHtmlString instead of a string. Note that if you use ASP.NET MVC 2 and the new helpers with ASP.NET 3.5, you will not be able to take advantage of the HTML-encoding syntax; the new syntax is available only when you run ASP.NET MVC 2 on ASP.NET 4. JsonResult now responds only to HTTP POST requests In order to mitigate JSON hijacking attacks that have the potential for information disclosure, by default, the JsonResult class now responds only to HTTP POST requests. Ajax GET calls to action methods that return a JsonResult object should be changed to use POST instead. If necessary, you can override this behavior by setting the new JsonRequestBehavior property of JsonResult. For more information about the potential exploit, see the blog post JSON Hijacking on Phil Haack’s blog. Model and ModelType property setters on ModelBindingContext are obsolete A new settable ModelMetadata property has been added to the ModelBindingContext class. The new property encapsulates both the Model and the ModelType properties. Although the Model and ModelType properties are obsolete, for backward compatibility the property getters still work; they delegate to the ModelMetadata property to retrieve the value. Changes in ASP.NET MVC 2 Preview 1 Changes to the DefaultControllerFactory class break custom controller factories that derive from it The DefaultControllerFactory class was fixed by removing the RequestContext property. In place of this property, the request context instance is passed to the protected virtual GetControllerInstance and GetControllerType methods. This change affects custom controller factories that derive from DefaultControllerFactory. Custom controller factories are often used to provide dependency injection for ASP.NET MVC applications. To update the custom controller factories to support ASP.NET MVC 2, change the method signature or signatures to match the new signatures, and use the request context parameter instead of the property. “Area” is a now a reserved route-value key The string “area” in Route values now has special meaning in ASP.NET MVC, in the same way that “controller” and “action” do. One implication is that if HTML helpers are supplied with a route-value dictionary containing “area”, the helpers will no longer append “area” in the query string. If you are using the Areas feature, make sure to not use {area} as part of your route URL. Known Issues Adding a debugger watch that shows a value from TempData will mark it for deletion. The side effect was introduced as part of the changes to TempDataDictionary. Disclaimer This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein. The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, email address, logo, person, place or event is intended or should be inferred. © 2009 Microsoft Corporation. All rights reserved. Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.
ASP.NET MVC
ASP.NET MVC框架开发系列课程(15):ViewEngine解析
asp.net(MVC)
学习ASP.NET三层架构很好的例子,希望能给想学习的朋友带来一些启迪
Asp.net mvc
Asp.net mvc ebook in PDF
[ASP.NET MVC] ASP.NET MVC 4 移动应用开发 (英文版)
☆ 资源说明:☆ [Packt Publishing] ASP.NET MVC 4 移动应用开发 (英文版) [Packt Publishing] ASP.NET MVC 4 Mobile App Development (E-Book) ☆ 图书概要:☆ Create next-generation applications for smart phones, tablets, and mobile devices using the ASP.NET MVC development framework Overview Learn and utilize the latest Microsoft tools and technologies to develop mobile web apps with a native feel Create web applications for the traditional and mobile web Discover techniques used to overcome the pitfalls of developing Internet-ready apps ☆ 出版信息:☆ [作者信息] Andy Meadows [出版机构] Packt Publishing [出版日期] 2013年07月23日 [图书页数] 356页 [图书语言] 英语 [图书格式] PDF 格式
[ASP.NET MVC] ASP.NET MVC 4 高级编程 (英文版)
☆ 资源说明:☆ [Wrox] ASP.NET MVC 4 高级编程 (英文版) [Wrox] Professional ASP.NET MVC 4 (E-Book) ☆ 图书概要:☆ An outstanding author team presents the ultimate Wrox guide to ASP.NET MVC 4 Microsoft insiders join giants of the software development community to offer this in-depth guide to ASP.NET MVC, an essential web development technology. Experienced .NET and ASP.NET developers will find all the important information they need to build dynamic, data-driven websites with ASP.NET and the newest release of Microsoft's Model-View-Controller technology. Featuring step-by-step guidance and lots of code samples, this guide gets you started and moves all the way to advanced topics, using plenty of examples. Designed to give experienced .NET and ASP.NET programmers everything needed to work with the newest version of MVC technology Expert author team includes Microsoft ASP.N ET MVC insiders as well as leaders of the programming community Covers controllers, views, models, forms and HTML helpers, data annotation and validation, membership, authorization, security, and routing Includes essential topics such as Ajax and jQuery, NuGet, dependency injection, unit testing, extending MVC, and Razor. ☆ 出版信息:☆ [作者信息] Jon Galloway, Phil Haack, Brad Wilson, K. Scott Allen [出版机构] Wrox [出版日期] 2012年10月02日 [图书页数] 504页 [图书语言] 英语 [图书格式] PDF 格式
ASP.NET MVC
ASP.NET开发顶级教材
Asp.net Mvc
这是asp.net mvc入门教程实例,希望对你的学习有所帮助
Asp.NET MVC
ASP.NET MVC三层搭建总结,通俗易懂,快速掌握三层框架
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池