BizTalk Server General - Deploying BizTalk 2006 MSI: Configuration file issue

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > June 2006 > Deploying BizTalk 2006 MSI: Configuration file issue





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Deploying BizTalk 2006 MSI: Configuration file issue
Milan Bobde

2006-06-07, 7:18 pm

Hi,
Situation:
My BizTalk solution had BizTalk components along with some Dll's. I also
have a config file used by Dll's. I have added it as one of the resource. The
destination path for this resource file is
"%BTAD_InstallDir%\My.ConfigFile.xml".

Question: how can I know the path where this application is installed? I
need that path to access that configuration file. So, basically while
creating my Dll's, I need a way to reach the My.ConfigFile.xml destination
path without hard coding it.

Thanks in Advance,
Milan

Doug Girard [MSFT]

2006-06-08, 7:18 pm

Can you elaborate on your scenario?

Are you calling a post-processing script and looking to gain access to the
My.ConfigFile.xml? If so, can you have this script be written to the same
directory and just reference the file locally?
string configPathName =
Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
, "MyConfigFile.xml"); // or something similar

If I'm missing something, please explain more about what you are looking to
do.

Regards,
Doug Girard [MSFT]

Note: This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>Thread-Topic: Deploying BizTalk 2006 MSI: Configuration file issue
>thread-index: AcaKhWjuI5dt9eb1QhGMeVqsdOm5rw==
>X-WBNR-Posting-Host: 12.170.224.254
>From: =?Utf-8?B?TWlsYW4gQm9iZGU=?= <Milan Bobde@discussions.microsoft.com>
>Subject: Deploying BizTalk 2006 MSI: Configuration file issue
>Date: Wed, 7 Jun 2006 15:55:02 -0700
>Lines: 15
>Message-ID: <84343558-9BB3-4C3D-9020-DE627AA92C31@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.1830
>Newsgroups: microsoft.public.biztalk.general
>Path: TK2MSFTNGXA01.phx.gbl
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.biztalk.general:38137
>NNTP-Posting-Host: TK2MSFTNGXA01.phx.gbl 10.40.2.250
>X-Tomcat-NG: microsoft.public.biztalk.general
>
>Hi,
>Situation:
>My BizTalk solution had BizTalk components along with some Dll's. I also
>have a config file used by Dll's. I have added it as one of the resource.

The
>destination path for this resource file is
>"%BTAD_InstallDir%\My.ConfigFile.xml".
>
>Question: how can I know the path where this application is installed? I
>need that path to access that configuration file. So, basically while
>creating my Dll's, I need a way to reach the My.ConfigFile.xml destination
>path without hard coding it.
>
>Thanks in Advance,
>Milan
>
>


Milan Bobde

2006-06-08, 7:18 pm

Hi Doug,

My BizTalk solution has a configuration file. This file has details other
than biztalk configuration like user credentials, types of loads etc. The
dll's, which I have added as resources to this biztalk application from MMC
need to access this file to get the configuration information. Where this
Myconfig.XML lands up is driven by where the user installs it. So, if the
user installs it at c:\MyApp, the dll should look for path
c:\MyApp\Myconfig.xml and if the user installs it at c:\Program
Files\BizTalk, it should look at path c:\program Files\BizTalk\MyConfig.xml.

This is not required duing installation at all. This is required while the
application is running. For ex, when the orchestration kicks in, it calls the
methods in dll and the those methods need this configuration file. The way it
is done now is in the method, path is hard coded and when I install using the
MSI, I install it at the same path only.

I did try similar to what you said, but the path returned by the
GetAssembly.Location() returned me c:\windows\assembly\GAC_****\ which is not
useful.

-Milan
"Doug Girard [MSFT]" wrote:

> Can you elaborate on your scenario?
>
> Are you calling a post-processing script and looking to gain access to the
> My.ConfigFile.xml? If so, can you have this script be written to the same
> directory and just reference the file locally?
> string configPathName =
> Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
> , "MyConfigFile.xml"); // or something similar
>
> If I'm missing something, please explain more about what you are looking to
> do.
>
> Regards,
> Doug Girard [MSFT]
>
> Note: This posting is provided "AS IS" with no warranties, and confers no
> rights.
> --------------------
> The
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com