How to deal with events/callbacks from something that appears to be on an MTA...
I am writing code with Visual Studio 2010 in VB.net with a WPF project. I have added references to MSHTML and SHDocvw as I am automating an Internet Explorer window. Note I am not hosting the...
View ArticleCould not load file or assemple...incorrect format
My application runs well in debug mode. When I moved it to the server (SBS 2011), it failed with the above error. I have installed VS 2012 and copied all my files to thewwwoot folder on the server...
View ArticleTypes that own native resources should be disposable error - how to clear
I have a project with this class, which stores information about a WinUsb device:internal class DeviceInfo { internal SafeFileHandle deviceHandle; internal IntPtr winUsbHandle; internal...
View ArticleSystem.Out of Memory Exception in Desktop Application
System.Out of Memory Exception When I run my desktop application developed on C#.Net in which I have used a third party control named "Infragistic" continuously for 2 to 3 hours then after I start...
View ArticleGeneric extension method type restriction should be evaluated by the compiler.
So I bring some example where I encountered this problem:I have some classes:public abstract class HtmlElement { /* ... */ } public abstract class UIElement : HtmlElement { /* ... */ } public abstract...
View ArticleLarge C# forms app much slower in Win8
Hello,I have a C# Windows Forms app that has many buttons on many tabbed pages, where each button corresponds to an adjacent text box. I type whatever I want into the text boxes and when I click a...
View ArticleFailed to debug C# application developed and compiled in .net 3.5 but...
Failed to debug C# application in a host having both .net 4.0 and 3.5 using windebug. This application was developed and compiled in .net 3.5 environment but targeted to .net 4.0 and 3.5 using...
View ArticleVS2010 Crashes on debug
Hi! I've encountered a strange problem with VS2010 SP1 on one of our networks. We have 2 separate managed networks. The only real difference between them is a few group policies. On one network VS2010...
View ArticleDebug and trace logging tools for windows application (not WPF windows app)
Hi,I have developed a windows application for our company. The application is ready for release. Now, we need to include debug and trace logging for all our code and error logging when any runtime...
View ArticlePointer of String in C#
Hello guys,I need to use an external non com dlls (made in C) which as a method with the following signature: public static external void logic_open(long xpto).In this method the long atribute is a...
View ArticleCreate PPPOE Connection with wmi
hican i create pppoe connection using wmi? if it s possible to do in wmi is there any sample code?thanks for any helpAlimardani
View ArticleOutOfMemoryException while trying to read Access Databse (few hundered MB)
I am trying to read back from an Access database into a Queue(of objects) in VB .Net.The problem is that the readback works just fine for smaller datasets (say a few MB database). When I try to...
View Articlereflectiontypeloadexception unable to load one or more of the requested types
Hello,I have a dialog which loads all classes that belongs to given Interface in the current Assembly , that works very nice without any error on my maschine but does not work on my collegues maschine...
View ArticleAppDomain Unload Exception:LocalDataStoreSlot storage has been freed
I rehost WorkflowDesigner in seperate AppDomain, When I invoke AppDoamin.Unload(domain) to unload an AppDomain,InvalidOperationException "LocalDataStoreSlot storage has been freed" occured.Anyone else...
View ArticleNot clear about encrypting connection string in app.config
I am going to implement encryption of my connection string in my app.config file for the first time. This is the code I will be referencing from MSDN:static void ToggleConfigEncryption(string...
View ArticleDebug and trace logging tools for windows application
Hi,I have developed a windows application for our company. The application is ready for release. Now, we need to include debug and trace logging for all our code and error logging when any runtime...
View ArticlePrincipalContext and TLS
Is it possible to use PrincipalContext with TLS?I know I can use LdapConnection, but I was wondering about PrincipalContext with TLS.Thanks.
View ArticleApplication Hang When Call System.Runtime.InteropServices.GCHandle.Free()
In Device.Service.exe__PID__324__Date__04_26_2013__Time_10_40_01AM__291__Manual Dump.dmp GC is running in this process.The Thread that triggered the GC is 108The following threads in...
View ArticleTemplated IntPrt
Hello. Is there a templated managed class wich can hold a pointer of unmanaged one and has overridden methods Equals and GetHashCode? I've written such class and it's pretty simple but i'm wondering if...
View Article