Re: BizTalk 2004 Configuration Data

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Michael (Michael_at_xyzzy.com)
Date: 06/11/04


Date: Fri, 11 Jun 2004 17:25:13 -0400

Larry,

Thanks for your help and pointers. I managed to get this to work and
have the following observations:

1) It's complicated to get it setup. Mis-configuration can cause
BizTalk to die with errors such as:

Error message: Exception has been thrown by the target of an
invocation.
Error source: mscorlib

2) It appears that the pattern assignment rules control which
orchestration assemblies are loaded into application domains - not my
custom assemblies. So what this means is that while I can have a
specific and custom configuration file for an app domain I must
specify a pattern for each orchestration that calls the custom .NET
assembly that needs the configuration. I tried specifying * for the
AssemblyNamePattern but BizTalk died with:

Error message: parsing "*" - Quantifier {x,y} following nothing.
Parameter name: *
Error source: System

3) Given all of this, it is MUCH easier just to add an <appSettings>
section to BTSNTSvc.exe.config and be done with it. If that seems
like it may conflict then its still a lot easier to just add a custom
configuration section with:

<configSections>
      <section name="myDLLSettings"
               type="System.Configuration.SingleTagSectionHandler" />
</configSections>
<myDLLSettings config1="value1", config2="value2" />

-- Michael

