Link to home
Start Free TrialLog in
Avatar of tmaususer
tmaususerFlag for United States of America

asked on

Console Program VB.NET

Hello experts,

I have created a vb.net console program (visual studio 2010) that basically takes alert messages from an ms outlook folder and parses the data from the messages in the outlook folder, takes the parsed data and puts in into a csv file and sends the csv file off as an email. The program runs with no issues on my development machine, however when I try and place the .exe on the machine I need to run it on it does not send out the email. I receive the following error in the cmd window.

Unhandled exception: system.argumentsnullexception: Value cannot be null
Parameter name: addresses
at system.net.mail.mailaddresscollection.add(string addresses)
at conelitereorderalerts.modmain.fnmailer(string strattachment)
at con elitereorderalerts.modmain.main

I also tried on another test machine and receive the same error. I get the click here for windows to find a solution but of course nothing happens. Any assistance would be great. Please let me know if I need to provide more detail
Avatar of Lokesh B R
Lokesh B R
Flag of India image

Hi,

NullException: It clearly says that something is NULL,  i.e address

You need add more conditions to check if anything is NULL and write the error in log.
Avatar of tmaususer

ASKER

I agree but don't know what or why. I have everything set identical on my test machine so that is what is puzzling to me. I am not a programmer so it will take me some time to figure out how to write to an error log.
ASKER CERTIFIED SOLUTION
Avatar of Lokesh B R
Lokesh B R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok thanks. I will give it a shot and report back
Avatar of glnjalsa
glnjalsa

can anyone give  me program in vb.net console where timer start when program starts and after it ends the timer calculates the time of the program executed like ( a loop starts and ends so start time - endtime)
this time is displayed by the timer