Articles : Page 1 of 2
- Filter:
- Work
- Controllers
-
Physical Directories vs. MVC View Paths
Apr 1205This post falls into the bucket of operator error on my part, but I want to share this anyway because it describes an issue that has bitten me a few times now and writing it down might keep it a little stronger in my mind. I've been working on an MVC project the last few days, and at the end of a long day I accidentally moved one of my View folders from the MVC Root Folder to the project root. It must have been at the very end of the day before shutting down because tests and manual site nav...
-
Rebuilding CoasterBuzz, Part III: The architecture using the "Web stack of love"
Apr 1203This is the third post in a series about rebuilding one of my Web sites, which has been around for 12 years. I hope to relaunch in the next month or two. More: Part I: Evolution, and death to WCF Part II: Hot data objects I finally hit a point in the re-do of CoasterBuzz where I feel like the major pieces are in place... rewritten, ported and what not, so that I can focus now on front-end design and more interesting creative problems. I've been asked on more than one occasion (OK, just...
-
Rebuilding CoasterBuzz, Part II: Hot data objects
Mar 1219This is the second post, originally from my personal blog, in a series about rebuilding one of my Web sites, which has been around for 12 years. More: Part I: Evolution, and death to WCF After the rush to get moving on stuff, I temporarily lost interest. I went almost two weeks without touching the project, in part because the next thing on my backlog was doing up a bunch of administrative pages. So boring. Unfortunately, because most of the site's content is user-generated, you need some...
-
It’s The Little Things about ASP.NET MVC 4
Mar 1211Conway’s Law states, ...organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations. Up until recently, there was probably no better demonstration of this law than the fact that Microsoft had two ways of shipping angle brackets (and curly braces for that matter) over HTTP – ASP.NET MVC and WCF Web API. The reorganization of these two teams under Scott Guthrie (aka “The GU” which I’m contractually boun...
-
Abstracting away issues of HttpContext from your ASP.NET MVC controllers
Feb 1203I've noticed that I write software in one of three modes: For myself: Shortcuts, less testing, not well-factored. For myself but in public: Mostly POP Forums, which I try to avoid letting it suck since others will use it and see the code. For sharing: Any day job or gig where others will use or maintain your code. You don't want to unleash crapsauce on others. I have to admit that second case isn't the most clean of endeavors. While I'm generally happy with the forum app and the feedba...
-
A Really Empty ASP.NET MVC 3 Project Template
Jan 1211In the ASP.NET MVC 3 Uservoice site, one of the most voted up items is a suggestion to include an empty project template. No, a really empty project template. You see, ASP.NET MVC 3 includes an “empty” project template, but it’s not empty enough for many people. So in this post, I’ll give you a much emptier one. It’s not completely empty. If you really wanted it completely empty, just choose the ASP.NET Empty Web Application template. The Results I’ll show you the results first, and then t...
-
The evolution of asynchronous controllers in ASP.NET MVC
Jan 1209Asynchronous operations in ASP.NET MVC have always been left a bit behind. They appeared in ASP.NET MVC 2, remained untouched in v3, but now in MVC 4 (especially in combination with C# 5 and async/await) they reached the same easiness of use of the standard synchronous controller. Now (or better, in a few months with the release of ASP.NET MVC 4, .NET 4.5 and C# 5) you can write public async Task<ViewResult> Stuff() { return View(await DoStuff("Some stuff")); } In this post I’m going to...
-
XmlWriter and lower ASCII characters
Jan 1202Ran into an interesting problem today on my CodePaste.net site: The main RSS and ATOM feeds on the site were broken because one code snippet on the site contained a lower ASCII character (CHR(3)). I don't think this was done on purpose but it was enough to make the feeds fail. After quite a bit of debugging and throwing in a custom error handler into my actual feed generation code that just spit out the raw error instead of running it through the ASP.NET MVC and my own error pipeline I foun...
-
ASP.NET MVC + Selenium + IISExpress
Dec 1122The goal of this blog entry is to explain how you can create integration tests for ASP.NET MVC applications by using a combination of Selenium WebDriver and IISExpress. Integration tests are useful when you want to test an entire user story. For example, you might want to test whether a user can successfully add an item to a shopping cart. Adding an item to a shopping cart might require the execution of C# code, database code, and JavaScript code. Using an integration test, you can verify t...
-
Set the AsyncTimeout attribute for your async controllers
Dec 1107Today I decided to convert an action that was making various long calls to external webservices to be asynchronous. With the synchronous version it was long but still under the default script timeout of ASP.NET, so I was very surprised when the async version was returning a System.TimeoutException, even if it was still taking the same amount of time. I tried increasing the ScriptTimeout, but still no luck: the page was timing out. After a bit of searching online I found out that for some str...
- 1
- 2

