Is it possible to catch an access violation exception in .NET??
Is there anything I can do to catch an AccessViolationException? It is being thrown by a unmanaged DLL that I don't control. ...
Is there anything I can do to catch an AccessViolationException? It is being thrown by a unmanaged DLL that I don't control. ...
I few months back I attended a Microsoft EnergizeIT seminar where they were showing some of the capabilities of their latest development products. One of the things they had shown that really caught my eye was a built in mock data generator tool to generate mass amounts of fake data from a few seed lists. I don't remember the name of the...
I have a interface as follows public interface IX { void MethodA(); void MethodB(); } I have two method contracts in the interface MethodA and MethodB. I will define set of classes that will implement the above interface. Out of these two methods MethodA is common for all the types that will implement the inte...
I have a Windows service that is retrieving a few selected files from a directory that contains millions of other files. The service runs out of memory every hour or so. This never happened when there were a few thousand, so it feels like some resource is not being properly disposed of. But to my eyes the stream is being disposed of p...
I am working on a .NET MVC application and am trying to write a route in global.asax.cs. The goal is, I want any URL that contains an uppercase character to run through said route. The idea is, the router will lowercase the URL and redirect it. My approach is to use a regular expression to handle this. Here's what I have: routes.Map...
Given a url or server name, how can i use powershell or a .net library to download the (expired) certificate the web server is using and then save it to file or import it into my certificate store? Thanks! I have made progress, i got this far on this problem: static class Program { static void Main() { ...
Hi, I am using a WinForms WebBrowser Control and the webpage that I am being served has a data URI scheme and it doesn't seem to work. (for e.g. "data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAoAAA...) It works in IE8 browser though and I know for a fact that it is not supported in IE6 or IE7. My question is, why is the Winforms WebBr...
This is a far stretch but i am going to try an explain the issue as best as possible. I am using the CodeDom Compiler in .Net 3.5 to compile 3 cs files...2 of which were generated from Edmgen.exe and 1 is a dynamicly generated file. The compile code looks like this CompilerResults results = compiler.CompileAssemblyFromFileBatch(paramete...
Hello everyone, I am attempting at embedding multi-threading for the first time ever and running into some unexpected issues, hope you can help. Here's the code fragment that gives me troubles: ArrayList recordsCollection = new ArrayList(); ArrayList batchCollection = null; int idx = 0; while(true) { // Some code to generate and as...
Is there a built in node-like collection that will allow me to store information within information without building long hard to read generic declarations? C# or VB.Net solutions would be appreciated. For example: dim base as new Dictionary(of String, Dictionary(of String, List(of String))) dim mid as new Dictionary(of String, List(o...
I've been looking into using the System.Security.SecureString class to hold credit card numbers in memory while they are being processed. Has anyone used the SecureString class for holding credit card numbers, or do most just use the normal System.String class? ...
public static string SerializeObject<T>(T obj) { try { string xmlString = null; MemoryStream memoryStream = new MemoryStream(); XmlSerializer xs = new XmlSerializer(typeof(T)); XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encod...
Is it good design to have a separate config file for you dll? I noticed when the dll is invoked from the application, it doesn't read it. what the dll is able to read is the machine.config file. ...
I have program in Java that I want to rewrite (GUI and some new features). I want to rewrite it in C# (mostly because of is easier to write GUI in it). As the core of the program is large and is working well, I have an idea to keep it in Java as the J# code and just write a GUI and new features. J# was discontinued by Microsoft several...
If I am creating web applications using ASP.NET and Silverlight is nowhere in the future and there's no need to expose data to third party services (eg, no oData needed), are there any advantages of using WCF Data Services over the traditional ADO.NET methods we've been using over the years? ...
We use signtool.exe to sign a set of managed assemblies (from a command prompt, we run signtool.exe in a trivial .bat file for-loop, applying a certificate from a pfx file) When run under a domain administrator's account, it runs in under 1 minute. When run under a local user account, it takes 37 minutes! The setup and conditions (as...
I have a very simple command line .net application. I have reference to a .dll assembly and everything works just great when I run the program inside Visual Studio. However when I try to double click the .exe file or run it manually via DOS or something it error out saying it doesn't have access or can't find my assembly reference. Wha...
Putting free open source ORM/DataAccess/Modeling tools (like NHibernate) aside, what do some similar commercial tools offer beyond what the current Entity Framework 4 (plus CTP4) offers. Commercial ones in mind are Telerik's OpenAccess, IdeaBlade's DevForce and LLBLGen Pro. Instead of asking separate question per product, I have them a...
I create a thread which uses TcpListener and when my app closes i'd like the thead to terminate. I can call abort but the thread is still alive since TcpListener is blocking with AcceptTcpClient. Is it possible to about or set a timeout or to do SOMETHING with AcceptTcpClient? i cant imagine how it would be useful if theres no way to st...
I have a somewhat complex custom user control, created in C# .NET, which is essentially a tree structure. The control , ctlGroup, contains a list of fields (which are also custom user controls - ctlFields) and a list of child groups. The datalist containing the child groups creates new instances of the same ctlGroup control, because each...