Archive for the ‘BizTalk’ Category

While researching for my last post, Thinking outside the box (or not): How to create “Global C# function” to be reused inside a map?, in BizTalk360 blog, I encountered several errors while playing around with maps in order to find an approach that would allow me to create the concept of Global Function. And some of this errors were:

Inline Script Error: must declare a body because it is not marked abstract, extern, or partial

Inline Script Error: ; expected

or

Inline Script Error: Type ‘BizTalkMapper.FunctoidInlineScripts’ already defines a member called ‘FunctionName’ with the same parameter types

CAUSES

The cause for this problem is that you are not correctly declare the body of the Inline C# Function.

Or, if you are trying to reuse an existing Inline C# Function you are doing it properly.

To reuse Inline C# Functions this are the rules that you need to follow:

  • If all of the Scripting Functoids are in the same grid page: In the first Scripting Functoid, linked from the source to the destination, we will have to specify the body function and in the following functoids, we only need the function declaration (no body).
  • If the Scripting Functoids are in different grid pages: The Scripting Functoid that specifies the body function needs to be on the leftmost grid page and the remaining Scripting Functoids (with the function body declared) on the other grid pages to the right. In other words, counting the grid pages from left to right, if the Scripting Functoid that specifies the body function is on the second grid page, the remaining functoids with the function body declared, cannot be placed on the first grid page, they can only be placed from the second grid page (including the second).
SOLUTION

