Click here to Skip to main content
15,887,854 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Conditionally Loading Partial View in a Page using Javascript Pin
jkirkerx18-Jul-18 13:12
professionaljkirkerx18-Jul-18 13:12 
GeneralRe: Conditionally Loading Partial View in a Page using Javascript Pin
indian14318-Jul-18 14:33
indian14318-Jul-18 14:33 
GeneralRe: Conditionally Loading Partial View in a Page using Javascript Pin
jkirkerx19-Jul-18 7:09
professionaljkirkerx19-Jul-18 7:09 
GeneralRe: Conditionally Loading Partial View in a Page using Javascript Pin
indian14319-Jul-18 7:47
indian14319-Jul-18 7:47 
GeneralRe: Conditionally Loading Partial View in a Page using Javascript Pin
jkirkerx19-Jul-18 8:46
professionaljkirkerx19-Jul-18 8:46 
GeneralRe: Conditionally Loading Partial View in a Page using Javascript Pin
indian14319-Jul-18 9:09
indian14319-Jul-18 9:09 
GeneralRe: Conditionally Loading Partial View in a Page using Javascript Pin
indian14319-Jul-18 11:21
indian14319-Jul-18 11:21 
Questiongetting these smtp exceptions in my mvc .net project,used different ports but still not workin ,can u plz help me? Pin
Member 1390903412-Jul-18 3:32
Member 1390903412-Jul-18 3:32 
CODE:
part 1:
#region Save to Database
               using (MyDatabaseEntities dc = new MyDatabaseEntities())
               {
                   dc.Users.Add(user);
                   dc.SaveChanges();

                   //Send Email to User
                   SendVerificationLinkEmail(user.EmailID, user.ActivationCode.ToString());
                   message = "Registration successfully done. Account activation link " +
                       " has been sent to your email id:" + user.EmailID;
                   Status = true;
               }
               #endregion


part 2:
    var smtp = new SmtpClient
    {
        Host = "smtp.gmail.com",
        Port = 587, //
        EnableSsl = true,
        DeliveryMethod = SmtpDeliveryMethod.Network,
        UseDefaultCredentials = false,
        Credentials = new NetworkCredential(fromEmail.Address, fromEmailPassword)
    };

    using (var message = new MailMessage(fromEmail, toEmail)
    {
        Subject = subject,
        Body = body,
        IsBodyHtml = true
    })

        smtp.Send(message);
}

ERROR:
System.Net.Mail.SmtpException HResult=0x80131500 Message=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 Source=RegistrationAndLogin StackTrace: at RegistrationAndLogin.Controllers.UserController.SendVerificationLinkEmail(String emailID, String activationCode, String emailFor) in D:\Jobshop\RegistrationAndLogin\RegistrationAndLogin\Controllers\UserController.cs:line 224 at RegistrationAndLogin.Controllers.UserController.Registration(User user) in D:\Jobshop\RegistrationAndLogin\RegistrationAndLogin\Controllers\UserController.cs:line 59 at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__11_0() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_1.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()

AnswerRe: getting these smtp exceptions in my mvc .net project,used different ports but still not workin ,can u plz help me? Pin
F-ES Sitecore12-Jul-18 3:48
professionalF-ES Sitecore12-Jul-18 3:48 
AnswerRe: getting these smtp exceptions in my mvc .net project,used different ports but still not workin ,can u plz help me? Pin
jkirkerx18-Jul-18 13:14
professionaljkirkerx18-Jul-18 13:14 
QuestionDefault Download button is not working in Chrome browser Pin
Member 1370125111-Jul-18 19:54
Member 1370125111-Jul-18 19:54 
AnswerRe: Default Download button is not working in Chrome browser Pin
Richard Deeming12-Jul-18 1:03
mveRichard Deeming12-Jul-18 1:03 
Question.Net Core 2.1, Favicon.ico, robots.txt, sitemap.xml, google verification file Pin
jkirkerx8-Jul-18 12:26
professionaljkirkerx8-Jul-18 12:26 
AnswerRe: .Net Core 2.1, Favicon.ico, robots.txt, sitemap.xml, google verification file [solved] Pin
jkirkerx9-Jul-18 7:31
professionaljkirkerx9-Jul-18 7:31 
QuestionCouldn't retrieve all records from SQL database in c# Pin
Sehal6-Jul-18 23:12
Sehal6-Jul-18 23:12 
AnswerRe: Couldn't retrieve all records from SQL database in c# Pin
Mycroft Holmes7-Jul-18 13:44
professionalMycroft Holmes7-Jul-18 13:44 
SuggestionRe: Couldn't retrieve all records from SQL database in c# Pin
Richard Deeming9-Jul-18 8:43
mveRichard Deeming9-Jul-18 8:43 
Question.Net Core 2.1 with SQLite, ReactJS.net and JavascriptRenderingEngine, Porting my first app over to it was really hard Pin
jkirkerx6-Jul-18 8:31
professionaljkirkerx6-Jul-18 8:31 
QuestionHow to use angular along with ASP.NET mvc project Pin
Nitin S4-Jul-18 20:37
professionalNitin S4-Jul-18 20:37 
AnswerRe: How to use angular along with ASP.NET mvc project Pin
Keviniano Gayo4-Jul-18 22:05
Keviniano Gayo4-Jul-18 22:05 
AnswerRe: How to use angular along with ASP.NET mvc project Pin
Vincent Maverick Durano5-Jul-18 14:58
professionalVincent Maverick Durano5-Jul-18 14:58 
GeneralRe: How to use angular along with ASP.NET mvc project Pin
Nitin S5-Jul-18 17:52
professionalNitin S5-Jul-18 17:52 
GeneralRe: How to use angular along with ASP.NET mvc project Pin
Vincent Maverick Durano6-Jul-18 2:04
professionalVincent Maverick Durano6-Jul-18 2:04 
AnswerRe: How to use angular along with ASP.NET mvc project Pin
jkirkerx6-Jul-18 9:09
professionaljkirkerx6-Jul-18 9:09 
GeneralRe: How to use angular along with ASP.NET mvc project Pin
Vincent Maverick Durano6-Jul-18 18:43
professionalVincent Maverick Durano6-Jul-18 18:43 

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.