Newe user registration workflow

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
11/16/2009 8:47:55 PM
Gravatar
Total Posts 69

Newe user registration workflow

When a new user registers on the site, is it possible to have an email routed to an administrator and have the administrator grant site access by assigning roles/permissions?  Where does one control what happens when a new user registers for access to the site?

Thanks,

Bryan

11/17/2009 7:38:14 AM
Gravatar
Total Posts 18439

Re: Newe user registration workflow

Hi Bryan,

You can get email notification of new registrations by adding this to user.config

<add key="NotifyAdminsOnNewUserRegistration" value="true" />

and then you could add the user to roles as needed. However the user will already be created and users are automatically added to the "Authenticated Users" role. But if you define a custom role and protect your pages with the custom role then you can limit what they see until you add them to the role.

Hope it helps,

Joe

11/24/2009 12:55:34 PM
Gravatar
Total Posts 69

Re: Newe user registration workflow

Joe,

Quick question on the "notifyadminsOnNewUserRegistration"  will the it notify all users with admin permissions?

Thanks

Bryan

11/24/2009 1:01:51 PM
Gravatar
Total Posts 18439

Re: Newe user registration workflow

Yes, all users in the admins role, however if needed you can filter out some if needed with this setting:

<!-- a comma separated list of email addresses to exclude when sending

administrative emails including registration notifications and content workflow submissions

this is for when you have admin user accounts that you do not want to receive these emails

-->

<add key="EmailAddressesToExcludeFromAdminNotifications" value="" />

11/24/2009 1:08:36 PM
Gravatar
Total Posts 69

Re: Newe user registration workflow

Joe,

Thanks for the info.  One other questions: when I add stuff to user.config, do I need to do anything to get the updates to be applied?

Thanks,

Bryan

11/24/2009 1:11:52 PM
Gravatar
Total Posts 18439

Re: Newe user registration workflow

Yes, because ASP.NET does not detect changes to user.config you must touch Web.config which it does monitor to make it reload settigns, simply download Web.config and upload it again.

11/24/2009 2:34:13 PM
Gravatar
Total Posts 69

Re: Newe user registration workflow

Joe,

If the administrator sets up some new users, is it possible to have these users forced into changing their password the first time they log in?

Thanks,

Bryan

11/24/2009 2:53:04 PM
Gravatar
Total Posts 18439

Re: Newe user registration workflow

No, not currently.

12/7/2009 1:32:35 PM
Gravatar
Total Posts 69

Re: Newe user registration workflow

Joe,

I have had 2 users register for my site over the past couple of days and didn't receive any notices via email.  Any suggestions on what to check?  I did set up the user.config as suggested below and I did just verify again.

Thanks,

Bryan

12/9/2009 7:38:57 AM
Gravatar
Total Posts 18439

Re: Newe user registration workflow

I would verify that email is configured correctly by testing the contact form. Other than that I would check for errors in the log and make sure your admin user account has a valid email and is not excluded by the exclusion setting. Also make sure there is a valid email address in Site Settings Default Email From setting.

Hope it helps,

Joe

12/9/2009 8:44:21 AM
Gravatar
Total Posts 69

Re: Newe user registration workflow

Joe,

Added a contact page and tried the form.  Here is what I get from the system log:

2009-12-09 08:41:03,549 ERROR mojoPortal.Web.ContactUI.ContactForm - System.ArgumentException: The parameter 'address' cannot be an empty string.

Parameter name: address

at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)

at System.Net.Mail.MailAddress..ctor(String address)

at mojoPortal.Net.Email.SendEmailNormal(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority, String[] attachmentPaths, String[] attachmentNames)

at mojoPortal.Net.Email.SendEmailNormal(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority)

at mojoPortal.Net.Email.SendEmail(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority)

at mojoPortal.Web.ContactUI.ContactForm.btnSend_Click(Object sender, EventArgs e)

 

Any help would be appreciated.

12/9/2009 8:56:15 AM
Gravatar
Total Posts 18439

Re: Newe user registration workflow

Did you go into the Settings of the contact form and specify an email address to send to?

Do you have a valid Email From Address configured in Site Settings?

12/9/2009 10:40:16 AM
Gravatar
Total Posts 69

Re: Newe user registration workflow

