Is there a standard connection pooling model (or API) similar to that used by the data providers in .net that I could use to implement my own connection pool?
I ask because I have a requirement to implement my own connection pool to a proprietary TCP/IP device that we use in a web service. The current problem is that there are lot of co...
I'm trying to find a way to stop, start, restart/recycle websites and application pools from within a web interface on the same server. Ideally this would be something I could do with .Net without having to execute shell commands.
(I see other related quesitons have been asked but I don't want to do this from the command line unless th...
I tried to see the implementation of [MethodImpl(MethodImplOptions.InternalCall)]
public extern int get_Length(); fucntion, which in turn is Length property of string.
But reflector gave me the following error
"The member is not loaded or may be hidden due to your visibility settings"
However the member is loaded and the visibility set...
I have an two-dimensioanl array of sARGB colors (System.Windows.Media.Color) describing what I want to write in a WritableBitmap. The array is the same width and height than the expected bitmap. The problem is that, as long as I can see, the WritePixels Method of the WritableBitmap expects an array of integers. How do I convert my col...
I want to read the custom XML section from the app.config of a C# windows service.
How do I go about it?
The XML is below:
<Books>
<Book name="name1" title="title1"/>
<Book name="name2" title="title2"/>
</Books>
...
If I have log4net configured as below
<root>
<level value="INFO" />
<appender-ref ref="RollingFileAppender" />
</root>
<logger name="MyNamespace.MyClass">
<level value="INFO" />
<appender-ref ref="AdoNetAppender" />
</logger>
I would like the output from the named class to end up only in the sql database (via the adoNetA...
I am trying to figure out what devices are online and offline in our LAN. I've seen many programs doing a kind of graphical network overview, presenting LAN IP and MAC addresses. I would like to know if and how those (ARP?) information can be pulled from C#/.NET ?
Any sample code snippets/links would be appreciated.
...
In my application, I allow the user to select items that correspond to files on a disk. When the user presses Ctrl+C, I want the file to be sent to the clipboard, where the user can then paste the file somewhere else.
I want to implement it in a way so that the user can copy, but not paste inside my application. The user is then free to...
Just some architectural question: I use ASP.net MVC and exclusively rely on Strongly-Typed Views with View Model Classes.
As presentation is the job of the View, these Classes do not only contain some fields, but also some formatting functions, e.g.,
// The ViewModel contains a List<Comment> which the view.aspx iterates
// through, cal...
Hi,
I am developing an application that has two DLLs one is a 32bit version another is 64bit version,
Client is 32bit
Server is 64bit
My question is is there a way I can say use the 32bit dll when doing Debug/Release and use 64bit dll when I perform a publish.
I realize I can solve this problem using NAnt or MSBuild but was wonderin...
I'm implementing a RESTful web service using WCF and the WebHttpBinding. Currently I'm working on the error handling logic, implementing a custom error handler (IErrorHandler); the aim is to have it catch any uncaught exceptions thrown by operations and then return a JSON error object (including say an error code and error message - e.g....
Ok Dependency Ninja's, here's one for you...
I want to change the way Ninject builds a dependency based upon the type I'm requesting from the Kernel.
I have a DbConnectionFactory class with the following constructors:
public DbConnectionFactory()
: this(MyDatabase.ConnectionString)
{
}
public DbConnectionFacto...
When I develop using Delphi I always call DataSet.CheckBrowseMode() to allow bound controls to apply its pending changes to the DataSet. I've been looking for similar way in .NET
I've tried
// When the user press Ctrl-S
// Apply any pending edit
this.TheDataBindingSource.CurrencyManager.EndCurrentEdit();
// then save the data
this.S...
Actually the question should be why does Console.WriteLine exist just to be a wrapper for Console.Out.WriteLine
I found this little method using intellisense, then opened .NET reflector and 'decompiled' the code for the Console.WriteLine method and found this:
public static void WriteLine(string value)
{
Out.WriteLine(value);
}
S...
I've read about it on msdn and on CLR via c#.
My main question about it is the following: let's imagine we have a 2Mb unmanaged HBITMAP allocated and a 8 bytes managed bitmap pointing to it. What's the point of telling the GC about it with AddMemoryPressure if it is never going to be able to make anything about the object, as it is allo...
Ok, I've read a couple of topics about it, but here it goes. Let's imagine I have an application where basically every now and then I will click on a button, a lot of things will happen for a couple of minutes, and then it'll stay idle possible for another hour, or maybe just 1 minute. Wouldn't just after that whole ended a good situatio...
First of all, I'm using VS2005 and C# 2.0.
I'm trying to set a combobox' Text property from inside the SelectedIndexChanged event. From another thread here on StackOverflow this was proposed done the following way:
BeginInvoke(new Action(() => someCombobox.Text = "x" ));
Now, first of all this returns a compiler error for me. I belie...
How can you create a one to one relationship in Subsonic? For example, I have my table called Readings and each Reading has only one book, however Subsonic returns an IQueryable of books. I want it to return only one book. Thanks.
...
We are working on websites for our clients and we want to adopt a search solution that can be easily reused. Which one should we go after ? Should we use Google Search API or should we use MS Sql Server Full Text Indexing and the CONTAINS & FREETEXT predicates ?
...
back to the topic of why didn't .net provide a simple (i don't want to implement "ConfigurationSection" "ConfigurationElement" "ConfigurationProperty" for 2 values) way to write values back into application config files...
(and i don't want to use 'user' app config)
i want to write to the app.config values, i tired the above method of k...