.net

Override resource string in compiled assembly

Is there any way for me to override the values that are stored in a third party assembly in an embedded resource file? Using Red Gate's .Net reflector, I can see there are 6 resource items, but I only want to change to of them when using it in my web application. ...

Trying to configure web.config to allow dashes as parameters without success (.Net4 + MVC2)

Ok. This one must be silly: We have just migrated a project to Visual Studio 2010 (Release Candidate) + .Net 4 + MVC2. One of the reasons was that the customer has record IDs that include the "/" character, and using encoded slashes as route parameters was not allowed until .Net 4. (See http://stackoverflow.com/questions/591694/url-enco...

Reading the content of a PDA directory while sync with ActiveSync

Hi, I have a project in which I would need to copy files found within a PDA (in my case, it's a MC3000 if that makes any difference). I have ActiveSync installed and it create the syncronisation folder for me just fine. However, I would like to be able to read the content of the PDA not only in its MyDocument Folder so I can't use this ...

Validate Digital Signature using Signature Timestamp

The X509Certificate2Collection.Import method allows to retrieve all certificates from an executable file or from an MSI package. That's fine. Now I want to validate the certificates. The X509Certificate.Verify method validates a certificate against the current time (the Reflector confirms: it uses DateTime.Now). So my first question i...

Reference an exe as a .NET assembly and deploy with ClickOnce

I am trying to reference LINQPad.exe, a .NET executable, so that my code can make use of its wonderful .Dump() extension method. Adding a reference to the exe allows me to use the following code on my dev machine, but it breaks ClickOnce ("Reference in the manifest does not match the identity of the downloaded assembly LINQPad.exe."). p...

Why would thousands of failed SQL Server login attempts cause an application to break?

Last night we had 45,000 failed attempts to access an SQK Server database on a high profile site, which seems to correlate with portions of the application ceasing to work last night. However, when we pushed the main 3 DLLs live this morning, the issue was immediately corrected. Why would failed attempts to login to the database cause ...

P/Invoke on x64 null reference exceptions

P/Invoke on x64 null reference exceptions I get null reference exceptions when I try to compile for x64 in .NET code that makes use of platform invocation services to call unmanaged code in dlls. Am I missing something obvious here? e.g. call to Private Declare Function waveOutOpen Lib "winmm.dll" (ByRef lphWaveOut As Int32, ByVal uDe...

.NET Remoting client config creates local object, not remote

Hi there, I am using client side configuration files for a .NET remoting client, and the RemotingConfiguration.Configure() call successfully completes. I have referenced the library where the remote objects are defined in my client. The problem I am having is that after configuration, when I try to create a remote object using new(...

Is there any reason to switch to Visual Studio 2010 for Windows Forms development?

I can't find any new features or improvements for Windows Forms in Visual Studio 2010. Am I missing something? I guess there are new features to C# and other parts of .NET in general. Any reason specifically to the GUI development portion? ...

Maintaining two versions of the same framework and application

We have a framework created in .NET which controls hardware devices. The entire framework uses MEF so it relies heavily on interfaces. For reasons beyond our control we had to change the hardware and that required some breaking changes to some of the interfaces. The project for the old hardware was put on hold for a while and we starte...

ClickOnce deployment to production

Our smart-client application is deployed using the ClickOnce. Our production site is hosted on 2 separate web servers, and they are pointed from the same domain-name (for load-balancing). Here is what we do when we push updates to the production. In VS, publish the smart-client application into a localhost directory Copy/Paste the dire...

Are there any alternatives to the SSIS fuzzy lookup for plain .Net code?

I'm converting several large ETL processes from SSIS over to Rhino-Etl. I got fed up with the "grahical programming" nature of SSIS. Hunting through hundreds of dialog boxes to figure out what the ETL process is doing gets old in a hurry. Several of the SSIS packages use the Fuzzy Match component for joining user accounts based on fir...

How do I view .NET interned strings

In CLR 2.0, is there any way to view all of the strings that have been interned? I've looked into the CLR Profiler APIs and can't see any API calls to monitor when a string gets interned. Also, what is the scope of interned strings? Do interned strings get collected when the App Domain gets unloaded, or do they span App Domains? ...

how to develop a multi player chess ?

Hi , I wana develop a multi-player chess using c# but I don't have any idea of how to implement the restriction rules of chess with c# to be honest i've never done even a little bit of game programming in my life so that I don't have any idea of how to work in this area. is there any simple sample of chess program source code out there...

Is there any way to do X.509 Certificate creation in .net?

I take some days and still can not find any way to do X.509 Certificate creation in .net. Is there anyone who can give me an answer or some hints? Thanks. ...

Should C# event handlers be exception safe?

Assume that one event has multiple handlers. If any of event handlers throw exception then remaining handlers are not executed. Does this mean that event handlers should never throw? ...

Issue with number guessing game c#

I keep getting a stackOverflow error (no pun intended):" An unhandled exception of type 'System.StackOverflowException' occurred in NumberGuessingGame.exe " I'm guessing it would help if you saw my code and alswo where its ocurring: Source - testClass: namespace NumberGuessingGame_08029490 { public class testClass : Form1 { public...

Why is WebBrowser_DocumentCompleted() firing twice?

Well, I'm using a simple webbrowser control to browse to a page, so I need to change the Text of the form while doing so. I'm using - private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { this.Text += " - " + webBrowser1.Document.Domain; } but using a breakpoint, i noticed that, this ...

How do I find the window handle for a running process?

I am trying to get the handle of a window from a process. Now, that process shows a splash screen, so, if i try ProcessInstance.MainWindowHandle all I get is the handle of that processes main window, that is the splash screen. How can I find the window I want? Maybe if I could get a list of windows that process has I could pick the one ...

BDD And Unit Testing

I have been doing TDD and was using it more as unit testing than to drive my design. Recently I have read a lot about BDD; now that I have a better idea about them both, I was trying to figure out how to use BDD and unit testing concurrently. For example I would drive my design using BDD Dan North style ,and lets say am working on app...