Does Rebus support using MSMQ over HTTP/HTTPS? - msmq

I have configured a subscription as follows:
<add messages="MyNameSpace.MyMessage, MyAssembly" endpoint="FormatName:DIRECT=HTTP://mydomain/msmq/private$\myqueue.input" />
But when the bus is started and the subscription is sent, this is what I get:
Exception information:
Exception type: HttpException
Exception message: An exception occurred while attempting to send Rebus.Messages.SubscriptionMessage to FormatName:DIRECT=HTTP://mydomain/msmq/private$\myqueue.input (context: Rebus.Bus.NoTransaction)
at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
An exception occurred while attempting to send Rebus.Messages.SubscriptionMessage to FormatName:DIRECT=HTTP://mydomain/msmq/private$\myqueue.input (context: Rebus.Bus.NoTransaction)
at Rebus.Bus.RebusBus.InternalSend(String destination, Message messageToSend)
at Rebus.Bus.RebusBus.InternalSend(String destination, List`1 messages)
at RehabPathway.Infrastructure.MessagingConfig.RegisterHandlers(IContainer container)
at RehabPathway.Infrastructure.RehabPathwayHttpApplication.Application_Start(Object sender, EventArgs e)
An error occurred while attempting to send Rebus.TransportMessageToSend to FormatName:DIRECT=HTTP://mydomain/msmq/private$\myqueue.input
at Rebus.Transports.Msmq.MsmqMessageQueue.Send(String destinationQueueName, TransportMessageToSend message, ITransactionContext context)
at Rebus.Bus.RebusBus.InternalSend(String destination, Message messageToSend)
Invalid queue path name.
at System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath(String queuePath, Boolean throwException)
at System.Messaging.MessageQueue.get_FormatName()
at System.Messaging.MessageQueue.SendInternal(Object obj, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)
at Rebus.Transports.Msmq.MsmqMessageQueue.Send(String destinationQueueName, TransportMessageToSend message, ITransactionContext context)
I have confirmed that the two servers in question can send messages to each other outside of rebus across HTTP/HTTPS.

With the existing MSMQ transport, Rebus does not support MSMQ over HTTP/HTTPS.
Rebus will always use ordinary private MSMQ queues, and you specify queue names like this:
<add messages="MyNameSpace.MyMessage, MyAssembly" endpoint="myqueue.input" />
to map the messages to a local myqueue.input queue, or
<add messages="MyNameSpace.MyMessage, MyAssembly" endpoint="myqueue.input#anotherHost" />
to map the messages to myqueue.input on the anotherHost machine.
If MSMQ satisfies the same delivery guarantees when using HTTP/HTTPS, I guess there's no reason why it should not be possible to configure it somehow - it's just not supported right now.

Related

"Installing MDriven Server on Windows" - cannot access local Turnkey

I have tried to install MDriven Server and Turnkey according to the page "Installing MDriven Server on Windows" (https://wiki.mdriven.net/index.php/Installing_MDriven_Server_on_Windows) and the Video (https://www.youtube.com/watch?time_continue=722&v=q0ppL5sMPGg).
Installed versions are MDrivenServer_20190411.zip and MDrivenTurnkey_20190415.zip
The PC is a Windows 2019 Server (also tried on Windows 10 Workstation, results are identical!).
I can open the MDriven Server pages (https://MyServer/MyTurnkeyApp/__MDrivenServer) everything looks fine, i.e.:
I created a new "a" user with a known PWD according to the Video
DB connectivity/check/evolve is fine
https/Self-signed SSL certificate works as expected
MDrivenServer works as expected and as described in the article & video!
However I cannot go to the Turnkey pages (https://MyServer/MyTurnkeyApp).
I always get an error message:
Server Error in '/MyTurnkeyApp' Application.
Not able to start, check the CurrentVersion - is it set? Check that the app is Started and not Paused. Check that the Version is in DatabaseUpdated state.
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.Exception: Not able to start, check the CurrentVersion - is it set? Check that the app is Started and not Paused. Check that the Version is in DatabaseUpdated state.
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:
[Exception: Not able to start, check the CurrentVersion - is it set? Check that the app is Started and not Paused. Check that the Version is in DatabaseUpdated state.]
AppCompleteGeneric.ACApplication.GetStartedAndRunningFromDatabaseIdentity(EcoSpace adminEcoSpace, DatabaseIdentity databaseIdentity) in c:\capableobjectsbuild2017\source\AppCompleteGeneric\AppCompleteGeneric.Model\AppCompleteGeneric\ACApplication.cs:51
TurnKeyEcoSpaceWithModelFromServer.TurnKeyEcoSpaceCreator.GetBlank(String databaseID) in c:\capableobjectsbuild2017\source\StreamingApp\StreamingAppGenericAPIAndControllers\TurnKeyEcoSpaceCreator.cs:115
TurnKeyEcoSpaceWithModelFromServer.TurnKeyEcoSpaceCreator.BorrowEcoSpace(EcoSpaceRequestInfo requestInfo) in c:\capableobjectsbuild2017\source\StreamingApp\StreamingAppGenericAPIAndControllers\TurnKeyEcoSpaceCreator.cs:289
Eco.MVC.EcoController1.EnsureEcoSpace(String shelfKey) in c:\capableobjectsbuild2017\source\Eco\Eco.MVC\EcoController.cs:408
Eco.MVC.EcoController1.OnActionExecuting(ActionExecutingContext filterContext) in c:\capableobjectsbuild2017\source\Eco\Eco.MVC\EcoController.cs:549
Eco.MVC.ModelDrivenControllerBase1.OnActionExecuting(ActionExecutingContext filterContext) in c:\capableobjectsbuild2017\source\Eco\Eco.MVC\ModelDrivenControllerBase.cs:97
System.Web.Mvc.Async.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex) +261
System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__31(AsyncCallback asyncCallback, Object asyncState) +100
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +166
System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters, AsyncCallback callback, Object state) +333
System.Web.Mvc.Async.<>c__DisplayClass21.b__19(AsyncCallback asyncCallback, Object asyncState) +1151
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +166
System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +463
System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +42
System.Web.Mvc.Async.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +73
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +166
System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +906
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +166
System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +711
System.Web.Mvc.MvcHandler.b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +93
System.Web.Mvc.Async.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +73
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +166
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +522
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1020
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128
Any idea what's wrong?
Check this answer: MDriven Server installation
I think it is the same issue.
You have no model uploaded to mdriven server
or the model is not selected as current
or the app slot A0 is not started in mdriven server.

CRM 2011/2013 Workflow or Plugin gives "Access Denied. Reference number for administrators or support"

since i dint found any forum here goes the solution for this problem, this goes for people how work with also ADXSTUDIO, ADXSTUDIO have several plugins and workflows that is registed as to run as Calling User, and for so, we sometimes need to change this permissions.
"Access Denied. Reference number for administrators or support: #xxxxxx"
Plugin Trace:
[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.CreateEntity]
[CreateStep1: Create Record as Activity]
[Adxstudio.Xrm.Plugins.Productivity: Adxstudio.Xrm.Plugins.Productivity.Utilities.IdentifierRequestPlugin]
[e0ebe1fa-b46e-e111-a0dc-00155d03a708: Adxstudio.Xrm.Plugins.Productivity.Utilities.IdentifierRequestPlugin: Create of adx_identifierrequest]
Error Message:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Access Denied. Reference number for administrators or support: #536DBC1EDetail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147187707</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Access Denied. Reference number for administrators or support: #536DBC1E</Message>
<Timestamp>2014-05-01T14:35:38.9130605Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.CreateEntity]
[CreateStep1: Create Record as Activity]
[Adxstudio.Xrm.Plugins.Productivity: Adxstudio.Xrm.Plugins.Productivity.Utilities.IdentifierRequestPlugin]
[e0ebe1fa-b46e-e111-a0dc-00155d03a708: Adxstudio.Xrm.Plugins.Productivity.Utilities.IdentifierRequestPlugin: Create of adx_identifierrequest]
</TraceText>
</OrganizationServiceFault>
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Create(Entity entity, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)
at Microsoft.Crm.Extensibility.InprocessServiceProxy.CreateCore(Entity entity)
at Microsoft.Crm.Workflow.Services.CreateActivityService.<>c__DisplayClass1.<CreateInternal>b__0(IOrganizationService sdkService)
at Microsoft.Crm.Workflow.Services.ActivityServiceBase.ExecuteInTransactedContext(ActivityDelegate activityDelegate)
at Microsoft.Crm.Workflow.Services.CreateActivityService.CreateInternal(Entity entity, String StepId)
at Microsoft.Crm.Workflow.Services.CreateActivityService.ExecuteInternal(ActivityContext executionContext, CreateEntity createEntity)
at Microsoft.Crm.Workflow.Services.CreateActivityService.Execute(ActivityContext executionContext, CreateEntity createEntity)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Solution (This works for any plugin or workflow where gives the access error) :

NServicebus failing to forward failed message to error queue

I am running into issues with forwarding failed messages to error queue as ISendMessages was not configured.
I have the following sections in my app.config file
<section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />
<MessageForwardingInCaseOfFaultConfig ErrorQueue="nservicebus_error" />
<add key="ConnectivityRetryPeriod" value="30" />
<add key="FatalRetryCount" value="2" />
<add key="RetryFrequency" value="2" />
However, when the FatalRetryCount is exceeded, I get the following exception
System.InvalidOperationException occurred
Message=Could not forward failed message to error queue, reason: System.ArgumentException: NServiceBus.Unicast.Queuing.ISendMessages has not been configured. In order to avoid this exception, check the return value of the 'HasComponent' method for this type.
at NServiceBus.ObjectBuilder.Spring.SpringObjectBuilder.NServiceBus.ObjectBuilder.Common.IContainer.Build(Type typeToBuild)
at NServiceBus.ObjectBuilder.Common.CommonObjectBuilder.NServiceBus.ObjectBuilder.IBuilder.Build[T]()
at NServiceBus.Faults.Forwarder.FaultManager.SendFailureMessage(TransportMessage message, Exception e, String reason).
Source=NServiceBus.Core
StackTrace:
at NServiceBus.Faults.Forwarder.FaultManager.SendFailureMessage(TransportMessage message, Exception e, String reason)
InnerException: System.ArgumentException
Message=NServiceBus.Unicast.Queuing.ISendMessages has not been configured. In order to avoid this exception, check the return value of the 'HasComponent' method for this type.
Source=NServiceBus.ObjectBuilder.Spring
StackTrace:
at NServiceBus.ObjectBuilder.Spring.SpringObjectBuilder.NServiceBus.ObjectBuilder.Common.IContainer.Build(Type typeToBuild)
at NServiceBus.ObjectBuilder.Common.CommonObjectBuilder.NServiceBus.ObjectBuilder.IBuilder.Build[T]()
at NServiceBus.Faults.Forwarder.FaultManager.SendFailureMessage(TransportMessage message, Exception e, String reason)
In specific, this exception is logged in the following lien in the FaultManager.cs in the NServiceBus.Faults.Forwarder namespace
Here is the App.Config section and the Config code that I use
Got the fix to this issue from the NServiceBus support team and it looks like the ISendMessages gets registered when I explicitly call .MsmqTransport(). I updated the config code to call .MsmqTransport() and FaultManager stopped throwing this exception

Assembly must be registered in isolation error

I'm trying to load a custom workflow activity onto a crm server. I loaded the project onto the server and have been using the CRM Plug-in Registration Tool. The server is CRM2011 and thus supports .NET 4.0 activities. However, when I press the "Register" button (After the assembly has successfully loaded onto the Tool) the following error occurs:
`Unhandled Exception: System.ServiceModel.FaultException'1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Action failed for assembly 'ExecuteSQLJob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=914788311ab3af7d': **Assembly must be registered in isolation**.
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorCode>-2147220906</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Action failed for assembly 'ExecuteSQLJob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=914788311ab3af7d': Assembly must be registered in isolation.</Message>
<Timestamp>2012-06-21T19:50:30.5216535Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220906</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Action failed for assembly 'ExecuteSQLJob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=914788311ab3af7d': Assembly must be registered in isolation.</Message>
<Timestamp>2012-06-21T19:50:30.5216535Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>`
`Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)`
`Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
at PluginRegistrationTool.RegistrationHelper.RegisterAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly) in C:\hbs\apps\prod\hbs\downloads\crm2011\crm2011_MicrosoftDynamicsCRM2011SDK\sdk\tools\pluginregistration\RegistrationHelper.cs:line 227
at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e) in C:\hbs\apps\prod\hbs\downloads\crm2011\crm2011_MicrosoftDynamicsCRM2011SDK\sdk\tools\pluginregistration\PluginRegistrationForm.cs:line 452`
What does registering in isolation mean? Is it simply a matter of where the assembly is saved on the server or is it more complicated?
I've been following MSDN's tutorial's so far but can't find an explanation for this.
Thanks!
If you aren't a Deployment Administrator then you will need to register it in isolation mode.
http://blogs.msdn.com/b/crminthefield/archive/2011/08/17/error-message-assembly-must-be-registered-in-isolation-when-registering-plugins-in-microsoft-dynamics-crm-2011.aspx

Azure deployment with 2 websites is cycling for a long time

I'm deploying with azure in visual studio 2010 and I have this problem when I have 2 websites.
With only 1 website the deploy runs sucessfully.
Help!!!!!!!!!
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="RIS2048.ConsultaClick.Web.Azure1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
<WebRole name="RIS2048.ConsultaClick.Web" vmsize="Small">
<Sites>
<Site name="PT" physicalDirectory="..\RIS2048.ConsultaClick.WWWPacientes">
<VirtualDirectory name="images" physicalDirectory="..\RIS2048.ConsultaClick.WWWPacientes\imgpt" />
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="pt.consultaclick.com" />
</Bindings>
</Site>
<Site name="RO" physicalDirectory="..\RIS2048.ConsultaClick.WWWPacientes">
<VirtualDirectory name="images" physicalDirectory="..\RIS2048.ConsultaClick.WWWPacientes\imgro" />
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="ro.consultaclick.com" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InternalEndpoint name="Endpoint1" protocol="http" port="80" />
</Endpoints>
<Imports>
<Import moduleName="Diagnostics" />
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
</Imports>
</WebRole>
</ServiceDefinition>
After using intellitrace and remote desktop found the following in event viewer:
https://picasaweb.google.com/112383217404623421937/Dropbox#
In system section:
NtpClient was unable to set a manual peer to use as a time source because of DNS resolution error on 'time.windows.com,0x9'. NtpClient will try again in 15 minutes and double the reattempt interval
thereafter. The error was: No such host is known. (0x80072AF9)
VSP rejected attempt to use protocol version '3.2'.
The application '/' belonging to site '1' has an invalid AppPoolId 'DefaultAppPool' set. Therefore, the application will be ignored.
Site 1 was disabled because the root application defined for the site is invalid. See the previous event log message for information about why the root application is invalid.
Error communicating with the Spooler system service. Open the Services snap-in and confirm that the Print Spooler service is running.
The SLUINotify service terminated with the following error:
The specified module could not be found.
Azure section:
An unhandled exception occurred. Process ID: 3024
Process Name: WaIISHost
Thread ID: 1
AppDomain Unhandled Exception
Exception: E:\sitesroot\3
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at IConfigurator.Deploy(String roleId, WebAppModel webAppModelPath, String roleRootDirectory, String sitesDestinationRootDirectory, String diagnosticsRootDirectory, String roleGuid, Dictionary2 globalEnvironment)
at ConfiguratorClient.Deploy(String roleId, WebAppModel webAppModelPath, String roleRootDirectory, String sitesDestinationRootDirectory, String diagnosticsRootDirectory, String roleGuid, Dictionary2 globalEnvironment)
at Microsoft.WindowsAzure.Hosts.WaIISHost.Program.Main(String[] args)
You should try to figure out what is causing the issue. Could you try configuring Remote Desktop and connect to one of your instance? Verify the Event Viewer to see if you have any errors or warnings in the Application log.
In these situations I often experienced a disconnect from the Remote Desktop session because of the cycling, but you should still try it and with a little luck you'll be able to find out the cause of the issue.
Alternatively you could try configuring the DiagnosticsManager to ship the Windows logs ever 1 minute to track down the issue.
The problem was that I was parsing the request on host header (pt.example.com) and accessing from cck.azure.com so the host header was invalid (I should access from pt.example.com and have a domain that I bought redirecting pt.example.com to cck.azure.com).......