Articles : Page 6 of 121
-
Implementing an Authorization Attribute for WCF Web API
Oct 1120If you’re not familiar with WCF Web API, it’s a framework with nice HTTP abstractions used to expose simple HTTP services over the web. It’s focus is targeted at applications that provide HTTP services for various clients such as mobile devices, browsers, desktop applications. In some ways, it’s similar to ASP.NET MVC as it was developed with testability and extensibility in mind. There are some concepts that are similar to ASP.NET MVC, but with a twist. For example, where ASP.NET MVC has fi...
-
Four Years At Microsoft
Oct 1115Today, October 15 2011, marks four years of being a Microsoft employee for me. As such, it’s time for a little introspection, but in many ways, Tim Heuer already introspected for me. Much of what he writes echoes my own experience, thus leaving me with less to write about. It’s the Microsoft way, or the highway. Which is conveniently located near Microsoft Way. - Photo by Todd Bishop, CC BY 2.0 Looking back in my archives, I realized I haven’t written a whole lot about what it’s like to...
-
Preventing CSRF With Ajax
Oct 1111A long while ago I wrote about the potential dangers of Cross-site Request Forgery attacks, also known as CSRF or XSRF. These exploits are a form of confused deputy attack. Screen grab from The Police Academy movie.In that post, I covered how ASP.NET MVC includes a set of anti-forgery helpers to help mitigate such exploits. The helpers include an HTML helper meant to be called in the form that renders a hidden input, and an attribute applied to the controller action to protect. These helpers...
-
Loading jQuery Consistently in a .NET Web App
Oct 1110One thing that frequently comes up in discussions when using jQuery is how to best load the jQuery library (as well as other commonly used and updated libraries) in a Web application. Specifically the issue is the one of versioning and making sure that you can easily update and switch versions of script files with application wide settings in one place and having your script usage reflect those settings in the entire application on all pages that use the script. Although I use jQuery as an exa...
-
RFC: New Beta.ASP.net website
Oct 1110Before I worked for the ASP.NET team as I do now, I worked for MSDN. While I was over there, part of my time was spent working on the http://asp.net team. I led the charge to move the site over to Umbraco, and we did. Over the last two years, we have continually made improvements to the .NET (asp.net, silverlight.net, windowsclient.net) sites. In July, the MSDN team announced the release of a new Silverlight site, and today I'm happy to announce the Beta launch of a redesigned ASP.NET websit...
-
Modernizr.js
Oct 1106Modernizr.js is a little library that will help "modernize" old browsers. As an example, let's say you create a new ASP.NET MVC 3 application with the "Use HTML 5 semantic markup" checkbox selected. If you peek into the layout view for the app, you'll find the following markup: <nav> <ul id="menu"> <li>@Html.ActionLink("Home", "Index", "Home")</li> <li>@Html.ActionLink("About", "About", "Home")</li> </ul> </nav> The nav element represents a section with navigation links, and is a new e...
-
Getting a Web Resource Url in non WebForms Applications
Oct 1105WebResources in ASP.NET are pretty useful feature. WebResources are resources that are embedded into a .NET assembly and can be loaded from the assembly via a special resource URL. WebForms includes a method on the ClientScriptManager (Page.ClientScript) and the ScriptManager object to retrieve URLs to these resources. For example you can do: ClientScript.GetWebResourceUrl(typeof(ControlResources), ControlResources.JQUERY_SCRIPT_RESOURCE); GetWebResourceUrl requires a type (which is use...
-
Prevent Forms Authentication Login Page Redirect When You Don’t Want It
Oct 1104Go that way instead - Photo by JacobEnos CC some rights reserved In an ASP.NET web application, it’s very common to write some jQuery code that makes an HTTP request to some URL (a lightweight service) in order to retrieve some data. That URL might be handled by an ASP.NET MVC controller action, a Web API operation, or even an ASP.NET Web Page or Web Form. If it can return curly brackets, it can be respond to a JavaScript request for JSON. One pain point when hosting lightweight HTTP ser...
-
Series of webcasts about ASP.NET MVC 3 (in Italian)
Oct 1104After a long gestation period, today it was published on Channel9 a series of webcasts about ASP.NET MVC 3. This webcasts Ugo Lattanzi, a fellow ASP.NET Italian MVP, and I recorded (in Italian) covers the following topics: Introduction to the new features of ASP.NET MVC 3 Razor, the new view engine of ASP.NET MVC 3 How ASP.NET MVC 3, SQL CE 4 and EF CodeFirst work together Introduction to IoC/DI and how to use Ninject inside ASP.NET MVC 3 They are in Italian, but, especially the l...
-
Updated Release: Orchard 1.3
Oct 1103Build: 1.3.1Published: 10/3/2010 How to Install Orchard To install Orchard using Web PI, follow these instructions: http://www.orchardproject.net/docs/Installing-Orchard.ashx. Web PI will detect your hardware environment and install the application.Alternatively, to install the release manually, download the Orchard.Web.1.3.1.zip file.http://orchardproject.net/docs/Manually-installing-Orchard-zip-file.ashxThe zip contents are pre-built and ready-to-run. Simply extract the contents of the Orcha...