On Thu, 10 Jun 2004 17:09:00 GMT, larryfr@online.microsoft.com ("larry
franks") wrote:

>Ok, just found out the recommended way to do this Edwin. If you do a
>search in the online documentation on "app domains" you'll find a section
>that describes the btsntsvc.exe.config file. There's a section named
>"Example: Appdomain Configuration" that has an example of modifying this
>config file to create dummy app domains for the dll's that are called from
>within the orchestration. This way you end up with a specific .config file
>for your component.
>
>Let me know if you have any questions on this.
>
>Larry Franks
>
>This posting is provided "AS IS" with no warranties,and confers no rights.
>Subscribe at
>http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
>&SD=msdn
>--------------------
>| Newsgroups: microsoft.public.biztalk.general
>| From: larryfr@online.microsoft.com ("larry franks")
>| Organization: Microsoft
>| Date: Thu, 10 Jun 2004 16:55:32 GMT
>| Subject: Re: BizTalk 2004 Configuration Data
>| X-Tomcat-NG: microsoft.public.biztalk.general
>| MIME-Version: 1.0
>| Content-Type: text/plain
>| Content-Transfer-Encoding: 7bit
>|
>| Yep, I got this also. My only concern is whether this has been tested by
>| the development group. I'll see if I can find out the supportability of
>| using this for custom component configuration and post back here.
>|
>| Larry Franks
>|
>| This posting is provided "AS IS" with no warranties,and confers no
>rights.
>| Subscribe at
>|
>http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
>| &SD=msdn
>| --------------------
>| | Thread-Topic: BizTalk 2004 Configuration Data
>| | thread-index: AcRO+9tewZdzARU/R7q7/UswUDLLBg==
>| | X-WBNR-Posting-Host: 12.109.138.194
>| | From: "=?Utf-8?B?RWR3aW4gS2luZw==?=" <Edwin
>| King@discussions.microsoft.com>
>| | References: <d46ec017qmvvqfin79ssns3dj0big4l9ln@4ax.com>
>| <uMyS5MkTEHA.308@cpmsftngxa10.phx.gbl>
>| <nmoec0t2gjmncpngp0to29n6ghhfbofoeo@4ax.com>
>| <Wib84rmTEHA.308@cpmsftngxa10.phx.gbl>
>| | Subject: Re: BizTalk 2004 Configuration Data
>| | Date: Thu, 10 Jun 2004 08:01:49 -0700
>| | Lines: 128
>| | Message-ID: <6245F702-E858-4B09-A74B-D96E5074EF76@microsoft.com>
>| | MIME-Version: 1.0
>| | Content-Type: text/plain;
>| | charset="Utf-8"
>| | Content-Transfer-Encoding: 7bit
>| | X-Newsreader: Microsoft CDO for Windows 2000
>| | Content-Class: urn:content-classes:message
>| | Importance: normal
>| | Priority: normal
>| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>| | Newsgroups: microsoft.public.biztalk.general
>| | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
>| | Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
>| | Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:16109
>| | X-Tomcat-NG: microsoft.public.biztalk.general
>| |
>| | The config file for BT 2004 is : BTSNTSvc.exe.config in the
>installation
>| dir.
>| | I've added and accessed appSettings to/from this file with no issues
>(so
>| far ;)
>| |
>| | HTH,
>| |
>| | Edwin King
>| |
>| | ""larry franks"" wrote:
>| |
>| | > From an old mail I found here it looks like you should be able to
>look
>| at
>| | > two properties on AppDomain.CurrentDomain.SetupInformation in this
>| project
>| | > to find where and what it's looking for. The two properties being
>| | > ApplicationBase (the directory it looks in,) and ConfigurationFile
>(the
>| | > file it's looking for.) You'd need to log the values of those two
>| | > properties while the component is in use and then create a config
>file
>| | > there.
>| | >
>| | > From the customer issue I'm looking at thier component was looking
>for
>| | > \winnt\system32\dllhost.exe.config, they were able to add values to
>| that
>| | > and successufly read those in. For this issue it was when using
>| BizTalk
>| | > 2002 with a .net component inside XLANG, and I'm assuming the
>component
>| was
>| | > hosted as a com+ server application since it wanted a
>| dllhost.exe.config
>| | > file.
>| | >
>| | > I'll try setting something up here in the morning and see if I can
>get
>| this
>| | > working and post my results.
>| | >
>| | > Larry Franks
>| | >
>| | > This posting is provided "AS IS" with no warranties,and confers no
>| rights.
>| | > Subscribe at
>| | >
>|
>http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
>| | > &SD=msdn
>| | > --------------------
>| | > | From: Michael <Michael@xyzzy.com>
>| | > | Subject: Re: BizTalk 2004 Configuration Data
>| | > | Date: Wed, 09 Jun 2004 15:35:59 -0400
>| | > | Reply-To: Michael@xyzzy.com
>| | > | Message-ID: <nmoec0t2gjmncpngp0to29n6ghhfbofoeo@4ax.com>
>| | > | References: <d46ec017qmvvqfin79ssns3dj0big4l9ln@4ax.com>
>| | > <uMyS5MkTEHA.308@cpmsftngxa10.phx.gbl>
>| | > | X-Newsreader: Forte Agent 1.93/32.576 English (American)
>| | > | MIME-Version: 1.0
>| | > | Content-Type: text/plain; charset=us-ascii
>| | > | Content-Transfer-Encoding: 7bit
>| | > | Newsgroups: microsoft.public.biztalk.general
>| | > | NNTP-Posting-Host: pow229159.columbus.rr.com 204.210.229.159
>| | > | Lines: 1
>| | > | Path:
>| | >
>|
>cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
>| | > .phx.gbl
>| | > | Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:16075
>| | > | X-Tomcat-NG: microsoft.public.biztalk.general
>| | > |
>| | > | Larry,
>| | > |
>| | > | Humm ... I have a DLL here. I thought app.config only went with EXE
>| | > | files.
>| | > |
>| | > | I did try it though - Visual Studio doesn't create mydll.dll.config
>in
>| | > | the bin directory when I build. Is there something I am missing?
>| | > |
>| | > | Michael
>| | > |
>| | > | On Wed, 09 Jun 2004 16:59:51 GMT, larryfr@online.microsoft.com
>("larry
>| | > | franks") wrote:
>| | > |
>| | > | >Hi Michael, I'd recommend using an app.config file for your
>| component
>| | > for
>| | > | >something like this. This would give you a place to store
>settings
>| | > | >specifically for this component.
>| | > | >
>| | > | >Larry Franks
>| | > | >
>| | > | >This posting is provided "AS IS" with no warranties,and confers no
>| | > rights.
>| | > | >Subscribe at
>| | > |
>| | >
>|
>>http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
>| | > p
>| | > | >&SD=msdn
>| | > | >--------------------
>| | > | >| From: Michael <Michael@xyzzy.com>
>| | > | >| Subject: BizTalk 2004 Configuration Data
>| | > | >| Date: Wed, 09 Jun 2004 10:13:45 -0400
>| | > | >| Reply-To: Michael@xyzzy.com
>| | > | >| Message-ID: <d46ec017qmvvqfin79ssns3dj0big4l9ln@4ax.com>
>| | > | >| X-Newsreader: Forte Agent 1.93/32.576 English (American)
>| | > | >| MIME-Version: 1.0
>| | > | >| Content-Type: text/plain; charset=us-ascii
>| | > | >| Content-Transfer-Encoding: 7bit
>| | > | >| Newsgroups: microsoft.public.biztalk.general
>| | > | >| NNTP-Posting-Host: pow229159.columbus.rr.com 204.210.229.159
>| | > | >| Lines: 1
>| | > | >| Path:
>| | > |
>| | >
>|
>>cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP1
>| | > 0
>| | > | >phx.gbl
>| | > | >| Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:16054
>| | > | >| X-Tomcat-NG: microsoft.public.biztalk.general
>| | > | >|
>| | > | >| Hello All,
>| | > | >|
>| | > | >| I have a .NET class that I am calling from an Expression shape
>in
>| an
>| | > | >| orchestration. I am trying to figure out what is the best way
>to
>| pass
>| | > | >| configuration information into the class.
>| | > | >|
>| | > | >| For example, I need to pass in elements of a database connection
>| | > | >| string which will be different if we are running in a test or
>| | > | >| production environment. So I need to make this configurable.
>| | > | >|
>| | > | >| I am looking into building a custom adapter and using port
>| | > | >| configuration but that seems like overkill for what I want to do
>at
>| | > | >| this point.
>| | > | >|
>| | > | >| I can read a config file or something like that but I was
>| wondering if
>| | > | >| there is a better way or if there is an existing config file
>that I
>| | > | >| can use as part of the deployment.
>| | > | >|
>| | > | >| All suggestions greatly appreciated!
>| | > | >|
>| | > | >| Michael
>| | > | >|
>| | > |
>| | > |
>| | >
>| | >
>| |
>|



Relevant Pages

  • RE: Custom Configuration - dll
    ... can not correctly find the assembly for your custom configuration section. ... #How the Runtime Locates Assemblies ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.general)
  • RE: some config error happens periodically only
    ... Open microsoft .net configuration wizard ... and look under configured assemblies->view configured assemblies for any ... custom redirection for the assembly in the log file. ... An error occurred during the processing of a configuration file ...
    (microsoft.public.dotnet.framework)
  • Incorrect Server Error in config file
    ... server I can browse to testpage.htm, ... It says my config file says this: ... The current custom ... configuration file located in the root directory of the current web ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: External file configuration
    ... Yes, I suppose it could be done by implementing Provider pattern, but I was ... I would like to have separate .config file just for that assembly, ... Also, prevously, when I used Enterprise Library, Configuration ... reusable assemblies which rely on configuration which is of no concern to ...
    (microsoft.public.dotnet.general)
  • Re: Incorrect Server Error in config file
    ... It says my config file says this: ... You can always change it to your current configuration once you, ... server I can browse to testpage.htm, ... custom errors in the config file. ...
    (microsoft.public.dotnet.framework.aspnet)