I'm trying to replace a old homebrewed single threaded web server with a ASP.NET solution that will run on IIS. The old server does alot of weird stuff like access files outside it's path, do com calls, write to c: and much more. It does all of this from library writen in C++.
In the new application we want to use the same library so we...
What is the fastest way to get a list object with a count of 100,000 records into SQL using LINQ to SQL?
...
My project is an application in which we load various assemblies and perform operations on them.
We are stuck at a situation where we need to add a reference to the assembly we load (which will be selected by user). So I need to add a reference to the DLL at run time.
I tried this site but here they support only microsoft DLLs like Sys...
Hello there,
I'm new to WPF and its Databinding, but I stumbled upon a strange behaviour I could not resolve for myself.
In a Dialog I've got a Listbox with Users and a TextBox for a username. Both are bound to a UserLogonLogic-which publishes among others a CurrentUser property.
I want the TextBox to update its text when I click on a...
On most newer computers you can shutdown the hard way by pressing the power button for a couple of seconds. But I want to prevent this completely.
You're able to prevent some soft events like the sleep, suspend, hibernate and "Press power button" events in Windows control panel; you can also use some Win32 and WDI programming to catch a...
I have a simple Form such as the following:
using System;
using System.Drawing;
using System.Windows.Forms;
namespace PaintTest
{
class PaintTest : Form
{
int _counter = 0;
[STAThread]
static void Main()
{
Application.Run(new PaintTest());
}
protected override void OnPaint(PaintEvent...
I need to validate characters entered by the user in a MaskedTextBox. Which characters are valid depends on those already entered. I've tried using IsInputChar and OnKeyPress, but whether I return false in IsInputChar or set e.Handled to true in OnKeyPress, the box's text is still set to the invalid value.
How do I prevent a keypress ...
I need to reference a specific version of a signed assembly. Because it is present in GAC, compiler picks up the 'vendor' version instead of the one I provide (the GAC version number is higher, even though it's an older API). Is there some kind of extension to the basic /reference=Library.dll compiler option that allows specyfing a stron...
OK so im trying to create a settings class to store certain strings that i need to access throughout the system. I have created a globalSettings.cs with the code below:
public class GlobalSettings
{
private readonly Hashtable myHT;
public GlobalSettings()
{
//Hashtable used to store global strings
myHT = new...
Need to convert Hex to a Decimal in VB.Net. Found several examples in C#, but when I tried to convert to VB.Net I was not successful. Here is an example of a hexidecimal number that I am trying to convert "A14152464C203230304232323020572F544947455234352E".
Thanks,
Dave
...
Hi,
I need to parse a bunch of delimited flat files and import them into a database. I could build my own simple metadata-driven parser and importer but figure there must be something like this out there already?
Thanks,
Dave.
...
I have got an enum which is defined like this:
public enum eRat { A = 0, B=3, C=5, D=8 };
So given value eRat.B, I want to get the next one which is eRat.C
The solution I see is (without range checking)
Array a = Enum.GetValues(typeof(eRat));
int i=0 ;
for (i = 0; i < a.GetLength(); i++)
{
if (a.GetValue(i) == eRat.B)
...
I've got a bunch of DLL projects that I'm pulling into my application, each contains their own Settings.settings/app.config. When I compile the app and run for debugging, everything works just fine, but come deployment time I can't get my DLLs to read their own settings files.
I've been doing some reading and it has become apparent tha...
There are lots of mocking frameworks out there for .Net some of them have been superseded by others that are better in everyway. However that still leaves many mocking frameworks that have different styles of usage.
The time it takes to learn all of them well enough to decide witch to use is unreasonable. I don’t believe that we have ...
Microsoft has naming guidelines on their website (here). Also I have the Framework Design Guidelines book.
What I could not find was a guideline about naming controls.
For example a button, when dropped to a form, it gets the typename + number, camel-cased as default name, such as "button1".
This is what I do: I delete the number and...
I created a web service in .net 3.5, and now I would like to log all incoming calls to the service. The log should contain the name of the called method and the parameters passed to it.
I have been looking into creating a hhtpmodule for this, but I am not sure how to extract the method name and parameter values from HttpApplication.
An...
I remove an item from the session using Session.Remove(), then redirect to another page. If I click back, then reload, the item is suddenly back in the session. Shouldn't Session.Remove() take it out of the session for good?
...
I've been programming for a long time now, but I'm not the world's most experienced.Net developer. I recently picked up a project that is using Forms authentication for their website. I first looked at forms authentication in .Net 1.1 and at that time it had some limitations that made me decide not to use it as my primary form of authe...
For my production sites I usually change the "debug" flag in the Web.Config to "false". But I always publish my sites with the Configuration Manager set to "Debug". Should I change this setting too?
...
Hi, as I am doing a small chat application in vb.net (windows form), I'm having problem for the design of my chatbox. I would like text messages to be selectable so user can copy(ctrl+v) it but not usernames which displays who sent the message. What form controls should I use in order to accomplish this and what properties to change from...