.net - System.net.networkcredential incorrect overload signature -
I'm running on one stop issue and I do not know if some of my setup is wrong or if there is a bigger new network Continue with the signature for credentials.
A short history ago, I have an application that I wrote in .NET Framework 2 which sends an email via smtp. To send email it uses Active Directory credentials to authenticate with the server. I just had the setup as below:
smtp.Credentials = New Net.NetworkCredential (domain and "\" and user name, password)
It works fine until I update the application to run in .NET Framework 4, where I got an error: "The mailbox is unavailable, the server response was 5.7.1, allowing the client to send this sender is not."
I was seen all around and found that for some reason this was not working correctly in .NET Framework 4 and to specify the domain to use for a surcharge.
I tried the first time:
smtp.Credentials = New Net Networks Credentials (username, password, domain)
Who gave this too, even though all the information was correct. My colleague had the same problem with a separate application and with some luck or mistake it was found that:
smtp.Credentials = New Net.NetworkCredential (username, domain, password)
Worked correctly and will be certified and will send emails. Now the above signature goes to all the documents and so I decided to check and found the following:
Net with NetworkCredential = NetCred with new network credential () Netcred User name = user name .domain = domain error message above already failed (5.7.1) NetworkCredential = New NetworkCredential () as NetCred slow) with NetCred. Username = user name .domain = password Passwords = domain ends with
succeeded in sending emails and sending certification correctly.
Can anyone think of it happening for any reason? Im running and updating the updated version of Visual Studio 2010 with all versions of .net frameworks.
Thanks for any help.
Comments
Post a Comment