Joe,

Ok, I got the email address set in settings for contact form.  Here is the error I am getting from log file now.

2009-12-09 10:34:34,586 ERROR mojoPortal.Net.Email - error sending email to bryan@agcents.com from noreply@agcents.com, message was: Bryan Fisel<br />bryan@agcents.com<br /><br /><p>one two three</p><br /><br />HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; Media Center PC 5.0; SLCC1; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; Tablet PC 2.0)<br />REMOTE_HOST: 74.46.203.70<br />REMOTE_ADDR: 74.46.203.70<br />LOCAL_ADDR: 66.116.172.181<br />

System.Net.Mail.SmtpException: Command parameter not implemented. The server response was: Authenticate first (#5.5.0)

at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)

at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from)

at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception)

at System.Net.Mail.SmtpClient.Send(MailMessage message)

at mojoPortal.Net.Email.SendEmailNormal(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority, String[] attachmentPaths, String[] attachmentNames)

 

Any insite is much appreciated.

Thanks,

Bryan

12/10/2009 9:57:06 AM
Gravatar
Total Posts 2203

Re: Newe user registration workflow

Hi Bryan,

The solution to the problem is given to you in the error. The server response was: Authenticate first (#5.5.0). You need to set the following in your web.config or user.config:

<add key="SMTPRequiresAuthentication" value="true" />
<add key="SMTPUser" value="UserName" />
<add key="SMTPPassword" value="UPassword" />

HTH,
Joe D.

12/10/2009 4:16:16 PM
Gravatar
Total Posts 69

Re: Newe user registration workflow

Ok,

I modified my web.config to look like this:

<add key="DisableDotNetOpenMail" value="true" />

<add key="SMTPServer" value="localhost" />

<add key="SMTPRequiresAuthentication" value="true" />

<add key="SMTPUseSsl" value="false" />

<add key="SMTPPort" value="25" />

<add key="SMTPUser" value="UserName" />

<add key="SMTPPassword" value="UPassword" />

<add key="SMTPTimeoutInMilliseconds" value="30000" />

And I am still getting this error in the log file:

2009-12-10 16:10:10,003 ERROR mojoPortal.Net.Email - error sending email to bryan@agcents.com from noreply@agcents.com, message was: Bryan Fisel<br />bryan@agcents.com<br /><br /><p>Mail test</p><br /><br />HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; Media Center PC 5.0; SLCC1; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; Tablet PC 2.0)<br />REMOTE_HOST: 74.46.203.70<br />REMOTE_ADDR: 74.46.203.70<br />LOCAL_ADDR: 66.116.172.181<br />

System.Net.Mail.SmtpException: Command parameter not implemented. The server response was: Authenticate first (#5.5.0)

at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)

at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from)

at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception)

at System.Net.Mail.SmtpClient.Send(MailMessage message)

at mojoPortal.Net.Email.SendEmailNormal(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority, String[] attachmentPaths, String[] attachmentNames)

 

Any other help would be greatly appreciated!

12/10/2009 4:25:24 PM
Gravatar
Total Posts 2203

Re: Newe user registration workflow

Hi Bryan,

Sorry, I told you to change the wrong settings. The registration page doesn't use those settings for email. You need to set the following:

<smtp from="someaddress@yourdomain.com">
        <network host="MAILSERVER" port="25" password="PASSWORD" userName="USERNAME" />
</smtp>

Those settings can only be set in the web.config. You will find them in the <system.net> section.

Thanks,
Joe D.

12/10/2009 4:45:48 PM
Gravatar
Total Posts 69

Re: Newe user registration workflow

Joe,

I checked my web.config file for the settings you just indicated in the system.net section.  The recommended setting are indeed set there.  They were set initially by JoeA as he did my initial install.

Any other thoughts?

Also, do I need to set the <add key="SMTPRequiresAuthentication" value="true" /> back to false?

Thanks,

Bryan

12/10/2009 5:01:50 PM
Gravatar
Total Posts 69

Re: Newe user registration workflow

Well, mystery solved.  I went in and reset the password for the noreply account and changed it in my web.config systems.net section and all seems to be working now.

Thanks for all the help trouble shooting this one.

Tongue out

You must sign in to post in the forums. This thread is closed to new posts.