My application send a email by using SmtpMail but it doesn't work. I have check the smtp on web server, it's functional. Does anybody have any ideas?
What's the problem if you write the smtp mail address, i.e: without using 'dns.gethostname()'.
I am using the smtp to send emails, and it is working well with no problems, ans the following is my code:
MailMessage message = new MailMessage("FromAddress@yourCompany.com", "ToAddress@yourCompany.com",
"Application Alerts ", "Alert Email from your application System");
SmtpClient smtpClient = new SmtpClient("Your SMTP Name");
Hi guys, I am painting each Item for my listbox class and each item has an image with it. The problem is that when I load 20 or 50 plus items in my list the performance issues kicks in and my application takes lot of memory what can i do. Although, I am not dawing something speical in my paint event. Is listview better than listbox. I am happy so far with listbox functionality so far.
i building a application and i use the usercontrol to fill up my form.
My aplication as 3 levels (login usercontrol -> menu usercontrol -> edit usercontrols).
I put the menu usercontrol inside login usercontrol, and other usercontrols inside the menu usercontrol.
I don´t know if this is good pratice, for me work but is messy.
I do this because it´s the only way i know to call the usercontrols since they are inside (and belong) to is parent.(i don´t want to trigger usercontrols from a form).
Other issue is the scrolls (vertical or horizontal), i get some problems since the contents go off limites and the scrolls don´t appear. I set scrolls in the usercontrols.
Code is just works fine,yet , is more a design issue
I am writing a code to test a COM object and one of its functions has an infinite loop.
Basically my code should run this COM object function in a different thread, give it some time to finish but if it doesn't, terminate it.
However, I encountered the following problems:
1) Thread.Abort wouldn't abort the thread because you can't use .NET Thread.Abort to abort unmanaged code.
2) AppDomain.Unload wouldn't do anything because it tries to abort all the threads.
3) I tried using Marashal.ReleaseComObject and it resulted with:
"An attempt has been made to free an RCW that is in use. The RCW is in use on the active thread or another thread. Attempting to free an in-use RCW can cause corruption or data loss."
By now the only current options I see is either using somehow the original Windows API to abort the thread or create a process especially to test the function. Both methods seem like a lot of overkill for what I'm trying to do.
Alan is right there, I'm afraid. There's just no way. You simply cannot kill a thread which is stuck in an unmanaged call. We had this problem too with DCOM calls not guaranteed to return, and had to learn that there is no way to get rid of the calling thread but to kill the process. Calling windows api to abort the thread is out of the question when you have a managed thread cause it will pull the api thread right away from under your managed thread's arse and lead to whatever results. So either you set up a complete process for testing, or you handle the testing within COM (but not in VB6, for lack of threading capabilities, but in C++ with ATL and all that void** stuff).
I don't envy you, if that's any consolation. As Alan said, the best bet would be to avoid all situations where the COM call can hang.
Last Visit: 31-Dec-99 18:00 Last Update: 31-Jul-21 2:46