The solution to solve this issue you have two options, you need to follow the rules described above (BizTalk Mapper tips and tricks: How to reuse Scripting Functoids with Inline C# inside the same map) or you need to implement the concept of global C# Function described in my post: Thinking outside the box (or not): How to create “Global C# function” to be reused inside a map?, in resume:

  • Add a Grid page to your map and rename it to “GlobalFunctions”
  • Set this grid as the first grid page of your map (important steap)
  • Drag-and-Drop a Scripting Functoid to the “GlobalFunctions” grid page and place the C# code
  • Do not link any inputs and don’t map (link) this Scripting Functoids to any element in the destination Schema.
  • Double click the earlier Scripting Functoids added to the “GlobalFunctions” grid page and set the expected input values as empty constant values, that by default doesn’t exist
  • Now you can use these functions in other grid pages using only the function declaration

A few weeks ago, while improving an existing solution to fulfil the new business requirements, I encountered the following error while trying to validate or test a BizTalk map:

Exception Caught: The map contains a reference to a schema node that is not valid.  Perhaps the schema has changed.  Try reloading the map in the BizTalk Mapper.  The XSD XPath of the node is: /*[local-name()='<Schema>’]/*[local-name()=’MyRootNode’]/*[local-name()=’MyRecord]/*[local-name()=’MyElement’]

To contextualize the problem, the BizTalk Visual Studio solution I was working on was composed by several projects, but for the propose of this error, let’s say that we had two projects:

  • Schemas Project: containing all the schemas used by the BizTalk Solution;
  • Map Project: containing all the maps used by the BizTalk Solution;

I did the necessary changes on the source schema and they were automatically reflected in the map that I was working on without the need to rebuild the Schema Project. And when I try to test the map, after making all the necessary changes on it, I got the above error.

Which was a little awkward at the point because indeed I changed the contract of the source schema but it was reflect in the map that I was working on. Everything seemed fine, I even try to close and open the map again, but that did not solve the problem

CAUSES

Again, the reason for this error is awkward because the schemas changes were reflected on the map, even if it was a different solution and without rebuilding the Schema Solution. However, the cause for this error is that is referring an invalid or incorrect version of the Schema assembly.

SOLUTION

The solution to solve this issue is simple, you just need to rebuild the entire solution or rebuild the schema project before you try to validate or test the maps.

After the Schema project solution is rebuild the problem will disappear and you will be able to validate or test the map.

Here’s two incredible facts: 318576 views were made to my blog last year, being that, the country that most visited was the United States, followed by India, United Kingdom and Sweden.

01-Sandro-Pereira-blog-2016-Country-Stats

(In 2016, there was 50 new posts, growing the total of this blog to 534 posts)

And I had the opportunity, as a speaker, to present 14 sessions! A new personal record…

02-Sandro-Pereira-Speaker-Engaments-2016

So once again let’s look back and reflect into what happened in 2016. In a few words, it was an interesting and challenge year both personal and professional!

My selected Highlights of 2016

Sharing my book with the community

03-BizTalk-Mapping-Patterns-Book-sharing04-BizTalk-Mapping-Patterns-Book-2016

Physical print copies of my book “BizTalk Mapping Patterns and Best Practices” was sold or give away in several Integration events last year like: Integrate 2016 London, BizTalk User Group Sweden in Stockholm and Gothenburg or TechMeet360. And I had the privilege of being present in most of them…

05-BizTalk-Mapping-Patterns-Book-106-BizTalk-Mapping-Patterns-Book-2

(Pro Integration Group PM Jim Harrer photobombing one of the pictures)

And I had – as a “well know writer” – my first book signing event experience at Integrate 2016 London – I felt a little awkward/strange to sign copies of my book, it’s not something I’m used to, strange, but a very pleasant and rich experience.

07-BizTalk-Mapping-Patterns-Book-Steej08-BizTalk-Mapping-Patterns-Book-909-BizTalk-Mapping-Patterns-Book-310-BizTalk-Mapping-Patterns-Book-5

(At Integrate 2016 London)

11-BizTalk-Mapping-Patterns-Stockholm12-BizTalk-Mapping-Patterns-Stockholm-2

(At BizTalk User Group Sweden in Stockholm)

13-BizTalk-Mapping-Patterns-Gothenburg14-BizTalk-Mapping-Patterns-Gothenburg-2

(At BizTalk User Group Sweden in Gothenburg)

15-BizTalk-Mapping-Patterns-Book-7

(At TechMeet360 in India)

Thanks Saravana and BizTalk360 for all the work you have done to push and promote my book! Let’s do another one!

First experience at Channel 9 studio

At the MVP Summit 2016 in November, I had the opportunity to record a segment in the Channel 9 studio, that was my first experience, and I have to confess, I was a little nervous to be recording in a small professional studio, so as I was expecting after seeing the record in its raw state, the end result could have been better, but, for a first experience it went pretty well. The important for me is to face new challenges, different situations, leave my comfort zone and improve to be better next time. The segment is not public yet, but I will be sure to post when it is.

16-Sandro-Pereira-Channel917-Sandro-Pereira-Channel9-2

Fortunately, I had the company of my good friend Kent Weare in this small “adventure”:

18-Kent-Weare-at-channel-919-Kent-Weare-at-channel-9-2

He is probably one of the few people that I know that I wasn’t able to convince him to buy my book. Instead, he tried to convince me that he could help him sell more books  if I gave him a free copy 🙂

20-BizTalk-Mapping-Patterns-Book-Kent

TUGA IT 2016

Being responsible to organize the Integration track and one Integration Workshop at TUGA IT event, one of the major biggest events in Portugal that targets several distinct technologic areas like SharePoint and Office 365, Azure Infrastructure, Data Platform, Programming and Integration (BizTalk, IoT and Azure) and much more.

Having that role, I was able to invite and convince some of my good friends to speak at this event: Nino Crudele, Steef-Jan Wiggers, Sam Vanhoutte and Glenn Colpaert.

21-TugaIT-Steef22-TugaIT-Nino23-TUGAIT-Glenn24-TugaIt-Sam25-TUGAIT-2016

And I was able to perform a one day deep dive workshop about Enterprise Integration with my dear friends Nino Crudele and Steef-Jan Wiggers…. what amazing experience combining three different and experienced experts in one room to share knowledge

26-TUGAIT-Wokshop27-TUGAIT-Wokshop-2

Integrate 2016 London

As always, I was really happy and proud to speak at the biggest integration (Microsoft related technologies) event worldwide: Integrate 2016 London that was amazingly well organized by Saravana Kumar and his BizTalk360 team. The statistics of this year’s INTEGRATE 2016 event stood at 380 attendees, 187 Companies from 22 different countries and the key highlight of the welcome session was the announcement of the availability of a printed version of my “BizTalk Mapping Patterns” book… Once agan,Thanks Saravana and BizTalk360 team!

This event is always an amazing and unique opportunity to learn from some of well-known experts in the field and to meet the people you have been following on Twitter and blogs and other social networks who are interested in the same things you are.

Here is a different perspective of the event… The speaker’s vision:

28-Integrate2016-speaker-view

And here I am with the Microsoft Pro Integration Team and some of the MVPs present at the event:

29-Integrate2016-speakers

MVP Summit 2016, meet the all Microsoft BizTalk team and the reunion of BizTalkCrew

The greatest thing about attending the MVP Summit is the networking part… reconnect with some friends, meet the product group, have great technical discussions and enjoy… and that was exactly what happened this year. I cannot discuss the technical part (NDA) but here is the fun part:

  • I was able to record a session at Channel9 (which I mentioned earlier)
  • Attending my first Seahawks game

31-Me-At-SeaHawks-game31-SeaHawks-2

  • First experience at a Shooting range with most of all BizTalk MVPs… just to confirm that I am not a fun of guns… but it was a really fun experience

32-Me-At-Shooting-range

  • Engagements with the product teams during the event and outside the event… here visiting the Museum of Flight with Mikael Håkansson, Johan Hedberg and Clemens Vasters

33-Me-At-Museam-of-flight

  • Meet the all Microsoft BizTalk team (or Pro Integration Team), here is a picture of some MVPs in meeting room were the Logic App team records their Logic Apps Live webcast

35-Me-At-BizTalk-Product-Group-home

  • And the BizTalk Crew was reunited once again

36-BizTalkCrew-2016

A year of speaking engagements…

Another year full of speaking engagements… I had the opportunity to delivery 14 sessions! Speaking about different topics like: BizTalk Server, Logic Apps, API Management, App Service, Azure Functions, Microsoft Flow or PowerApps, in multiple events across Europe (UK, Sweden and Portugal) and some of them through live meetings. New personal record!

Some of them I already mentioned above but here is the complete list of speaking engagements that I did in 2016:

  • XV Porto.Data Event: Build your first LogicApp from scratch (No slides)

37-XV-EVENTO-PORTO.DATA-Build-your-first-LogicApp

  • Global Azure Bootcamp 2016 Lisbon: The "Apps" World: Logic, API & PowerApps

38-Global-Azure-Bootcamp-2016-Lisbon-Logic-API-PowerApp

  • 2 online talks at the Integration User Group: Creating reusable pieces in Logic Apps and BizTalk Mapping Patterns and Best Practices
  • Integrate2016 London: A new set of BizTalk Server Tips and Tricks

39-Sandro-Pereira-Speaker-Integrate2016-240-Sandro-Pereira-Speaker-Integrate2016

Where I also gave away BizTalk T-Rex stickers to the attendees:

41-Sandro-Pereira-Speaker-Integrate2016-stickers

  • Tuga IT 2016: One session: BizTalk Server Deep Dive Tips & Tricks for Developers and Admins; and one workshop: Enterprise Integration Workshop

42-TUGAIT-Sandro-Pereira43-TUGAIT-Sandro-Pereira-2

  • BizTalk User Group Sweden in Stockholm: BizTalk Mapping Patterns and Best Practices

44-BizTalk-User-Group-Sweden-Stockholm-Sandro

  • BizTalk User Group Sweden in Gothenburg: BizTalk Mapping Patterns and Best Practices

45-BizTalk-User-Group-Sweden-Gothenburg-Sandro

  • 12ª NetPonto Porto Meeting: API Management: Rise of the Planet of the Apps

46-Sandro-Pereira-Speaker-NetPonto-201647-Sandro-Pereira-Speaker-NetPonto-2016-2

  • XXIII Porto.Data Event: API Management: Rise of the Planet of the Apps

48-Sandro-Pereira-Speaker-XXIII-PortoData-2

(I had this event two weeks after my surgery, was still in recovery and that why my sporty look on stage)

  • DevScope CSI: SharePoint integration: How can PowerApps and Microsoft Flow give power to your SharePoint users
  • SPS Lisbon 2016: SharePoint integration: How can PowerApps and Microsoft Flow give power to your SharePoint users

49-SPSLisbon-Sandro-Pereira-450-SPSLisbon-Sandro-Pereira

  • Instituto Superior de Engenharia do Porto (ISEP): API Management: Rise of the Planet of the Apps

For me is always a great honor and joy to be participating in these type of events, either as speaker or attendee, be with old friends, meet new people and share knowledge!

And yet I had the opportunity once again to attend some events like:

  • MVP Global Summit 2016
  • MVP Open-Day 2016 (Rome)
  • A few SQLPort and Porto.Data Community events;
  • An incalculable number of internal training events at DevScope;
  • And more
My Blog is growing every year…

Very special thanks to all my reader. I really appreciate the 318,576 visits to my blog (in a total of 1456497 views since I’ve migrated to WordPress), from 187 countries in the past year. And even with all the speaking events that I had, I still was able to write 50 new posts.

The posts that got the most views in 2016 were:

  1. BizTalk Server 2013 R2: Installation and Configuration – Install and Configure BizTalk Server 2013 R2 (Part 9) posted in January 2015
  2. The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security. posted in February 2012
  3. BizTalk 2013 Installation and Configuration – Install and Configure BizTalk Server 2013 (Part 9) posted in May 2013
  4. BizTalk Server 2013 R2: Installation and Configuration – Important considerations before set up the server (Part 1) posted in January 2015
  5. BizTalk 2013 Installation and Configuration – Important considerations before set up the server (Part 1) posted in May 2013

However, my 3 favorite’s posts that I enjoyed writing last year was:

Still contributing in TechNet Wiki and provide several BizTalk Open Source Contributions

And as has been the case in recent years, I’m BizTalk Technet Contributor, were I write articles in Microsoft TechNet Wiki and BizTalk TechNet moderator. I’m also member of the TechNet Wiki Community Council and TechNet Wiki Ninja Blogger.

And many other contributions….

And as always Besides community work…

… of course, friendship, family, travelling and running were also important things as always!

51-Me-with-Tommaso-Mikael58-Dinner-at-Summit

  • 2016 I had the pleasure to have a mini vacation (3 days) with my greatest friend: Nino Crudele and is family… thanks for having us in your home

52-vacations-2016-Nino-253-vacations-2016-Nino

  • Travelling (for work and pleasure) … I was able to visit two new countries: Sweden and The Netherlands (Where I enjoyed a nice dinner with Steef-Jan Wiggers and his family, I also visited their home … thank you!)

54-2016-Travelling-Netherlands55-2016-Travelling-Sweden

  • And finally… Portugal won their first European Championship

56-Portugal-Won-Euro2016

And this means that these two guys will were Pepe jersey in the upcoming Integrate 2017 in London during their presentation: Steef-Jan Wiggers and Mikael Håkansson

57-Steef-Jan-and-Mikael

(Kent Weare in the picture was the only one supporting Portugal, so he will be there with me enjoying this moment)

Thanks for following me, for reading my blog and I promise that I will continue to share my knowledge during 2017.

And the most expected email arrived once again on 1st January, thanks Microsoft for another wonderful start of New Year. Once again, I’m delighted to share that I was renewed as a Microsoft Azure MVP (Microsoft Most Valuable Professional), This is my 7th straight year on the MVP Program, an amazing journey and experience that started in 2011 as BizTalk MVP, which gave me the opportunity, and still does, to travel the world for speaking engagement, share the knowledge, and to meet the most amazing and skilled people in our industry.

azure-mvp-sandro-pereira

As usual, I would like to thank:

  • My MVP Lead Cristina Herrero
  • The BizTalk Product Team and Azure Teams like: Jim Harrer, Mandi Ohlinger, Tord G. Nordahl, Dan Rosanova, Jon Fancey, Paolo Salvatori, Kevin-Lam and Jeff-Hollan; Microsoft Portugal: Paulo Mena, Luís Calado, Ivo Ramos, Ricardo Jesus, Pedro Santos and all other Microsoft employees involved;
  • To DevScope (my company) and all my coworkers: no names here because all of them are amazing professionals – what an amazing team they are, so, thanks for all the support given.
  • To all my fellow Microsoft Integration MVP’s: Nino Crudele, Steef-Jan Wiggers, Saravana Kumar, Kent Weare, Mikael Håkansson, Johan Hedberg, Tomasso Groenendijk, Salvatore Pellitteri, Richard Seroter, Stephen W. Thomas, Mick Badran, Michael Stephenson, Bill Chesnut, Thomas Canter, Nicholas Hauenstein, Sam Vanhoutte, Glenn Colpeart, Howard S. Edidin, Martin Abbott, Leonid Ganeline and Ashwin Prabhu for the support in this program.
  • And special thanks to all my blog readers, friends and of course to BizTalk and Azure/Integration Community – there are so many that I don’t want to mention names so I don’t take the risk to forget someone.

Finally, my wife Fernanda, the kids Leonor and Laura (for all the “confusion and madness” they bring into my life), and to all members of my beautiful family… THANKS for all the support during this last years!

It’s a big honor to be in the program and I’m looking forward to another great year!

In my native language (Portuguese):

Obrigado Microsoft para outro maravilhoso início de Ano Novo. Estou muito feliz por poder partilhar com todos vocês que fui renomeado Azure Microsoft Most Valuable Professional (MVP)

Esta é a sétima vez que recebo este prémio e como é normal nestas ocasiões, gostaria de agradecer a todos os leitores do meu blog, amigos, a todos os membros da comunidade. Também gostaria de agradecer a minha MVP Lead Cristina Herrero, a todas as pessoas da Microsoft em especial à equipa de produto do BizTalk e Azure (Jim Harrer, Mandi Ohlinger, Tord G. Nordahl, Dan Rosanova, Jon Fancey, Paolo Salvatori, Kevin-Lam and Jeff-Hollan), Microsoft Portugal (Paulo Mena, Luís Calado, Ivo Ramos, Ricardo Jesus, Pedro Santos entre outros), a todos os meus colegas de trabalho na DevScope – que equipa maravilhosa, a todos os meus colegas Microsoft Integration MVP’s e a todos os MVP’s Portugueses .

Eu também gostaria de fazer um agradecimento muito especial à minha linda mulher Fernanda, as minhas traquininhas Laura e Leonor (por toda a "confusão e loucura" que trazem à minha vida) e à minha linda família por todo o seu suporte nestes últimos anos.

É uma grande honra estar no programa e espero continuar a contribuir para a comunidade BizTalk, e integração no geral, e a merecer o reconhecimento.

First of all, Happy birthday BizTalk Server for your 16th birthday! For does you don’ remember, the first version of BizTalk Server was release 12/12/2000, Congratulations!!

Continuing with the topic of my last posts “Errors and Warnings, Causes and Solutions”, we will talk about an error that I face today using the BizTalk Server WCF adapter while trying to communicate with an external WCF service:

System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://<ip/host name>/<ServiceName>.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. —> System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)

— End of inner exception stack trace —

at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStreamAsyncResult.CompleteGetRequestStrea

BizTalk-WCF-Adapter-Unable-to-connect-to-the-remote-server

If this problem happens, it normally means that the IP address or host name specify in the URL exists but: it has no services listening on the specified port or there is a firewall stopping you.

However, I try to open the URL using the browser in the BizTalk machine and I was able to access without any problem, which means, it wasn’t a firewall problem and the service exist on that specific port.

CAUSES

Again, this type of problem normally means that the IP address or host name specify in the URL exists but:

  • It has no services listening on the specified port;
  • Or there is a firewall stopping you.

But… it also can be a proxy problem that may be blocking the access to the service! In fact, this was my problem.

SOLUTION

I will not address the first two possible causes here, instead I will focus in what was my problem, proxies, and how can you solve it.

On the HTTP Transport bindings of the WCF adapter there are several properties to control the proxy, like:

  • proxyAddress: A URI that specifies the address of the HTTP proxy. If useSystemWebProxy is true, this setting must be null. The default is null.
  • proxyAuthenticationSchema: Specifies the protocol used for authenticating client requests being processed by an HTTP proxy. The default is Anonymous.
  • bypassProxyOnLocal: A Boolean value that indicates whether to bypass the proxy server for local addresses. The default is false.

and others properties. But also, contains a very important property: useDefaultWebProxy – this is a Boolean value that specifies whether the machine-wide proxy settings are used rather than the user specific settings. The default is true.

BizTalk-WCF-Adapter-useDefaultWebProxy-true

But how can you know there is a proxy set on the server?

You can check this using one of this two option:

  • You can open Command Prompt (CMD) and type the following command:

reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | find /i "proxyserver"

BizTalk-WCF-Adapter-check-if-proxy-is-set

  • Or Open the Internet Explorer and click the Tools button.
    • Click on Internet Options and then click on the Connections tab.
    • Click “LAN settings”.

BizTalk-WCF-Adapter-check-if-proxy-is-set-in-internet-explorer

    • You can also click in “Advanced” to check more details

If you notice in the pictures there is a default proxy set in the server and there are some exceptions defined in the Internet Explorer, a few names and some IPs. One of this IP’s was in fact the IP of the machine that was hosting the service that I was trying to communicate.

In my case to solve the problem I just need to set the useDefaultWebProxy property in the HTTP transport bindings of my WCF port to false.

BizTalk-WCF-Adapter-useDefaultWebProxy-false

Being in The Netherland for the first time and provably inspired by the cold outside my hotel room, that discourages any "reasonable person" to walk in streets of Arnhem at night, let’s talk about another familiar problem that can occur in BizTalk Server. The error that I will address today is quite normal to appear when we are trying to apply Cumulative Updates (CU), and is probably transversal to all versions, in our BizTalk environment. I got it recently while I was trying to apply BizTalk Server 2013 R2 CU1:

Failed to stop service WINMGMT

Failed-to-stop-service-WINMGMT

Be aware that for example BizTalk Server Administration console relies on Windows Management Instrumentation (WMI); more specifically, the BizTalk WMI Provider (BTSWMIProvider.dll).

WMI runs as a service with the display name "Windows Management Instrumentation" and the service name "winmgmt". WMI runs automatically at system startup under the LocalSystem account. If WMI is not running, it automatically starts when the first management application or script requests connection to a WMI namespace.

CAUSES

I actually don’t know the reasons that sometimes this problem occurs. Maybe we don’t “force” to run the setup “as an administrator” or because some of the dependent services failed to stop for some specific reason.

Normally, the CU setup will try to stop all the necessary or required services before it started to install the updates. But sometimes, to successfully install some of the cumulative updates, you should manually stop some of the following services before you start the installation:

  • Enterprise Single Sign-On (SSO) (Service Name: ENTSSO)
  • IIS Admin Service (Service Name: IISADMIN)
  • Windows Management Instrumentation (Service Name: Winmgmt)

Note: To determine whether there are any WMI processes active, use Windows Task Manager. Or, run the tasklist command from the Command Prompt and check whether "WmiPrvSE.exe" exists.

SOLUTION

You can easily solve this problem by manually stopping the Windows Management Instrumentation service (Winmgmt):

  • Click Start, click All Programs, and then click Accessories.
  • Right-click Command prompt, and then click “Run as administrator”.
    • Or, in the Start Search box, type cmd, and then press CTRL+SHIFT+ENTER.
  • At a command prompt, enter “net stop winmgmt”.

Note: if you don’t open command prompt as administrator you may end receiving an “Access is denied” message.

Failed-to-stop-service-WINMGMT-cmd

Continuing with “Errors and Warnings, Causes and Solutions”, let’s talk today about a classic (and annoying) one:

“Error 87 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Error 88 at Microsoft.BizTalk.Gac.Fusion.IAssemblyCache.InstallAssembly(AssemblyCacheInstallFlag flags, String manifestFilePath, IntPtr referenceData)

at Microsoft.BizTalk.Gac.Gac.InstallAssembly(String assemblyPathname, Boolean force)

at Microsoft.BizTalk.Deployment.BizTalkAssembly.GacInstall(String assemblyLocation)

at Microsoft.BizTalk.Deployment.BizTalkAssembly.PrivateDeploy(String server, String database, String assemblyPathname, String applicationName)

at Microsoft.BizTalk.Deployment.BizTalkAssembly.Deploy(Boolean redeploy, String server, String database, String assemblyPathname, String group, String applicationName, ApplicationLog log)

Error 89 Unspecified exception: "

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Error 90 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Error 91 Failed to add resource(s). Change requests failed for some resources. BizTalkAssemblyResourceManager failed to complete end type change request. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Error 93 Assembly "<name of the assembley>, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6d6ddb8f4f8e0e50" references the following assemblies that must be deployed before deploying this assembly:

Assembly "<name of the assembley>, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6d6ddb8f4f8e0e50"

Error 94  Deploy operation failed.

""

Assembly "<name of the assembley>, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6d6ddb8f4f8e0e50" references the following assemblies that must be deployed before deploying this assembly:

Assembly "<name of the assembley>, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6d6ddb8f4f8e0e50"”

Visual-Studio-BizTalk-Solution-Deploy-Access-denied

while trying to deploy from Visual Studio a BizTalk solution.

This is actually very common in the recent versions of BizTalk Server, special because some additional securities setting present in recent Windows Server versions.

CAUSES

There are several possible causes for you to get access denied errors when deploying BizTalk solutions directly from Visual Studio. Here are some of the most common causes that you need to take in consideration and check for:

  • You are not a local Administrator: make sure you have administrator rights on the BizTalk server, this is required because BizTalk assemblies needs to be deployed into GAC;
  • You don’t have the right BizTalk privileges to deploy artifacts: Make sure the user account that is trying to deploy the Visual Studio BizTalk Solution is member of:
    • BizTalk Server Administrators group
    • And also, member of SSO Administrators or SSO Affiliate Administrators group

This is required because BizTalk artifacts needs to be “registered” in BizTalk databases and these memberships should grant you the required access to the databases;

  • Visual Studio BizTalk Deployment properties are incorrect: Visual Studio use the setting present in Deployment tab of each BizTalk project present in the visual studio solution to correctly deploy the artifacts (dlls). You should verify that your deployment configurations are correct by right-clicking the project in Visual Studio, selecting “Properties” and then click the Deployment tab. The most important properties that you need to check should be “Configuration Database” and “Server”, validate if they are what you expect them to be, and you should also check the “Application Name” property. Check more about Deployment Properties here: How to Set Deployment Properties in Visual Studio;
  • You are not running Visual Studio as administrator: If you have UAC activate, or sometimes even disactivated, there are some additional securities setting present in recent Windows Server versions that, by default, doesn’t run Visual Studio with elevate permissions. Again, this is required because BizTalk assemblies needs to be deployed into GAC;
  • Some process is locking the files: in some situations, some other processes, other Visual Studios or BizTalk Host Instances, may have a lock on the file(s) you are trying to replace, in these cases, stopping or restarting these services before deploying the solution should help.
SOLUTIONS

In the causes, I already described the basic steps to solve this error based on the situation you are in, so I will not address in detail here all the possible solution. In my case, and I think that is the most common situation, was that, despite having disabled the UAC, I was running the Visual Studio without elevate permissions.

There are several ways to solve this problem (running Visual Studio with elevate permissions), the simple way of course is to:

  • On the Start screen, type Visual Studio.
  • Right-click under Visual Studio and choose “Run as administrator” option.

Visual-Studio-run-as-administrator-Access-denied

The problem of this approach is that I need to remember myself to do it whenever I want to run Visual Studio, otherwise, the next time it will fail again with the same error.

To resolve once and for all, you can opt for two approaches:

  • Option one:
    • Access to the devenv.exe file on the file system, for example: “C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE”
    • Right-click devenv.exe and select "Troubleshoot compatibility".

Visual-Studio-Troubleshoot-compatibility

    • On the “Select troubleshooting option” page, select "Troubleshoot compatibility" option.

Visual-Studio-Troubleshoot-compatibility-option

    • On the “What problems do you notice?” page, select the "The program requires additional permissions" option and then click “Next”

Visual-Studio-Troubleshoot-compatibility-problem-notice

    • On the “Test compatibility settings for the progem” page, click "Test the program…", wait for the program to launch and then click "Next".
    • Select "Yes, save these settings for this program"
    • and then click "Close"
  • Option two:
    • Right click the Visual Studio icon and select “Properties” option
    • On the Visual Studio … Properties windows select the “Shortcut” tab and then click “Advanced…” button
    • On the “Advanced Properties” window, check “Run as administrator” option and then click “OK”

Visual-Studio-run-as-administrator-advance-properties

    • Back to the Visual Studio … Properties windows, click “OK”

Today I’m returning to one of my favorites topics … no not transformations, this time is all about “Errors and Warnings, Causes and Solutions”.

Today I encountered the following issue when I was trying to connect to a remove SQL Server database:

“The local MS DTC detected that the MS DTC on <server name> has the same unique identity as the local MS DTC. This means that the two MS DTC will not be able to communicate with each other. This problem typically occurs if one of the systems were cloned using unsupported cloning tools. MS DTC requires that the systems be cloned using supported cloning tools such as SYSPREP. Running ‘msdtc -uninstall’ and then ‘msdtc -install’ from the command prompt will fix the problem. Note: Running ‘msdtc -uninstall’ will result in the system losing all MS DTC configuration information.”

MSDTC-has-the-same-unique-identity

CAUSE

The error message is quite lucid about the main reason of this error, this normally occurs when the machines are cloned: “systems be cloned using supported cloning tools such as SYSPREP.

SOLUTION

This is one of those very few cases that the error message will give us the actually cause of the problem and the solution: “Running ‘msdtc -uninstall’ and then ‘msdtc -install’ from the command prompt will fix the problem.”

So, to solve this problem you need to:

  • Click Start, and then click Command Prompt.
  • At the command prompt, type “msdtc -uninstall”, and then press ENTER.
  • At the command prompt, type “msdtc -install”, and then press ENTER.

Note: To perform this procedure, you must have membership in Administrators, or you must have been delegated the appropriate authority.

However, after I resolve this condition by uninstalling and then reinstalling the Microsoft Distributed Transaction Coordinator service (MSDTC), when I access the BizTalk Administration Console and try to refresh (F5) the Group Hub Page I got this additional error:

“The Microsoft Distributed Transaction Coordinator (MSDTC) may not be configured correctly. Ensure that the MSDTC service is running and DTC network access is allowed on the BizTalk, SQL and SSO Master servers. For more information, see "MSDTC Configuration settings required for BizTalk Server" in the BizTalk Server Help.”

MSDTC-may-not-be-configured-correctly

I try to restart the MSDTC service or other services like the Enterprise Single Sign-On Service without any success… to avoid spending more time around this issue, and because this was a DEV standalone machine, I decided to restart the server… and that did the trick, after the restart everything was working without any problem.

Microsoft announced on October 27, 2016 the release of Microsoft BizTalk Server 2016 – the 10th major release of BizTalk Server –and, as usual with previous versions, I updated my installation and configuration manual for BizTalk Server 2016. This whitepaper will explain in detail – a step-by-step guideline – how to install and configure Microsoft BizTalk Server 2016 on a standalone environment running Windows Server 2016. This information will help you plan the installation and configuration of BizTalk Server 2016, applications and components on which it depends focused on creating a development environment (you can also follow this tutorial to help you create production environments, however if this is the case you need to skip some steps).

BizTalk-Server-Installation-scenario

Assumptions and out of scope

It will be assumed that the operating system: Windows Server 2016 and latest critical Windows updates from Microsoft already have been installed.

In this scenario, it will be performed a full installation of Microsoft BizTalk Server 2016, with the exception of the deprecated SharePoint Adapter (SharePoint Services Service Side Object Model (SSOM)). The following components will be installed:

  • Enterprise Single Sign-On (SSO).
  • BizTalk Group.
  • BizTalk Runtime.
  • Business Rule Engine.
  • BAM Tools and Alerts.
  • BAM Portal.
  • BizTalk EDI/AS2 Runtime
  • Microsoft BizTalk Adapters for Enterprise Applications (BizTalk Adapter Pack)
What’s in store for you?

By reading this whitepaper, you will understand:

  • Important considerations before setting up BizTalk Server 2016
  • Prerequisites for installing BizTalk Server 2016
  • Step by step process of installing BizTalk Server 2016 on Windows Server 2016
  • Best ways in which you can optimize your BizTalk Server 2016 environment
  • Hardware and Software requirements
  • Basic Configuration vs. Custom Configuration

Installing-Configure-BizTalk-Server-2016-Standalone-Machine

Contents
  • BizTalk Server Installation scenario
    • Assumptions and out of scope
  • Important considerations before set up the server.
    • Join the Local Administrators Group.
    • Change the Machine name.
    • Turn off Internet Explorer Enhanced Security Configuration (optional)
    • Disable User Account Control (optional).
    • Turn Windows Firewall off (optional).
    • Configure the Application Event Log.
    • Configure Microsoft Distributed Transaction Coordinator (MS DTC).
    • Customize Taskbar and Start Menu Properties (optional).
    • Set the default browser.
    • Install Critical Windows Updates.
  • Preparing and install prerequisites for BizTalk Server 2016.
    • Important considerations before set up the servers.
    • Enable Internet Information Services.
      • Running the BAM Portal in a 64-bit Environment.
    • Install Windows Identity Foundation (WIF) (optional).
    • Install and configure SMTP Server Feature (optional)
      • Verify Your Installation
    • Install Microsoft Office Excel 2016 (optional).
      • Installing and configuring Office 2016 Deployment Tool
      • Installing Microsoft Office Excel 2016
    • Install Visual Studio 2015 (optional).
      • Remove Microsoft SQL Server Express.
    • Install SQL Server 2016.
    • Configure SQL Server Database Mail feature.
  • Install and configure BizTalk Server 2016.
    • Install BizTalk Server 2016.
      • Verify Your Installation.
    • Configure BizTalk Server.
      • Pin BizTalk Server Administration to taskbar.
    • Configure SQL Server Network Configuration protocols.
    • Validate Mail account used by BizTalk to send BAM Alerts.
    • Install BizTalk Adapter Pack
      • Microsoft BizTalk Adapter Pack and Microsoft BizTalk Adapter Pack (x64).
      • Steps to install BizTalk Adapter Pack.
      • Add adapters to BizTalk Administration Console.
    • Install Critical Windows Updates and BizTalk Server Cumulative Update Package.
    • Configure BizTalk Server SQL Jobs.
      • How to configure Backup BizTalk Server (BizTalkMgmtDb).
      • How to configure DTA Purge and Archive (BizTalkDTADb).
      • MessageBox_Message_Cleanup_BizTalkMsgBoxDb.
  • Optimize the BizTalk Server 2016 environment
    • Deleting BizTalk backup files.
      • Implementing a custom sp_DeleteBackupHistory.
      • Implementing a Maintenance Plan to clean BizTalk Database backup’s files.
    • Pre-allocate space and define auto-growth settings for BizTalk Server databases.
    • Configure BizTalk Server Windows Services.
    • Install and configure BizTalk Health Monitor.
      • How to register BizTalk Health Monitor Snap-In.
      • How to integrate BHM Snap-In into BizTalk Admin Console
    • Configure BizTalk Jobs History (Microsoft SQL Server Agent job history log).
      • To resize the job history log based on raw size.
    • Managing and cleaning BizTalk Server MarkLog database tables.
    • Configure host and Host instances.
      • What’s is Host, Host Instances and Adapter Handlers?.
      • Best practices to Configuring Hosts and Host Instances.
      • How can I automate this task?.
    • Power Mode.
    • Consider setting the ‘text in row’ table option to boost BizTalk Server Performance
      • How to exploit the Text in Row table option in BizTalk Server
  • Appendix A: Hardware and Software Requirements
  • Appendix B: Redistributable CAB Files
  • Appendix C: Basic Configuration vs. Custom Configuration

 

Download the whitepaper for free here: Installing BizTalk Server 2016 in a Standalone Machine

Installing-Configure-BizTalk-Server-2016-Standalone-Machine-vertical

If you are interest to see other version check the following posts:

 

I would like to take this opportunity also to say thanks to Lex Hegt for reviewing this whitepaper.

Download the whitepaper for free here: Installing BizTalk Server 2016 in a Standalone Machine