I am creating an email software which send email to some accounts. I want to append text every time new email is sent or failed. But textbox shows me report after sending all emails. If the toList is very large like 30+ emails the app screen goes white and after sending all emails GUI comes back with the updated OutPutTextBox. Here is th...
Do anyone have a REAL and CLEAR way to solve this problem and an explaination of why it happens? Because, every thread i've read on how to solve this issue where not "politicaly correct". I mean, i saw things like "Restart machine, etc" but I get this error on a hosted dedicated server and I can't restart it like that.
A transport-l...
Hi,
I'm trying to get assembly version of an exe in C# with the following code
Assembly asm = Assembly.LoadFrom(address);
return asm.GetName().Version;
it works perfect but if I try to delete the exe after I used this function, it says "Access Denied" since the exe is being used by another process!
is there any Dispose call or somet...
I have a windows forms dialog, where a longer operation is running (asynchron) within a backgroundworker job. During this operation I want to change some values on the form (labels,...). But when the backgroundworker tries to change something on the form, I get the error "Cross-thread operation not valid"! How can this problem be solved ...
When i do something like this:
public static void BindData<T>(this System.Windows.Forms.Control.ControlCollection controls, T bind)
{
foreach (Control control in controls)
{
if (control.GetType() == typeof(System.Windows.Forms.TextBox) || control.GetType().IsSubclassOf(typeof(System.Windows.Forms.TextBox)...
In the windows desktop properties all the displays are shown and are indicated to be active or inactive. My graphics card has a monitor connected to the dvi port but not the vga and this is correctly determined (i.e. one of the displays is labelled inactive). I also have a usb displaylink lcd which is also detected.
Using system.windows...
Hi all
I've just got to grips with the basics of NHibernate, and while refactoring my data access and domain layers I thought I might as well get cute and start using dependency injection for the data access layer. Unit testing here we come!
I thought since NHibernate uses loads of Castle dlls I might as well use Castle Windsor for th...
I've been having a look at explicit interface implementations in IL. The method Method in the following class (interface IA has a single Method() on it):
public class B : IA
object IA.Method() {
/* code */
}
}
is compiled to the following IL method signature:
.method private hidebysig newslot virtual final instance ob...
I have a CodeDom setup that needs to reference some assemblies that are in the executable's directory. However, it appears that only the Working Directory and the GAC are searched for these assemblies, and not the executable directory.
var compilerOptions = new CompilerOptions {
ReferencedAssemblies = {
"System.dll",
...
I am using NHibernate for persistence and have my domain model mapped out. I am using MVC2 and I am keen to use the built in model validation for all basic validation (string length, range, etc).
The problem is that I'm finding that there is a huge amount of work involved in this. I have 26 POCO classes representing the domain. Which...
I have the next class which instantiated about 40 million times and all its instances take about 80% of all process memory (more than 15GB).
class MyClass
{
String Field1
String Field2
String Field3
int Field4
int Field5
float Field6
SomeEnum Field7
Boolean Field8
Boolean Field9
Boolean Field10
...
We're thinking of developing a small tasks/to-do list for our team and I wonder if we can develop any type of add-ins we want for Outlook 2007. I mean custom menus for the main toolbar, a new tab/section next to the Calender.. Are there any limitations for what you can do for Outlook 2007 add-ins?
...
Hi all!
I'm using ActiveRecord and LinqToActiveRecord to query my database. The problem is, that the generated SQL statement from my LINQ expression always tries to select all possible fields, including joined tables, when this is not needed. For example, I have these database tables:
Table: MasterTable
Id (int)
ChildId (int) <- refere...
I'm working on a .NET component that gets a set of data from the database, performs some business logic on that set of data, and then updates single records in the database via a stored procedure that looks something like spUpdateOrderDetailDiscountedItem.
For small sets of data, this isn't a problem, but when I had a very large set of ...
Hi guys
My english very terrible, so i cant explain very clear. I will try my best.
is it possible to generate HTML code from within ASP.NET MVC, please?
This is Controller
public class HomeController : Controller
{
public ActionResult Index()
{
ViewData["Message"] = "Hello ASP.NET MVC!";
ViewData["author"] = ...
I have a controls library which I've added a .resx file to (ImageResources.resx). It contains two .png images which I subsequently added.
In that same library I have a control which loads a couple of images to do some custom drawing, but I don't seem to be able to load the resources:
void GTableLayoutPanel::SetBorderImagesFromManifest(...
I have a little c# class that I need to expose as COM. THe tool that will use the COM object requires that I support STA. Is there anything special that I need to do with my COM object?
(I know about the STAThread attribute, but (unless I'm wrong) It is for indicating that a thread of execution in .net is to be STA compatible, and no...
I am trying to send a file via code using FTPWebRequest (ftps,pasv). I am getting the following error:
Unable to read data from the transport connection. A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to resp...
Hi,
how can I check if an email is sent using webdav?Is there any delivery status poperty or something like this?
...
i am making a request to a 3rd party RESTful service using M$'s HttpClient. it works flawlessly (and is very easy to implement) except for this one instance. here is a breakdown from the provider as to what is occurring during the error: "The way the POST to the group resource works is that when it completes, it does a HTTP 302 redirect ...