Last post Oct 26, 2017 07:22 AM by komaldparekh
Oct 09, 2017 08:06 AM|bbxrider|LINK
the nightmare returns for me, please see my previous solved thread: "smtp setup for email from within .aspx instead of config file"
the problem in that thread to send email vial google was working when I ran program in vs debug, eg, iis express / vs debugger
I'm running IIS 10 and created a localhost site for the project and published the project there via a file system publish profile. the publish was successful and there is an updated programName.dll in the site's bin directory, so at this point I'm assuming
its the 'working' compiled .aspx.vb code that runs in the debugger(yes?) however, I'm getting the same dreaded error "System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was:
5.5.1 Authentication Required. Learn more at"
so at this point I see 2 possibilities: 1. somehow even though the .dll dates show I'm running the latest and greatest working version from the debugger somehow its the old non working code? or 2. there's some difference in what is actually sent to gmail
due it being sent via regular IIS as opposed to IIS express of the debugger?
I am so hoping this won't take a month to solve like the original problem
Oct 10, 2017 02:48 AM|Jean Sun|LINK
This could happens when you try login from different time zone or IP Address Computer. Your production server and the mail id you have used both are in different time zone. Choose any of the one solution:
1) Log in to production server via remote access, and sign in to gmail once with your credentials. They will ask for the confirmation, confirm it and log out.
Or 2) log in gmail to your local computer, Follow this
Link and choose
review this activity and take proper actions.
Reference link :
Oct 10, 2017 06:09 AM|bbxrider|LINK
thanks for the reply
running my IIS 10 website on the same machine as the vs IIS express, should be the same code, whatever data IIS gets from the host system should be same
Oct 10, 2017 07:55 AM|bbxrider|LINK
ok for some reason vs publish is not publishing the most recent compiled version of the aspx.vb
I'm using the file system publish since the IIS 10 target site is on my dev machine, I even changed the publish settings to delete all existing files as part of the publish trying to make it as comprehensive as possible
the weird thing is the program.dll and program.pdb both have current modified date/times equal to the publish date time
Oct 10, 2017 09:35 AM|Jean Sun|LINK
Please try create a new publish profile and republish your project. Or you can try publish the content to a new location and add a new website to map to that new location to check if it works.
If it works when you publish to new location, You can copy the new location's content and replace your original website's content.
Oct 11, 2017 07:04 AM|bbxrider|LINK
my results are really crazy not sure at all what could possibly be happening
my program is working, see post, smtp setup for email from within .aspx instead of config file, ie when running program in debugger email is sent
(note program writes a log file for production but also very handy for debugging so I can put in messages, etc )
since the program has been running successfully I have added certain new log file entries which naturally show up in the log file running now in debugger
now trying to run program not in debugger but from IIS 10 localhost site
1, create new directory ...inetpub/wwwroot/p4
2, create new vs publish file system profile pointing to that directory
4, in bin directory under p4 I have a myProgram.dll and a myProgram.pdb files with the current publish date and time
5. when running program from website, ie, localhost/p4/myProgram, I'm getting the same email issue that was solved and am not getting the latest log file messages ie, latest program changes written to logfile in debugger?? so evidently the publish is publishing
some older version of the programI!! just which version I can't be sure because I have made quite a few changes in pursing solving the email problem. But it is clear that the website is not running the same version as runs in the debugger!!!
this is completely crazy to me. Its happened twice now with 2 different websites I've set up.
this all should be so straight forward, especially when using the vs publish relying on that to copy all the necessary files and folders
going crazy here
Oct 12, 2017 02:41 AM|Jean Sun|LINK
Please try the following steps:
1. Clean your project in VS
2. Delete the temporary aspnet folder for example: c:\WINDOWS\Microsoft.NET\Framework\<Version>\Temporary ASP.NET Files and find your app and delete it. If you cannot delete the files stop the worker process (w3wp.exe) or restart iis.
3. Rebuild the project and RePublish it.
Oct 26, 2017 07:22 AM|komaldparekh|LINK
Please refer below URLs