In this example, I will show you to apply maxLength attribute to a string property in a class. You can set the maximum value for the property using data annotation validation property maxLength attribute.
I got the following error while sending email using asp.net c#. You should check the authentication correctly configured or not in Network Credential. If then it is proper it should be blocked by the yahoo server.