Recently in .Net Framework Category

NUnit Ignores App.Config

December 31, 2007

Problem: You want to run NUnit tests in a class library (dll). These test rely on an application configuration file (app.config) for some settings, i.e. custom appSettings or database connection strings. The code compiles and runs fine by itself, but your unit tests always fail. Attaching the Visual Studio debugger to NUnit and stepping through the code, you see that the config seems to be ignored.

Solution: This is a perfectly reasonable thing to do, and it works fine. That is, it works if your "project" in NUnit consists of the assembly, not the Visual Studio Project. If you setup the NUnit project by clicking on Project > Add VS Project, then for some reason the configuration file will be ignored. If, however, you simply drag your assembly file into NUnit, then it should work as expected.

AJAX RESPONSE Parsing Exception

August 8, 2007

Problem: In newly AJAX-enabled .Net 2.0 page, buttons that redirect user to another page are suddenly throwing the following error:

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified bycalls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near '<BODY><ASP_SMARTNAV_'.

Running Both .Net 1.1 and 2.0 in Windows 2003 Server 64 Bit Edition

June 21, 2007

Problem: Microsoft .Net Framework 1.1 and .Net Framework 2.0 don't play well together (as ASP.Net apps) on Windows 2003 Server 64 Bit Edition.

Solution: either upgrade any ASP.Net 1.1 to 2.0 or switch to 32 bit compatibility mode. Of course switching to 32 bit mode will cause you to lose out on some performance benefits, but maybe you're okay with that (unless you're running under a very high load). Two easy steps:

About this Archive

This page is an archive of recent entries in the .Net Framework category.

C# is the next category.

Find recent content on the main index or look in the archives to find all content.



OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.12