MDriven Turnkey in Azure – An error occurred when verifying security for the mes

CapableObjects Forums SupportForum MDriven Turnkey in Azure – An error occurred when verifying security for the mes

This topic contains 13 replies, has 2 voices, and was last updated by  guest00 2 months, 3 weeks ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #4835 Score: 0

    guest00
    Participant

    Hi!
    I followed steps from the book MDrivenTheBook-Part10-MDrivenTurnkey.pdf using 20170319 buld in my free Azure account. All steps are ok, but I can’t open the Turnkey site. The error is below.
    All settings for Azure are default. Btw – the same error with turnkey on local iis. Mdriven works perfect and is accessible from browser and gaffr.
    Could you please advise?
    Thank you,
    Regards,
    Alex

    Server Error in ‘/’ Application.

    An error occurred when verifying security for the message.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ServiceModel.FaultException: An error occurred when verifying security for the message.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [FaultException: An error occurred when verifying security for the message.]

    [MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.]
    System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +153
    System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +336
    Eco.Wcf.Common.IPersistenceMapperWCF.EndSupportsSync(IAsyncResult result) +0
    Eco.Wcf.Common.WFCWrapProxyAndActSync.SupportsSync() in c:\capableobjectsbuild2013\source\Eco\Eco.Interfaces\Persistence\IPersistenceMapperWCF.cs:260
    Eco.Wcf.Client.PersistenceMapperWCFClient.Eco.Persistence.IPersistenceMapper.get_SupportsSync() in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\PersistenceWCF\PersistenceMapperWCFClient.cs:339
    Eco.Framework.DefaultImpl.PersistenceHandlerImpl.<get_SupportsSync>b__5() in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\FrameworkImpl\VSPersistenceHandler.cs:319
    Eco.Services.Impl.AsyncSupportServiceImpl.WrapTaskInStandardExceptionHandling(Action task) in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\ServicesImpl\AsyncSupportServiceImpl.cs:297
    Eco.Services.Impl.AsyncSupportServiceImpl.PerformTaskNowIfInAsyncThread(Action task) in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\ServicesImpl\AsyncSupportServiceImpl.cs:277
    Eco.Framework.DefaultImpl.PersistenceHandlerImpl.get_SupportsSync() in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\FrameworkImpl\VSPersistenceHandler.cs:317
    Eco.Framework.DefaultImpl.PersistenceHandlerImpl.RetrieveChanges(DBChangeCollection& ignoredChanges) in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\FrameworkImpl\VSPersistenceHandler.cs:347
    Eco.Services.Impl.PersistenceServiceImpl.<RetrieveChanges>b__3() in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\ServicesImpl\VSPersistenceServiceImpl.cs:120
    Eco.Services.Impl.AsyncSupportServiceImpl.WrapTaskInStandardExceptionHandling(Action task) in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\ServicesImpl\AsyncSupportServiceImpl.cs:297
    Eco.Services.Impl.AsyncSupportServiceImpl.PerformTaskNowIfInAsyncThread(Action task) in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\ServicesImpl\AsyncSupportServiceImpl.cs:277
    Eco.Services.Impl.PersistenceServiceImpl.RetrieveChanges() in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\ServicesImpl\VSPersistenceServiceImpl.cs:117
    Eco.Services.Impl.<>c__DisplayClass1.<Eco.Services.IPersistenceService.Refresh>b__0() in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\ServicesImpl\VSPersistenceServiceImpl.cs:100
    Eco.Services.Impl.AsyncSupportServiceImpl.WrapTaskInStandardExceptionHandling(Action task) in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\ServicesImpl\AsyncSupportServiceImpl.cs:297
    Eco.Services.Impl.AsyncSupportServiceImpl.PerformTaskNowIfInAsyncThread(Action task) in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\ServicesImpl\AsyncSupportServiceImpl.cs:277
    Eco.Services.Impl.PersistenceServiceImpl.Eco.Services.IPersistenceService.Refresh(Boolean fetchValues) in c:\capableobjectsbuild2013\source\Eco\Eco.Handles\ServicesImpl\VSPersistenceServiceImpl.cs:98
    AppCompleteGeneric.AppCompleteAdminEcoSpace.Refresh() in c:\capableobjectsbuild2013\source\AppCompleteGeneric\AppCompleteGeneric.EcoSpace\AppCompleteGenericEcoSpace.cs:119
    AppCompleteGeneric.AppCompleteAdminEcoSpace.Borrow() in c:\capableobjectsbuild2013\source\AppCompleteGeneric\AppCompleteGeneric.EcoSpace\AppCompleteGenericEcoSpace.cs:142
    TurnKeyEcoSpaceWithModelFromServer.TurnKeyEcoSpaceCreator.Loaded() in c:\capableobjectsbuild2013\source\StreamingApp\TurnKeyEcoSpaceWithModelFromServer\TurnKeyEcoSpaceCreator.cs:43
    TurnKeyEcoSpaceWithModelFromServer.TurnKeyEcoSpaceCreator..ctor() in c:\capableobjectsbuild2013\source\StreamingApp\TurnKeyEcoSpaceWithModelFromServer\TurnKeyEcoSpaceCreator.cs:35
    TurnKeyEcoSpaceWithModelFromServer.TurnKeyEcoSpaceCreator.Get() in c:\capableobjectsbuild2013\source\StreamingApp\TurnKeyEcoSpaceWithModelFromServer\TurnKeyEcoSpaceCreator.cs:23
    StreamingAppGenericAPIAndControllers.AccountController_Base.ManagedCreate() in c:\capableobjectsbuild2013\source\StreamingApp\StreamingAppGenericAPIAndControllers\AccountControllerBase.cs:19
    Eco.MVC.EcoController`
    1.EnsuredEcoSpace() in c:\capableobjectsbuild2013\source\Eco\Eco.MVC\EcoController.cs:72
    Eco.MVC.EcoController`1.OnActionExecuting(ActionExecutingContext filterContext) in c:\capableobjectsbuild2013\source\Eco\Eco.MVC\EcoController.cs:153
    TurnkeyWebAppGeneric.Controllers.AccountController.OnActionExecuting(ActionExecutingContext filterContext) in c:\capableobjectsbuild2013\source\StreamingApp\WebApplication2\Controllers\AccountController.cs:38
    System.Web.Mvc.Controller.System.Web.Mvc.IActionFilter.OnActionExecuting(ActionExecutingContext filterContext) +10
    System.Web.Mvc.Async.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex) +176
    System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__31(AsyncCallback asyncCallback, Object asyncState) +58
    System.Web.Mvc.Async.WrappedAsyncResult`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +14
    System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
    System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters, AsyncCallback callback, Object state) +197
    System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback asyncCallback, Object asyncState) +743
    System.Web.Mvc.Async.WrappedAsyncResult`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +14
    System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
    System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +343
    System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +25
    System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30
    System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
    System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +465
    System.Web.Mvc.Controller.<BeginExecute>b__14(AsyncCallback asyncCallback, Object callbackState, Controller controller) +18
    System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +20
    System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
    System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +374
    System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +16
    System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +52
    System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30
    System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
    System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +384
    System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48
    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +103
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1590.0`

    • This topic was modified 3 months, 1 week ago by  guest00. Reason: href is not working
    #4853 Score: 0

    Admin
    Keymaster

    If you go to the __MDrivenServer – can you login? Does it work?

    Are you running this thru portal.mdriven.net or not?
    If not you need to make sure that the a account in MDrivenServer is used by Turnkey by updating the settingsfile in appData in turnkey…

    #4854 Score: 0

    guest00
    Participant

    Hi,

    I can login in to the __MDrivenServer. It works perfect!
    And yes, I’m working thru portal.mdriven.net. I did the app registration in it.
    App in the Deployed state.

    Question – new in Azure – I’ve found in the Azure Authentication / Authorization app settings that “Anonymous access is enabled on the App Service app. Users will not be prompted for login.” Is it correct?
    Any other ideas?

    Thank you!
    Regards,
    Alex

    #4855 Score: 0

    guest00
    Participant

    gaffr returned the message when I tried to use Cloud Form->MDriven Turnkey tab and login using my Google account:

    —————————
    Error, please check url, user name and pwd

    The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
    —————————
    OK
    —————————

    • This reply was modified 3 months ago by  guest00. Reason: add
    #4866 Score: 0

    Admin
    Keymaster

    Hmm – is this ongoing – the inability to log in from MDrivenDesigner? Or was it a passing thing?

    >Question – new in Azure – I’ve found in the Azure Authentication / Authorization
    – This is you want to use Authentication via Azure – we do how ever allow you to use ASP.Identity with the federated logins… and technically the IIS in Azure treats the users as anonymous – we do the authentication on application level

    #4867 Score: 0

    guest00
    Participant

    Seems a bug in the build.
    not able to use tools – turnkey returns error “An error occurred when verifying security for the message” and designer “The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state”.
    I switched on messages logging/tracing in the webconfig of the local mdriven server to find more details (azure displyas the same error). SvcTrace found interesting exception. It might help:

    <ExceptionType>System.ServiceModel.Security.MessageSecurityException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
    <Message>Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties.   This can occur if the service is configured for security and the client is not using security.</Message>
    #4877 Score: 0

    guest00
    Participant

    Local IIS – error fixed. I missed one step netsh http add urlacl url=https://mypc:443/ user=Everyone
    Azure – still getting error. Let me repeat – I can work with __MDrivenSite as user “b” without problems via browser and gaffr. But when I remove /__MDrivenSite from the url I get “An error occurred when verifying security for the message.” In the gaffr I get “The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.”
    Question – I have free test account and Basic 1 Small service plan in Azure. I left all app settings as default. Do I need to setup/configure certificates in Azure for MDrivenTurnkey?

    #4878 Score: 0

    Admin
    Keymaster

    Ok – the problem is likely that the a user that Turnkey use is not gaining access to __MDrivenServer.

    Turnkey use the credentials in found in App_Data/TurnkeySettings.xml

    <root>
      <ApplicationName>
    The Name Of the Turnkey app (shows in browser title)
    </ApplicationName>
      <MDrivenServerUser>
    a
    </MDrivenServerUser><!--this is always "a"-->
      <MDrivenServerPWD>ThePWDForUserAInMDrivenServer</MDrivenServerPWD>
      <MicrosoftAuthentication_ClientId>...

    This file is recreated when you execute “SendSettingsAndRestart” from portal.mdriven.net

    If this looks ok – but you still have the problem – the a user may have become blocked in MDrivenServer due to to many wrong attempts.

    Log in as user b in MDrivenServer, use the AutoForm och Admin database – check class ASP_User, uncheck the IsBlocked flag

    #4879 Score: 0

    guest00
    Participant

    I used your advise and execute “SendSettingsAndRestart” from portal.mdriven.net –
    Portal show me Results from Last Send: “Turnkey:”Trying to save to here D:\\home\\site\\wwwroot\\App_Data\\TurnkeySettings.xml and it worked Trying touch this D:\\home\\site\\wwwroot\\Web.Config and it worked”
    MDrivenServer: User not superadmin
    User missing RoleUser – creating
    Adding SuperAdmin role
    EnsureSecuritySettings executed successfully
    Settings applied”
    I’ve checked autoform – User a was not blocked.
    Run and Turnkey works!
    Thank you!!!

    P.S. Quick question, sorry. Not sure is it nessesary to create a new topic in the forum. Local iis additional problem. Turnkey works, I am able to see https://alexpc/MyTurnkey/MDriven/Development view with viewmodels dropdown. The https://alexpc/MyTurnkey/MDriven/AngularApp is empty, the default https://alexpc/MyTurnkey/MDriven returns error The virtual path ‘/Views/MDriven/DynamicPartial_Index.cshtml’ maps to another application, which is not allowed
    Local IIS, win 10 home.
    Thanks a lot for your help!

    #4897 Score: 0

    Admin
    Keymaster

    I you have specific problems on the local IIS turnkey it may be part of a fixed bug we had 2 weeks ago – the mainmenu actions did not work if the app was placed in a sub directory. But that is fixed.

    #4911 Score: 0

    guest00
    Participant

    Still have this issue with the new release on the local iis. In my filesystem __MDrivenServer folder is in the MyTurnkey folder.
    Quite difficult to trace the error.
    Btw, strange behaviour – menu item shows the wrong hyperlink in the status bar (and navigates to the wrong place) – it must show and navigate to https://alexpc/MyTurnkey/MDriven/WAct?actionref=Chat but it shows https://alexpc/MyTurnkey/MDrivenWAct?actionref=Chat – without slash between MDriven and WAct. Is there any parameter to fix it in the config files?
    Thank you!

    #4918 Score: 0

    Admin
    Keymaster

    Yep – this is a bug that placing the app in a sub folder breaks MVC navigation (missing leading slash). I will notify Lars. (Angular views work)

    #4919 Score: 0

    Admin
    Keymaster

    This problem is now fixed. Fresh turnkey build on buildserver available now.

    #4920 Score: 0

    guest00
    Participant

    I’ve checked the fresh turnkey buld (and borpres too) – the wrong hyperlink issue gone, but when I click on the menu item nothing happens. When I right click on that menu item and “Open link…” I am able to see my VModel.
    Issue with “The virtual path ‘/Views/MDriven/DynamicPartial_Index.cshtml’ maps to another application, which is not allowed.” still exist.
    Scenrio: I expect to see index at https://alexpc/MyTurnkey/, but I got exception above “The virtual path…” Than I append MDriven/AngularApp at the end of the url and I see the empty screen but with turnkey menu and logon/register, etc.
    I see many exceptions in the application event log with eventid=1309. In the event details there is a line
    User host address: fe80::dde0:d79d:ee18:e93The HTTP request to ‘https://alexpc/MyTurnkey/__MDrivenServer/admin/AppCompleteGenericPMPWCF.svc’ has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.
    But in my network adapter configuration ip6 is disabled. Seems that my issue is related to the pc itself.
    Thank you

    • This reply was modified 2 months, 3 weeks ago by  guest00.
Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.

Comments are closed.