|
I see, I was unaware of the FileSystemWatcher.
Anyone know how resource intensive that tool is?
|
|
|
|
|
Hello,
I have added a StatusStrip to my application. I am trying to change the Width of the status but for some reason I cannot change it from the defult value which is set to "22" in the properties windows!
Can someone tell me if it is possible to change the width of the StatusStrip and if it is, how I can do this?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
Hi Khoramdin,
You can change the width of the StatusStrip to set the AutoSize property to false.
statusStrip1.AutoSize = false;
Thanks,
Gopal.S
|
|
|
|
|
hi to all
how can i order tables (data base) by defined feild , in CRYSTALL REPROT
for example , i want to use this query : select * from person order by age
where i must use from (order by age) clause?
thanks
|
|
|
|
|
So I have this app that has been creating some odd errors. Sadly, it has been throwing some odd and inexplicable error messages. No one I've sought help from has been able to help me with it. Mostly due to the fact that no one knows what's been causing the errors.
So after recoding many a thing and adding in some error handling, the errors are no longer occuring, but at the cost of reduced functionality. And then it donned on me...
What if I were to add some kind of error reporting that send me an error report through the email system we have in place...??? That way, I would know of the error as well as have an error dump of sorts. That way, I'll be able to find out what is causing the various errors that have been occuring.
Only 1 problem.
I don't know how to send mail through an Exchange server. I know you can make an email using SMTP, but that doesn't work here. I tried.
So where can I find some GOOD info on creating an app that will send an email through an exchange server? Unless someone knows how already. If you know how, could you bestow upon me such knowledge? Any and all help is always appreciated...
Thanks.
|
|
|
|
|
Sending an email programmatically through exchange is no big deal.
well .NET 2.0 has the ability create and send email via a specified SMTP server address. Have you tried looking at the System.Net.Mail namespace ?
Also here is a code snippet.
MailMessage mail = new MailMessage();
MailAddress ToMailAddress = new MailAddress("hello@helloworld.com");
MailAddress FromMailAddress = new MailAddress("goodbye@helloworld.com");
mail.From = FromMailAddress;
mail.To.Add(ToMailAddress);
mail.Subject = "Test Email";
mail.Body = "This is a test email";
System.Net.Mail.SmtpClient smtpServer = new System.Net.Mail.SmtpClient("192.168.0.1");
smtpServer.Send(mail);
Also you can try Lumisoft.NET dll which allows you to receive and send emails. You will need to google to get the Lumisoft .NET dll. Its free to use as well.
Hope this helps.
cheers
V
|
|
|
|
|
I took a look at the namespace, but 3/4 of it is just gibbersih to me...lol...
But I didn't know I could use the SMTP class to send VIA an Exchange server... I have need to try that. Thanks.
BTW... I *THINK* the exchange server has need of a username/password... Do you know how to use add that at all?
|
|
|
|
|
Spyder_Snyper wrote:
BTW... I *THINK* the exchange server has need of a username/password... Do you know how to use add that at all?
can you please clarify as to why you think you need the username/password ? As far as sending email via SMTP via MS Exchange you dont need to supply any username or password. Only when it comes to retreiving email via a user's mailstore on exchange then you do need the username/password.
If you can be a bit more specific with your problem I can attempt to help you a bit more.
|
|
|
|
|
I think I need the username password because everytime I try to send an email, I get an authentication error.
But then again, if, as you say, I don't need a username and password, THAT might be the problem.
I shall make an attempt with both, and make note of any errors that occur. If they do, I'll post the error messages here.
Thanks for the help man!
|
|
|
|
|
as far as why I think that the server requires authentication...
when I try to send an email, I get an error. It reads:
"5.7.3 Client does not have permission to submit mail to this server."
I think the message is a pretty dead giveaway...
|
|
|
|
|
does the client have an exchange mailstore associated with it ?
try this:
go to START->RUN type in cmd
from the command shell type in TELNET severIPaddress 110
110 is the POP3 protocol port number.
Type in USER username press enter
Type in PASS password press enter
Telnet should response with user successfully logged in. If it doesnt then you know that the user doesnt have access to the exchange server.
I dont have Exchange server installed on my test box yet. But when I did build my automated email client which sent emails out to my exchange server, i never had to supply a username/password to my email client software.
|
|
|
|
|
g'day mate,
sorry my earlier post does not make any sense. Tomorrow when I get to work I will install Exchange server on my test server and run that snippet of code i posted earlier. Just one thing did you actually run that snippet of code I post couple days ago ?
Will update tomorrow with my progress regarding username/password sending email.
sorry for not being too useful.
|
|
|
|
|
It's cool... No worries here.
The code that you have is what I am using at the moment.
I'll check out telnet and see what happens with that.
**EDIT**
So i checked out the telnet trick there. It sorta kinda worked. I could get to the login section where I typed USER and PASS. No matter the combination that I used, I could not get logged in. It may (or may not) be because I don't know where to put in the domain info. I tried with the user, but to no avail.
I *DO* know that the user name and password have access to the exchange server because I have Outlook set up, and it is using the exact same credentials as the user that I was using. And Outlook works just fine.
-- modified at 11:17 Monday 28th May, 2007
|
|
|
|
|
hi again,
today I installed Exchange 2003 on my test server running windows server 2003. The same test server was my domain controller. I just did a default installation of Exchange and Active Directory. I didnt change any security settings etc because I have zero idea about active directory security maintenance.
I ran a test network with my test server being the exchange and domain controller. In this network I ran another Win XP client machine which was not part of my test domain. I wrote the SMTP code I gave you a few days ago as win app and ran it on this Win XP client machine and I was not prompted for any username or passwords.
This would leads me to believe that your configuration of active directory and exchange must be running some high security configuration which needs the user to be authenticated before any email can be sent out or received.
There are 3 solutions you can try:
1) The first solution is that the machine you are using to run the SMTP code I gave before needs to logon to the domain and authenticate the user. The user needs to be part of the active directory. Then run the email sending application you wrote. Maybe check with whoever setup the exchange server on its user authentication requirements.
2) You use an alternative .NET based SMTP class. I gave you the reference Lumisoft.dll. Go to this website and download this dll library:
http://www.lumisoft.ee/lsWWW/Download/Downloads/Net/LumiSoft.Net.zip
Create a new .NET windows application and use the Lumisoft dll to create an email sending application. You will need to use the LumiSoft.Net.SMTP.Client.SMTP_Client namespace. There is a chm helpfile which describes how to use the dll. I dont have the time right to write you a code snippet but read through the helpfile and there are code fragments to get you started.
If you get stuck go to the author's webpage he has a forums section and put a post there. The author is a very nice guy and he has an article on codeproject regarding the lumisoft.dll.
3) In the code I had provided earlier ensure that you used the defaultcredentials property take a look below:
System.Net.Mail.SmtpClient smtpServer = new System.Net.Mail.SmtpClient("192.168.0.1");
smtpServer.UseDefaultCredentials = true;
What this does is that whoever is logged on to the machine that is executing this code their credentials will be used to authenticate against the SMTP server. You have to makesure that the username and password are actually validated against active directory being used by your exchange server.
Let me know how you go and I will see if I can write some code using Lumisoft.
Good luck.
|
|
|
|
|
You give me much to work with...
Sadly, that first one isn't exactly an easy option to explore. What with the ungodly number of miles of red tape and all...
So that third one looks a little promissing. I was taking a look at a few other things that might help with that. I think it was called User Impersonation.
Do you know of this?
From what I've read, I *THINK* it may help me in this task.
But before I overcomplicate things, I first want to try your third option there, and if that doesn't work, I'll go for #2.
Once again, thanks for the help. I'll post the results when I get some...
|
|
|
|
|
well you are in a tough situation so looks like you get more and more work
I have heard of user impersonation. I believe that the DefaultCredentials aspect of the SMTP class would do the trick, which is the third option.
I'll see if I can work out how to sent restricted access on my Exchange server so that the user needs to be validated before they can send any emails out via SMTP. Then give option 3 a go myself. The key thing is that whichever user is logging onto the machine needs to be authenticated against AD successfully. Only then that particular user will be granted access to use Exchange and only then your little application will work. Provided you have enabled the DefaultCredentials feature in your code.
With impersonation you can do the samething. YOu need to define security attributes around the method which needs user impersonation.
Have you fun
|
|
|
|
|
What is the equivalent of a 'Form.Location property' for a 'WPF Window'.
I want to set the Window's screen location dynamically.
God Bless,
Jason
DavidCrow wrote: It would not affect me or my family one iota. My wife and I are in charge of when the tv is on, and what it displays.
I do not need any external input for that.
|
|
|
|
|
Vista.UniForm.WhereTheHellAmI
led mike
|
|
|
|
|
Should waited, I found it properties: Left and Top
God Bless,
Jason
DavidCrow wrote: It would not affect me or my family one iota. My wife and I are in charge of when the tv is on, and what it displays.
I do not need any external input for that.
|
|
|
|
|
I have a stupid problem. I dont know how to write the character " into a text writter. Can you help me?
|
|
|
|
|
tw.Write("You can use \" like this");
|
|
|
|
|
If you ever need to use special characters, which the IDE will tell you what they are, you need to use the escape character \. So you write and double quote ", use \".
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
I programming with C# and I want to print an image. Please help me !
System.Console.Write("Hello Everyone !");
|
|
|
|
|
Hello,
The "System.Drawing.Printing" namespace will help you.
There you find the Installed printers : System.Drawing.Printing.PrinterSettings.InstalledPrinters
Then you need following classes for the setting:
PrinterSettings (Here you can set the printer name)
PrintDocument (There is the Print() method)
In your PrintDocument instance you have to handle the PrintPage event, which will be raised after you call "Print()".
The PrintPageEventArgs e has a Member Graphics, where you can draw your bitmap into:
e.Graphics.DrawImage(yourbitmapinstance,0,0);
P.S.: Instances of PrinterSettings and PrintDocument have to be Dispose(), to not waste memory!
Hope it helps!
All the best,
Martin
|
|
|
|
|
Are you saying you want to print an image in the console?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|