M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Frequent Contributor
Posts: 145
Registered: ‎02-17-2016

No mail server

We have installed M.App Enterprise 16.1 on a system with no email server available. How can we add users withing a tennant database? So we have created teh master database, and added one tennant database with one studio user. Now we want to add a new user within the tennant database. When I try this, I get

 

System.Web.HttpException: A from e-mail address must be specified in the From property or the system.net/mailSettings/smtp config section.

   [Details]

   MS_LoggedBy: System.Collections.Generic.List`1[System.Object]

   at System.Web.UI.WebControls.MailDefinition.CreateMailMessage(String recipients, IDictionary replacements, String body, Control owner)

   at MApp.Endpoints.SecurityController.SendActivationMail(String user, String email, UserActivation userActivation, UrlHelper urlHelper, MAppTenant tenant)

   at MApp.Endpoints.SecurityController.<SaveUser>d__2.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__0.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()

 

 

 

Thanks Richard

Technical Evangelist
Posts: 1,147
Registered: ‎09-11-2015

Re: No mail server

Hi Richard,

 

I don't know the detailed architecture of the system but the mail server could be an essential part of it. For your purposes I'd recommend to try any of the free, open-source Dummy / Fake SMTP servers, that you can run on your server. They simply accept and dump each mail message. Some of them come with control GUI to see the outgoing message(s).

 

For example:

 

Regards,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Technical Evangelist
Posts: 158
Registered: ‎09-01-2015

Re: No mail server

You can always put in the user in the DB directly. Should be working. Just ensure that everthing is correct, like hashing the password and so on.

New Contributor
Posts: 2
Registered: ‎08-05-2019

Re: No mail server

I see that this is a fairly older thread but I have the same issue. The part that confuses me a little is that the section where the email server condiguration information is required is optional - so I skipped it as I do not have one. I had no problems for the past couple months in creating tenants, users or roles. Now when I wanted to create a user which should not have access to the Studio but only to the Apps, I started getting the error described in the issue.

 

Looking at the solutions, i tried the first one but was not able to run Docker due to an issue on the AWS M.App Enterprise is running on. I am also not experienced in hashing or do not know the full extent (foreign keys in the user db etc.) so do not feel very comfortable going for that solution either.

 

Would you be able to assist me on this issue as I need provide an user account which does not have Studio access.

 

Thank you very much.

 

Ceren Turan

Staff
Posts: 1,051
Registered: ‎10-18-2015

Re: No mail server

hi Ceren,

 

the SMTP server is required to create an "end user" account, since we send only username and the way to activate the account providing a password.

As server you may simply use gmail or any other free provider. 

 

If you want to create the user in the DB directly you will have to create a new row in the mapp_user table of your tenant database. You can compare with the Studio account you have already in there. To hash the password you can use any sha1 online tool.

 

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Technical Evangelist
Posts: 1,147
Registered: ‎09-11-2015

Re: No mail server

[ Edited ]

Following SQL statement can be used on MSSQL, no online tools needed for hashing a password (you never know who listens Smiley Wink). There also may be similar possibility with other DB vendors:

insert into [MAPP_USER] ([ID],[NAME],[FULLNAME],[PASSWORD],[EMAIL],[LANGUAGECODE],[ISACTIVATED],[ISSTUDIOACCOUNT], [ISACTIVEDIRECTORY])
  values  
(LOWER(newID()), 'user', 'user', LOWER(CONVERT(VARCHAR(64),HASHBYTES('SHA1','user'),2)), 'user@acme.org', 'en', 1,  0,  0);
Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial