Testing a map with scripting functoid for getting config details form BTSNTsvc file

I have a map where I use external assembly scripting functoid which calls a helper function to get a SQL connection string.

image.png

Helper Function:

Helper

Now if you get this map from repository and after compiling it when you try to test this map you will get this error:

“An error occurred during a call to extension function ‘GetConnectionString’. See InnerException for a complete description of the error. GetConnectionString: Connection String setting not present in config file”

This is because configuration details from btsntsvc.config will be accessible only at runtime.

To test the map either the connection string details need to be put in devenv.config or you need to hard code the connection string to the C# helper method of external assembly.HardCodeAfter adding it there, compile the helper class and GAC it. Restart the visual studio before you test the map.

In case if you update the assembly then again you need to do the same GACing and restart of visual studio before you test your map.

Loved this? Spread the word


BizTalk Server Monitoring

Gautam

Follow me here

About the Author

My name is Gyanendra Kumar Gautam. I am Solution Consultant, who basically works to hook the stuff together using Microsoft technologies like Azure PaaS, Azure Serverless Services, Microsoft BizTalk Server, and Azure DevOps Services.

You may also like

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  1. Hi Gautam,

    I had encountered this issue while working on some POC and struggled for hours.
    Unfortunately didn’t found any help over internet as well, I thought that issue might be happening because I have not restarted BizTalk Host, so I restarted it multiple times with no luck and suddenly it clicked to me that while performing Test Map, BTSNTSvc.exe will not be invoked and it’s only happening under devenv.exe. and that’s how I reached this solution to add it in visual studio config file.

    Thanks for documenting this behavior.

    Regards,
    Prashant

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
turbo360

Never miss a good story!

 Subscribe to my blog to keep up with the latest news!