Mapping problem accessing application config data


looking ways of accessing external strings biztalk maps without hard-coding them in map.  have found 2 work (using evar, , putting application setting in machine.config file), , researching third (using sso config database). but fourth method, using biztalk application config file, doesn't seem work, , don't understand why.
 
the application config solution should same the code uses machine.config, because understand process, when biztalk searches application configuration data, first search machine.config file in .net config folder, , search btsntsvc.exe.config file in application runtime installation directory.
 
i set map using simple custom functoid following code:
 
public string getconnectstring()
{
    string connectstring = system.configuration.configurationsettings.appsettings.get("mapbookconnectstring"); 
    return connectstring;
}
 
and have added following section machine.config file in c:\windows\microsoft.net\framework\v1.1.4322\config
 
    <appsettings>
            <add key="mapbookconnectstring" value="data source=ssps;initial catalog=mappingbook;trusted_connection=yes;" />
    </appsettings>
 
the fuction correctly returns connect string value appsettings entry mapbookconnectstring.  if remove machine.config file and place same appsetting information btntsvc.exe.config, returns null value.  note after making change, restarted biztalk host instance, , when did't work restarted service. 
 
the documentation on use of application configuration data confusing, , had great deal of difficulty finding out name , location of config file was.  perhaps have gotten file in wrong location?
 
oner note of interest when tested function, warning that "configurationsettings" obsolete.  couldn't updated object reference work.  possible there conflict because vm has version 2 of .net installed, but doesn't version 1 , 1.1 uninstalled?  i'm not sure how tell 1 being accessed.  when @ propertes of assemblies referenced in project (system, system.xml , forth) indicates pathname 2.0 version. 
 

 

this might not right place post query. forum biztalk edi/as2 discussion. below forum query related biztalk r2:

http://forums.microsoft.com/msdn/showforum.aspx?forumid=1470&siteid=1

 

 

 



BizTalk Server  >  BizTalk Server EDI and AS2



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'