Thursday, September 23, 2004

Run and debug ASP.NET apps without IIS

In order to run and debug ASP.NET applications built with VS.NET 2003 you need to have IIS installed on your box. More over, different security configurations must be configured. Some times it raises problem especially when the developer workstation is managed and administered by 3rd party and not by developer. For example, security department may require not installing local IIS installation on workstation as security countermeasure. In such situations developers meets more challenges to debug remotely on remote server. VS.NET 2005 brings in personal web server for that purpose – it serves only local requests, it does not require IIS installed and it provides many more goodies that satisfy as security requirements as the developers. But did you know that code base of the web server is based on Cassini project that freely available? Let me show you how to run and debug ASP.NET apps built with VS.NET 2003 without IIS (avail also in hebrew) using this tinny web server.

Tuesday, September 21, 2004

Build master pages with ASP.NET 1.1

Master pages are one of the most anticipated and coolest features of upcoming ASP.NET 2.0.This feature enables you to share common page template across the web site using one file .Dino even wrote the whole book on it and other features, and there are even on line resources on it. But there is no reason to wait until VS.NET 2005 and .NET 2.0 RTM arrive to enjoy this feature. Watch this video to learn how to build master pages with ASP.NET 1.1 (avail also in hebrew). Check on these articles too:

Simplify Updates With Templates
The Power of Base Pages
Build Web Sites Using Master Pages

Saturday, September 18, 2004

Add diagnostics to your app with flexible trace

There are many techniques to debug in production - all of these require extensible knowledge of proper tools. There is also a guide on how-to at practices and patterns site. But if the application is designed and built with diagnostics and instrumentation in mind then you can ease production troubleshooting without wasting your time on learning techniques mentioned above. Instrumentation can be as complicated as using Enterprise Instrumentation Framework (EIF), but you can start with simple tracing dynamically turned on and off using web.config file. This video (avail also in hebrew)shows how. Don't forget to checkout on ready to go frameworks like MS Logging application block or Log4Net

Saturday, September 11, 2004

Add custom configuration sections to web.config.

It is good practice not to hard code things that can be placed in configuration files. XML files are very good for that purpose. ASP.NET applications use it natively by web.config. There is even section for application specific needs – appSetting section in web.config file. This section enables storing plain name\value setting, but when it gets to store more complex config structure appSettings section is not enough – better way is to store it in custom XML file, but the best way (of course, as for me) is to store custom configuration in the very same web.config file. For that purpose you can use section handlers provided with .NET Framework such as NameValueFileSectionHandler or SingleTagSectionHandler or even implement your own based on IConfigurationSectionHandler. This video (avail also in hebrew) provides demonstration on how to use the former two section handlers.

Saturday, September 04, 2004

Web Session hijacking

Web application security is a huge topic (authentication, authorization, privacy and integrity) and there are a lot stuff on msdn. We are all fed up with stuff like XSS, SQL injection and such. Here is the article about something that is worth reading.