Home / ASP.NET Weblogs

February 2010 - Posts

Posted to:

Session Time Out Tricks

I recently received an email from a developer who needed to implement a behavior around a user’s session timeout behavior. As you probably know, we can configure our application to “expire” a user’s session at any interval that we wish. Example: < system.web > < sessionState timeout ="10" /> ........ </ system.web > .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } Read...
Posted to:
by: 
02-27-2010, 2:47 AM

No Intellisense with VS 2010 RC (and how to fix it)

[In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu ] Patrick recently posted about something he found odd when installing the VS 2010 RC – which was that code intellisense for C# wasn’t working.  When he pulled up Tools->Options and checked under the Text Editor->C# settings he noticed that the reason Intellisense wasn’t working was because his profile had them turned off – and he couldn’t understand why it was configured to be off by default: Why does this happen? The above situation occurs because: 1) When you run VS 2010 the first time on a machine that has had VS 2008 installed on it, it asks you if you want to import your existing VS 2008 profile settings...
Posted to:

Setting up a continuous integration server for a CodePlex project using TeamCity and Mercurial

Continuous integration enables developers to have an automated way of validating the quality of their check-ins. A CI server will monitor your version control repository and on every check-in will build the project and at the very least run unit tests. If anything goes wrong (compilation error, failing test, etc.), the server will send e-mail to the team so the developer responsible for the faulty check-in can investigate and fix the problem. It’s an automated finger pointer if you will. It’s one of those things that seem obviously necessary for any project above a certain size but that is too often neglected. After all, you always run unit tests before you check-in, right? Right? One of the nice things about CI servers is that they are relatively...
Posted to:

Profilers and ASP.NET

There are a lot of different ways to troubleshoot ASP.NET issues.  I have gone over most of the things you can do with a dump that has been captured from the process.  But there is another way to get useful information out of a process and that is by using a profiler. There are a number of profilers that are available for .NET applications.  Some of the more popular ones include (most come from Brads post and there is a good list here as well): Traditional Performance and/or Memory Profilers AutomatedQA AQTime: http://www.automatedqa.com/products/aqtime/index.asp (evaluation version available) Borland Optimizeit: http://www.borland.com/opt_profiler/ (evaluation version available) Compuware DevPartner: http://www.compuware.com...
Filed under: , ,
Posted to:

View/ViewModel Association - Convention and Configuration-based Approaches

Some time back, I blogged about different options to hook up a view to its view model when following the ViewModel (aka MVVM) pattern. There are multiple approaches in use out there. I raised the possibility of a convention-based approach in addition to existing ones like the ViewModelLocator pattern. Motivation: I find the simplest way to explain ViewModel is to present it as a better code-behind , especially to the mainstream developer who is intimately familiar with the latter (at least in the .net world). With the code-behind approach the UI, its state and operations are all mixed up. The ViewModel pattern is of course designed to help separate application logic from the view, but now results in two discrete halves that need to be reconnected...
Filed under:
Posted to:
by: 
02-25-2010, 10:53 AM

Apigee - Analytics and Protection for APIs and Mashups

I thought this was a cool idea ad thought I’d share it. Apigee is a website that provides analytics, protection and control for APIs.  Apigee enables API providers to understand usage, protect their app, and enforce API terms of use.  Developers using APIs can use Apigee to get visibility into the actual service levels of the APIs they consume. http://apigee.com/ Read More...
Filed under:
Posted to:

Put Missing Kids on your 404 Page - Entirely Client-Side Solution with YQL, jQuery, and MSAjax

I noticed a post over at a blog called " The other side of the moon " where the author suggests that we put pictures and details of missing children on on 404 pages. It's a simple and brilliant idea. Millions of 404s are delivered every day. We are reporting on missing pages, but not on missing children. He includes a simple PHP solution. I set out to create an ASP.NET solution, but then realized that a server-side solution wasn't really necessary. Could I do it all on the client side? This way anyone could add this feature to their site, regardless of their server-side choice. This could make the solution much more palatable to folks who may not be into .NET. Here's what I came up with. You can see it in action if you...
Posted to:

Postback Text Processing with the AJAX Modal Dialog

I’ve started blogging simple tips when I get a question from a developer that’s a bit tricky. This is one of those. Simple to do, but not always simple to find the answer. In this case the developer wanted to use an AJAX Editor Control inside a ModalPopup control. This isn’t a problem but, the user needed to clicking the OK button to cause a post-back so that he could execute some server –side logic. The ”Ok” Button is an ASP.NET control but adding a Click Event Handler for the button didn’t solve the problem because it didn’t get executed when the use Clicked on the “Ok” button. Normally the ModalPopupExtender would be used like this. < ajaxToolkit:ModalPopupExtender ID ="ModalPopupExtender1" runat ="server" TargetControlID...
Posted to:

Manipulating Action Method Parameters

During the MVP summit, an attendee asked me for some help with a common scenario common among those building content management systems. He wanted his site to use human friendly URLs. http://example.com/pages/ a-page-about-nothing / instead of http://example.com/pages/ 123 / Notice how the first URL is descriptive whereas the second is not. The first URL contains a URL “slug” while the second one contains the ID for the content, typically associated with the ID in the database. This is easy enough to set up with routing, but there’s a slight twist. He still wanted the action method which would respond to the first URL to have the integer integer ID as the parameter, not the slug. Let’s look at one possible approach to solving this. Here’s an...
Posted to:

Hanselminutes Podcast 202 - A different way to do ASP.NET WebForms with WebFormsMVP

My two-hundred-and-second podcast is up . I sit down (in my home, actually) with Tatham Oddie to talk about the WebFormsMVP open source project created by he and Damian Edwards.  What does it add?  Can we have the best of both worlds, convenience, controls and testability? Subscribe: Download: MP3 Full Show Links from the Show WebFormsMVP Project Tatham Oddie's Blog Do also remember the complete archives are always up and they have PDF Transcripts , a little known feature that show up a few weeks after each show. I want to add a big thanks to Telerik. Without their support, there wouldn't be a Hanselminutes. I hope they, and you, know that. Someone's gotta pay the bandwidth. Thanks also to Carl Franklin for all his support...

1 2 3 4 5 Next >

Archives