I belived it was not possible to get sql connection leaks when using LINQ, but perfmon tracing of NumberOfReclaimedConnections shows a high number and on high load we sometimes get exceptions like "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connec...
Hello All.
I've been using ASP.NET MVC for a few weeks, looking screencast, reading tutorials and so on. It turns out to be very interesting technology for me and I started to experimenting with it. I wrote simple web application which simply gets data from one table and shows it.
All works fine on my dev environment, but when I tried ...
Are there other '.NET (2.0) Unit Testing Framework for Database Access Code' besides DbUnit.NET?
I've been trying DbUnit.NET and some things are not supported. Also, the project seems to be in alpha since 22nd May 2006...
We are refactoring our architecture to be able to do tests with mocking frameworks, but until that work is done I'd...
I wonder how weak references work internally, for example in .NET or in Java. My two general ideas are:
"Intrusive" - to add list of weak references to the most top class (object class). Then, when an object is destroyed, all the weak references can be iterated and set to null.
"Non-intrusive" - to maintain a hashtable of objects' poin...
I used to serialize a treeview with the BinaryFormatter (c#). The Assembly that did just that and which contains the all the serializable classes has now a strong name and is signed and also got a new version number (however, implementation didn't change).
When I try to deserialize the byte[] array, the line
(TreeViewData)binaryFormatt...
Has anyone written a nice extension method 'library' for System.Drawing.Color.
Would be nice to say :
Color.Red.AdjustBrightness(.5)
Color.Red.AdjustAlpha(.5)
Color.Red.ToHSV()
or something like that.
Alpha is easy, but others become time consuming because you have to go off and fine all the right mathematical equations for HSV a...
I remember i was loading in images by streaming it from the net straight into a bitmap. close the stream, return the bitmap and held it in an image control.
I excepted when i did = loadPicture() the first bitmap would be freed like a smart pointer would do in C++. But it didnt and i consumed a lot of ram until i called dispose. So my qu...
I'm only really familiar with AutoFac, and I asked if the feature detailed below was possible with it, and it seemed 'not exactly'. Do you know a container with which this would be possible?
[TestFixture]
public class SomeCunningTests
{
class SomeType { }
[Test]
public void TestRegistrationScope()
{
...
Hi,
I'm not quite sure how .NET and C# 3.5 handles the settings of applications spanning over multiple projects as well as multiple solutions. Maybe someone can help me clear things up.
I've got 2 solutions, both containing several projects. Some of those projects contain a Setttings.settings file under the Properties folder, containin...
In VS2008 (and earlier if I'm not mistaking) I have dropdown that lets me choose between Debug and Release mode. All well.
When I switch VS to Release, the debug attribute in my web.config files isn't set to false at all though.
Is this the way it is supposed to be? I am bound to forget to set it to the correct value on deploying.. What ...
I have some .NET assemblies on a network share that I need to give FullTrust access to all of my users. What is the best way to do this using Group Policy?
...
I'm having trouble aggregating multiple arrays into one "big array", I think this should be possible in Linq but I can't get my head around it :(
consider some method which returns an array of some dummyObjects
public class DummyObjectReceiver
{
public DummyObject[] GetDummyObjects { -snip- }
}
now somewhere I have this:
public ...
Hi,
i just wondered if there are any alternative tools out there like Pex for automatic generating boundary conditions for unit tests (should work with NUnit)?
Personally i would prefer using Pex, but the license conditions from Microsoft Research Labs do not allow commercial use under Visuals Studio 2008 Professional (what does not mak...
Theoretically you can derive from a Form but is it something you should not do? I intuitively think so but I've never heard of any rule like this.
Edit: of course I meant some conrete class that already derives from Form. For example if I've got class MyForm : Form, the question is can i derive from MyForm?
...
Currently there are a lot of variations on the MVVM design pattern but as I understand it the view is allowed to have dependencies on the viewmodel. A colleague of mine disagrees but he couldn't provide a satisfactory explanation.
E.g. my views contain a reference to their viewmodel. This is not needed for all views but it helps when co...
I want to send a HTTP GET to http://example.com/%2F. My first guess would be something like this:
using (WebClient webClient = new WebClient())
{
webClient.DownloadData("http://example.com/%2F");
}
Unfortunately, I can see that what is actually sent on the wire is:
GET // HTTP/1.1
Host: example.com
Connection: Keep-Alive
So http:...
Does the DateTime struct takes care of this?
Does any other class/struct?
UPDATE :
I now have read that leapseconds are only announced 6 months in advance, since the rotation of the earth is not that predictable...
Since there's no possibility to implement that in future dates, I can imagine they just omitted them?
...
foreword:
I have a component, lets call it IView. This component is implemented by BaseView class which holds most of it's functionality. We are using the template pattern to delegate logic to inheretting classes.
The problem:
We have a property named IView.Visible, that indicates if the component should or should not be visible. This...
I am trying to enhance my Logger class with some conditionals to control what to log and where to log. I've got two kinds of logging functions:
public static class Logger
{
[Conditional("Logging"), Conditional("VerboseLogging")]
public static void Log(string msg, string filename)
{
// log to file
}
[Conditio...
I would like some help deciding which training will be most beneficial based on others * experience*. I am the only Software guy at a small company (200-300 employee's & 4 IT) with an official title of "Applications Developer."
I am mostly self taught in c#, SQL, and various web technology's. My boss is a big supporter of training a...