|
i was working in proxy enabled machine.after i turn off it then it works but again i got different run time error n the exception was "smtp requires secure connection or client was not authenticated".it sent few failure notice to my mail id. pls help me to resolve tis problem
|
|
|
|
|
You will probably have to turn on SSL (secure sockets layer) to get access to server. Turn on the EnableSsl property of your SmtpClient object. You may also have to select another port to send on. Talk to whoever is administering the smtp server, or read any documentation for this smtp server. If you already can send mail through this server, from another program (outlook, or windows mail, or whatever), lookup the connection parameters in that program.
Here is full example of mail client that uses SSL: http://www.codeproject.com/Articles/66257/Sending-Mails-in-NET-Framework.aspx[^]
|
|
|
|
|
Hi
i am very new to this forum and with this technology as well, I need to stream a live video from a multicast IP and need to display it on a website using silverlight player.
The video format is mpeg4. Silverlight player and IIS service is not mendatory if anybody knows any better way to do it than also its fine. Any kind of help will be highly appriciated. Please let me know if i can be more specific about my question.
Eagerly waiting for reply.
|
|
|
|
|
Hi
I am creating custom collection object that inherits arraylist, ienumerable, etc. Because I can't go for Generic list since, that doesn't have event support (insert, add, remove, etc...)
I need some events to be raised on item add/remove/insert on list
public class CustomList<T> : ArrayList, IBindingList , IArrayList<T>
this supports linq, if I use object type in the linq query
var aa = (from User a
in users
where a.IsDirty == false
select a).ToList();
The problem, i could not use extension methods (.Where, etc..)
public class CustomList<T> : ArrayList, IBindingList , IArrayList<T>,IEnumerable<T>, IEnumerable
public new IEnumerator<T> GetEnumerator()
{
return this.GetEnumerator();
}
But this doesn't filter the objects in the list. for example users.Where(a=>a.isDirty == true);
Also if I inherit Ienumerable I get 'System.StackOverflowException' exception.
Please help
Anand
modified on Thursday, April 15, 2010 2:55 AM
|
|
|
|
|
|
list supports add, removve, insert . But I think it doesnt support events
public interface IArrayList<T>
{
int Add(T value);
void Clear();
//bool Contains(T value);
//int IndexOf(T value);
void Insert(int index, T value);
void Remove(T value);
void RemoveAt(int index);
|
|
|
|
|
I think you're confusing events with methods. Read the documentation again.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
my issue is not events/methods, how to incorporate the linq, extention support in to custom list.
public class CustomList<T> : ArrayList, IBindingList , IArrayList<T>,IEnumerable<T>, IEnumerable
{
public new IEnumerator<T> GetEnumerator()
{
return this.GetEnumerator();
}
}
1.
var aa = (from User a
in users
where a.IsDirty == false
select a).ToList();
this works, but public new IEnumerator<T> GetEnumerator() throws stackoverflow exception.
2. users.Where(a=> a.IsDirty == false);
this always returns empty/null
|
|
|
|
|
The problem is you are trying to create something that already exists
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
linq, extension methods work after casting the objects.
public class CustomList<T> : ArrayList, IBindingList , IArrayList<T>
I removed IEnumerable from the customList
users.Cast<User>().Where(a=> a.IsNew).ToList()
var aa = (from User a
in users
where a.IsDirty == false
select a).ToList();
modified on Friday, April 16, 2010 12:59 AM
|
|
|
|
|
|
Yes, Collection is better choice.
protected override void RemoveItem(int index) {}
Collection doesn't have RemoveItem(object item) method to override....
so couldn't raise remove event, on removing by object.....
any fix for this?
Thanks in Advance
Anand
|
|
|
|
|
If all you want to do is raise an event, you should probably just use ObservableCollection, which does raise events on add/insert, remove, and setting items. The Remove(T item) will call the protected overridable RemoveItem(int index) after figuring out the proper index, that's why only one is overridable.
|
|
|
|
|
hi
i need to know what is component based development is? and how to start analysing and working on it, give me url links for starting with component based architeture.
|
|
|
|
|
sathimailin1 wrote: i need to know what is component based development is
A search on the internet returned the definion on the wiki site.
|
|
|
|
|
thanks for your reply
i got the same link but i need to know how to start designing and implementing CBD in .NET
|
|
|
|
|
sathimailin1 wrote: i got the same link but i need to know how to start designing and implementing CBD in .NET
It's not something that you build, but a way of building something. Some of those idea's are described in this[^] book
I are Troll
|
|
|
|
|
|
Hi,
I'm trying to retrieve an AppSetting, yet following the instructions in the articles, this is what I have:
string debug = ConfigurationManager.AppSettings["Debug"];
In the app.config file I see this:
<applicationSettings>
<MP3_Merger.Properties.Settings>
<setting name="Debug" serializeAs="String">
<value>true</value>
</setting>
</MP3_Merger.Properties.Settings>
</applicationSettings>
The code executes, however it always comes back as null. I've been spinning my wheels for four hours trying to do something simple. I'm missing something, but I don't know what. I have tried setting a break point in the "getter" code in the settings code, but we never seem to get there.
Any help is appreciated.
Thank you,
Glenn
Glenn
|
|
|
|
|
This should be very straightforward, try
string debug = Properties.Settings.Default.Debug;
Alan.
|
|
|
|
|
Thank you very much, that worked like a champ!!
Glenn
|
|
|
|
|
Hello All,
I'm working on a program which needs to partition (i.e. fdisk) and format the filesystems on a USB flash drive.
I've been looking for methods in the .NET namespace which would implement those functions, but I'm not finding them.
So, does .NET provide methods for partitioning and formatting hard disks?
Should I be wrapping the fdisk.exe and format.exe command line tools?
Is there another (better) method I should be looking at?
Thanks,
Ron Aldrich
Software Architects, Inc.
|
|
|
|
|
Ron Aldrich wrote: I've been looking for methods in the .NET namespace which would implement those functions, but I'm not finding them.
You did not search enough .
See here[^].
|
|
|
|
|
Should I be wrapping the fdisk.exe and format.exe command line tools?
Is there another (better) method I should be looking at?
There is no alternative method in .Net Frame work ,
you have to invoke fdisk.exe/format.exe from your application using
System.Disgonisics.Process.
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
I want to get Default Windows Forms Unhandled-Exception Dialog whenever my C# application encounters U-E.
In vs 2005 when I turn off jit Debugging in app.conf like this:
<configuration>
<system.windows.forms jitDebugging="false" />
<configuration>
the application behaves correctly and shows Windows Forms U-E default dialog, with Continue, Quit, call stack and all.
However in vs 2008, on the same machine or different, even though I diable jit I still get Default .NET Unhandled-Exception Dialog, with Debug, Send Report and Don't Send buttons.
How can I make my vs 2008 app act like the one I make in vs 2005, to show Windows Forms U-E dialog box?
Any help is appreciated
-- Modified Tuesday, April 13, 2010 1:02 AM
|
|
|
|