Wednesday, 6 January 2016

BizTalk WCF : BizTalk System.ServiceModel.AddressAccessDeniedException

BizTalk System.ServiceModel.AddressAccessDeniedException

You configure a self-hosted service at a BizTalk receive location using a localhost address, and when you try to enable the service (receive location) you get the above error with the details 'HTTP could not register URL http://+:80/Service.CreateService.FirstService.v1/. Your process does not have access rights to this namespace'

I was getting above error when trying to Enable WCF receive location.

To overcome this issue, you need to

Solution

1. Open the Visual studio command prompt (using the run as administrator option)

2. Type in the command netsh http add urlacl url=http://+:80/<the rest of the address that comes after localhost/> user=DOMAIN\username (So, if your full address ishttp://localhost/company.bookings.carbookingservice, you type inhttp://+:80/company.bookings.carbookingservice)

User Name should be same under which your host is running.


3. Enter to run the command
4. reset IIS - optional
5. Enable the receive location. It should start successfully now 



Orchestration :The xpath expression selected a node which is not valid for property or distinguished field retrieval

Error : Orchestration :The xpath expression selected a node which is not valid for property or distinguished field retrieval

Solution:
I got above error while setting message attribute value in orchestration using Xpath:
I was assigning value to response message attribute after the executing Map. the Map was not creating any node for that attribute and when I was trying to set values in orchestration it was throwing error.

1. Check if the transform is producing the node during the runtime. Please also test the field value by writing the map's output to event log
2. Make sure your Xpath is valid. You may use xpath tester tool to test xpath configured is correct.