|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Failure Sending Mail exception with VS 20052005 on XP Home. This is a new install on a new PC. I've never had email problems with VS 2003, and there I could modify the SMTP settings in IIS. But with this install, there is no IIS (at least I can't find an IIS with MMC browsing the snap-ins). I suspect that is part of the problem but I don't know the solution and I have to be able to test sending email from my developer machine. Here's the code that causes the exception: Dim Mail as System.Net.Mail.MailMessage = New System.Net.Mail.MailMessages(strFrom,strTo) ... set Mail properties Dim Client as System.Net.Mail.SmtpClient = New System.Net.Mail.SMTPClient("localhost") Client.UseDefaultCredentials = True Client.Send(Mail) That last line triggers the exception. What is the solution? Thank you. HK,
The problem is in XP home, that has no IIS server and therefore as well no IIS mail server. You can use however any SMTP server that allows this. I hope this helps, Cor Show quoteHide quote "HK" <replywithingr***@notreal.com> schreef in bericht news:3pATf.7402$w86.1312@tornado.socal.rr.com... > In VB.NET, I'm getting the exception "failure sending mail". I'm running > VS > 2005 on XP Home. This is a new install on a new PC. I've never had > problems with VS 2003, and there I could modify the SMTP settings in IIS. > But with this install, there is no IIS (at least I can't find an IIS with > MMC browsing the snap-ins). I suspect that is part of the problem but I > don't know the solution and I have to be able to test sending email from > my > developer machine. > > Here's the code that causes the exception: > > Dim Mail as System.Net.Mail.MailMessage = New > System.Net.Mail.MailMessages(strFrom,strTo) > ... set Mail properties > Dim Client as System.Net.Mail.SmtpClient = New > System.Net.Mail.SMTPClient("localhost") > Client.UseDefaultCredentials = True > Client.Send(Mail) > > That last line triggers the exception. > > What is the solution? Thank you. > > > I don't understand. Actually, I understand but it doesn't make sense.
Much was said by Microsoft about how VS2005 would have an IIS subsitute that handled web requests (for testing ASP.NET) on random ports for security reasons. I heard many times that developers could now do all their testing with XP Home and not need to buy XP Pro. Are you saying that their IIS substitute can't handle sending an email from the machine by itself? That sounds like a good guess, but are you sure? If so, that's a big downfall because developers would not be able to test "the same" code before putting it online on a real server. I really hope Microsoft didn't do this. Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:eyNCSwDTGHA.4900@TK2MSFTNGP12.phx.gbl... > HK, > > The problem is in XP home, that has no IIS server and therefore as well no > IIS mail server. > > You can use however any SMTP server that allows this. > > I hope this helps, > > Cor > > "HK" <replywithingr***@notreal.com> schreef in bericht > news:3pATf.7402$w86.1312@tornado.socal.rr.com... > > In VB.NET, I'm getting the exception "failure sending mail". I'm running > > VS > > 2005 on XP Home. This is a new install on a new PC. I've never had > > problems with VS 2003, and there I could modify the SMTP settings in IIS. > > But with this install, there is no IIS (at least I can't find an IIS with > > MMC browsing the snap-ins). I suspect that is part of the problem but I > > don't know the solution and I have to be able to test sending email from > > my > > developer machine. > > > > Here's the code that causes the exception: > > > > Dim Mail as System.Net.Mail.MailMessage = New > > System.Net.Mail.MailMessages(strFrom,strTo) > > ... set Mail properties > > Dim Client as System.Net.Mail.SmtpClient = New > > System.Net.Mail.SMTPClient("localhost") > > Client.UseDefaultCredentials = True > > Client.Send(Mail) > > > > That last line triggers the exception. > > > > What is the solution? Thank you. > > > > > > > > |
|||||||||||||||||||||||