Click here to Skip to main content
14,574,365 members

.NET (Core and Framework)

 
PinnedHOW TO ANSWER A QUESTION Pin
Chris Maunder16-Jul-09 3:09
cofounderChris Maunder16-Jul-09 3:09 
PinnedHow to get an answer to your question Pin
Chris Maunder16-Jul-09 3:05
cofounderChris Maunder16-Jul-09 3:05 
QuestionHow to join two linq queries to find some common data between them Pin
ElenaRez22-Jun-20 11:16
MemberElenaRez22-Jun-20 11:16 
QuestionHow to retrieve user's data from active directory by novell.Directory.LDap.NetStandard library Pin
ElenaRez22-Jun-20 0:05
MemberElenaRez22-Jun-20 0:05 
AnswerRe: How to retrieve user's data from active directory by novell.Directory.LDap.NetStandard library Pin
Dave Kreskowiak22-Jun-20 3:45
mveDave Kreskowiak22-Jun-20 3:45 
QuestionGetting “Unable to connect to the remote server” When I call WebAPI Url (C#) Pin
sfd16-Jun-20 0:17
Membersfd16-Jun-20 0:17 
AnswerRe: Getting “Unable to connect to the remote server” When I call WebAPI Url (C#) Pin
Richard Deeming16-Jun-20 0:34
mveRichard Deeming16-Jun-20 0:34 
QuestionSecuring Net Core API Pin
pkfox12-Jun-20 4:04
professionalpkfox12-Jun-20 4:04 
AnswerRe: Securing Net Core API Pin
Pete O'Hanlon12-Jun-20 5:29
subeditorPete O'Hanlon12-Jun-20 5:29 
GeneralRe: Securing Net Core API Pin
pkfox12-Jun-20 8:15
professionalpkfox12-Jun-20 8:15 
QuestionSMTP authentication oddities Pin
DerekT-P7-Jun-20 11:21
professionalDerekT-P7-Jun-20 11:21 
I'm experiencing some (new) and very odd behaviours trying to send outbound email from my ASP.Net websites. These are running on a shared-host setup and use ASP.Net Framework webforms. In the past I've been able to do this very simply:
In Web.config:
<system.net>
  <mailSettings>
    <smtp from="me@mydomain.com" deliveryMethod="Network">
      <network host="mail.mydomain.com" userName="me@mydomain.com" password="notneeded" defaultCredentials="false" />
    </smtp>
  </mailSettings>
</system.net><pre lang="HTML">
then in the code
SmtpClient smtp = new SmtpClient();
smtp.Send("sender@mydomain.com", "recipient@somedomain.com" "subject", "message");
NOTE that the password defined in web.config really is the literal "notneeded". When running these sites on my local development box, the correct password for the named sending account is indeed required; but when uploaded to the server, the password is ignored (and the setting can be removed completely).

As of some time on Friday I became aware that email sending from all my sites was failing. I reported the issue to my hosting company but in the meantime attempted to find a fix myself. I found that entering the "correct" password worked fine. (Later this weekend the hosting company, who had denied ANY configuration changes at their end, then made further changes that resulted in all the amended sites failing again. They then told me to change to a different SMTP server (mail.hostingcompany.com); however that didn't work for me. After several hours further testing showed it DID now work, so I updated all the sites again. Later this evening I also found that once again the original mail.mydomain.com host address was working again.

This was all pretty frustrating; I don't pretend to understand SMTP very well and am really not sure how / why omitting the password (or using a dummy one) worked, but it did. That was a Good Thing because it meant I didn't have to hard-code my email password in plain text in web.config, and also meant that when I change my email password I don't also need to go in and change web.config for the domain and all its sub-domains.

So I have some questions:
1. WHY did omitting password work, when the site was running on the same server as the SMTP host?
2. WHAT configuration change could the host have made to cause this to STOP working?
3. Most confusingly of all... there is ONE subdomain that continued to work fine WITHOUT the password through all this. I've examined the code carefully and it definitely does NOT specify the password (either in web.config or in code). Other subdomains of the same domain, which used identical SMTP configuration, now require the password; just this ONE does not.

I'm annoyed with my hosting company, as it's perfectly clear THEY have changed something that caused all my websites to break; not only did they not forewarn, they continue to deny they changed anything. They've subsequently made further changes that broke my fix and then yet more that allow my fix to work. But I'm also completely befuddled as to why things ever worked, then why they didn't, and why one identically-configured site continues to work as it always did!
AnswerRe: SMTP authentication oddities Pin
Richard Deeming8-Jun-20 0:00
mveRichard Deeming8-Jun-20 0:00 
GeneralRe: SMTP authentication oddities Pin
DerekT-P8-Jun-20 0:59
professionalDerekT-P8-Jun-20 0:59 
GeneralLooking for a (free) .NET pluralizer / singularizer Pin
Sander Rossel3-Jun-20 1:11
professionalSander Rossel3-Jun-20 1:11 
GeneralRe: Looking for a (free) .NET pluralizer / singularizer Pin
Garth J Lancaster3-Jun-20 1:17
professionalGarth J Lancaster3-Jun-20 1:17 
GeneralRe: Looking for a (free) .NET pluralizer / singularizer Pin
Sander Rossel3-Jun-20 3:52
professionalSander Rossel3-Jun-20 3:52 
GeneralRe: Looking for a (free) .NET pluralizer / singularizer Pin
#realJSOP22-Jun-20 4:19
mva#realJSOP22-Jun-20 4:19 
JokeRe: Looking for a (free) .NET pluralizer / singularizer Pin
Richard Deeming3-Jun-20 1:34
mveRichard Deeming3-Jun-20 1:34 
GeneralRe: Looking for a (free) .NET pluralizer / singularizer Pin
Richard MacCutchan3-Jun-20 2:14
mveRichard MacCutchan3-Jun-20 2:14 
GeneralRe: Looking for a (free) .NET pluralizer / singularizer Pin
Sander Rossel3-Jun-20 3:52
professionalSander Rossel3-Jun-20 3:52 
GeneralRe: Looking for a (free) .NET pluralizer / singularizer Pin
Richard Deeming3-Jun-20 4:24
mveRichard Deeming3-Jun-20 4:24 
GeneralRe: Looking for a (free) .NET pluralizer / singularizer Pin
Sander Rossel3-Jun-20 4:48
professionalSander Rossel3-Jun-20 4:48 
GeneralRe: Looking for a (free) .NET pluralizer / singularizer Pin
pkfox13-Jun-20 5:30
professionalpkfox13-Jun-20 5:30 
GeneralRe: Looking for a (free) .NET pluralizer / singularizer Pin
Sander Rossel13-Jun-20 23:53
professionalSander Rossel13-Jun-20 23:53 
Questionport 5xxxx is already in use, unable to connect to web server IIS Express Pin
Member 109358009-May-20 3:35
MemberMember 109358009-May-20 3:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.