Take an ASP.NET Application offline with HttpModules

by Arnold Matusz 2 9 2009

Whenever you do maintenance work on a website it is advisable to show the visitors a nice message telling them politely to come back later, rather than a nasty error, or even worse: a big Yellow Screen of Death.

Since ASP.NET 2.0 came out of the labs of Microsoft, there is a way to take a web application down using the “app_offline.htm” approach. You simply create a HTM file, which you then upload to the server, and if there is any request to this web application, IIS will automatically show the contents of the app_offline.htm file. Once uploaded, most people only rename the file so that it doesn't catch up with IIS anymore, and the site is already back online. » Continue reading ...

ASP.NET Membership – Show list of users online

by Arnold Matusz 13 7 2009

The .NET Framework 2.0+ comes with a set of functionality for easily building security enforced web applications mainly with the ASP.NET Membership API and the Security web controls. The Membership class has most of the feature one would need with user management, and because it is based on a Provider Model you can write a provider for any Database you wish.

While working on an intranet application I often faced the following situation. Several people were online, logged in, when I needed to upload a new version of the web application. Because I personally know all the people who have access to this application it’s important for me to see who is online so I can announce them before taking the application down and uploading a new version. » Continue reading ...

Firebug Lite for IE, Google Chrome, Opera, Safari

by Arnold Matusz 7 4 2009

I’ve been using Firefox for quite allot of time now, and I got used to many extensions I could not live without in the day to day development life. Firebug is one of these. When somebody told me: You can’t call yourself a web developer unless you have Firebug installed, I thought this was a bit to hard. But after I faced many situations where Firebug was the definitive tool, I really think everybody should use it.

I often have to do some work on websites in other browsers (Ex: IE – eeeek I know). This is when I really feel I like and I miss Firebug. I really love to see how asynchronous requests are performing (network monitor), I really love how you can inspect and edit DOM elements, I really love to edit the DOM on the fly and see the effects instantaneously, I really love to edit the CSS on the fly and see the effects, you guessed it: instantaneously. I also love that it has got a JavaScript Console where I can test my jQuery magic on the fly. Then there is the fact that it logs JavaScript errors and I also need to mention I love that I can debug JavaScript with it. » Continue reading ...

Syntax Highlighter for Windows Live Writer 2009

by Arnold Matusz 19 2 2009

Syntax highlighting code excerpts in our blog posts are visually pleasing. I prefer a nicely highlighted piece of code because it’s allot easier to read and comprehend rather than plain and simple lines of code.

It’s not just a coincidence that our development environments do syntax highlighting as standard, and it’s not just a coincidence that high level development tools like Visual Studio do “auto formatting” of our code, by making indentations, moving begin and end markers, etc. » Continue reading ...

ModalPopupExtender to show a MessageBox

by Arnold Matusz 10 1 2009

Using Ajax in a web application makes a better user experience and if used well, it even improves performance! But it's not all advantages. With the change of a technology, of an approach we need to adjust our way of thinking and the way we apply our solutions for different task.

This might be a bit abstract, so I'll get specific about what I mean. As often met, when you click certain controls on a webpage, you expect to see an outcome, a result or a message as a response to your "request". What Ajax does is ... it replace only certain regions of your webpage. If that region isn't in the visible in the current scroll position of your page in the browser, you won't see the effect. » Continue reading ...

Refresh BlogEngine.net Posts - Clear Cache

by Arnold Matusz 12 12 2008

Lately I’ve come across an interesting situation involving BlogEngine.Net. I normally use Windows Live Writer to write my blog posts, and as I really love to post some programming related articles I use Syntax Highlighter. Sadly I don’t have Windows Live Writer set up (with all the plugins) on each workstation I work on, so whenever I need to change something in a post (typos, updates, etc.) and WLW is not at hand I get down and dirty and edit the XML files which the posts are saved in.

I hear you asking: Why you stupid idiot are you doing that when you can edit your posts in a nice WYGIWYS editor? Well, the only reason is that when I post code samples those need to be in pre tags where each and every space i very important. And after I edit/save a post in BE’s (online) the formatting is lost. » Continue reading ...

Debugging tips and tricks for Visual Studio

by Arnold Matusz 11 12 2008

It is widely known that the in the software development process testing and debugging take much more time than actually writing the lines code. Some pessimistic articles talk about a ratio of up to 80% to 20% (debugging and test vs. code writing).

This is a very strong reason to get down and dirty to get to know the tools we are working with. Because in many cases the debugging activity is very long and without any fixed forecast of it's end exploring hidden features of the Visual Studio debugger can save you allot of time. » Continue reading ...

LINQ to XML and LINQ to XML with XPath performance review

by Arnold Matusz 4 12 2008

In my post about LINQ to XML - XPath I've mentioned how Microsoft warns about the performance bottleneck when using LINQ to XML with the Extension class from the System.Linq.XPath namespace.

"There is some performance penalty for using these methods. Using LINQ to XML queries yields better performance. So it is only advisable to use such LINQ to XML with XPath queries if and only if your application won't suffer from the slight loss of performance!"
» Continue reading ...

Failed to map the path '/App_GlobalResources/'

by Arnold Matusz 19 11 2008

The scenario: I’ve been using Visual Web Developer 2008 for a web application and after I moved the application from the inbuilt ASP.NET Development Server to IIS I encountered the following exception message:

Failed to map the path '/App_GlobalResources/'


There are a few blog posts out there which may apply to your case, especially if you have Crystal Reports 8 installed. Worth mentioning is: www.thejoyofcode.com. If your situation is proior to Visual Studio 2008 you might find your solution immediately in the blog content, but if the concern is a bit newer reading through each comment might be helpfull. » Continue reading ...

LINQ Method cannot be translated into a store expression.

by Arnold Matusz 17 11 2008

LINQ to Entities does not recognize the method 'Int32 ToInt32(System.String)' method, and this method cannot be translated into a store expression.


This is a shortcomming of LINQ to Entities, and indeed the ADO.NET Entity Framework at the current release! The reason for a similar exception message is that in queries on the Entity Framework, custom methods and extensions methods cannot be translated into store expressions.

There are workarounds to still enjoy LINQ to Entities and as an example please read the following: » Continue reading ...

About Arnold Matusz

Arnold Matusz

My name is Arnold Matusz. I'm a web developer specialized in .NET technologies with a passion for photography and cars.

View Arnold Matusz's profile on LinkedIn

Who's amung us