Automate update of web.config with Microsoft Powershell

I have an ASP.NET web site project that I use for 5-10 web sites. Each has its own directory, setup in IIS and MySQL database, ie they work as independent web sites, only the code base is the same. For updates I have a setup with one Windows command file to copy out any file… Continue reading Automate update of web.config with Microsoft Powershell

ASP.NET 4.0: Extra space above Menu in Chrome and Safari using Menu Control

In Visual Studio 2010 when creating a new ASP.NET Web Site or ASP.NET Web Application you get a shell for ASP.NET 4.0 web site with a menu using the ASP.NET 4.0 Menu Control. However in Google Chrome and Safari browsers the menu will show with some extra space above it. It took plenty of googling… Continue reading ASP.NET 4.0: Extra space above Menu in Chrome and Safari using Menu Control

Search for text in multiple files

AstroGrep is a great free and open source tool for searching for a text string in multiple files. It is a single exe file, no installation needed. Requires .NET framework. (I’m not involved in this tool in anyway, just came across it and thought I’d share/keep for future reference)

.NET Client Side Field Validation not working

This was driving me nuts earlier today, so this post is a kind of reminder to myself not to forget this again: When using Routing in .NET 4 always remember to add exceptions for axd files! Example: [code]routes.Ignore("{resource}.axd/{*pathInfo}")[/code] In my case I could not get standard .Net Field Validation to work client side. It was… Continue reading .NET Client Side Field Validation not working

How to remove characters to avoid .NET Request Validation Error (A potentially dangerous Request.Path value was detected from the client)

In .NET Framework 4 url checking – request validation – is different from .Net 2.0. This is the error you will see when you hit this: Server Error in ‘/’ Application. A potentially dangerous Request.Path value was detected from the client Description: An unhandled exception occurred during the execution of the current web request. Please… Continue reading How to remove characters to avoid .NET Request Validation Error (A potentially dangerous Request.Path value was detected from the client)