I have a DLL created by vb.net using the comclass template.
This Dll will be running in MTS on Windows NT4.
When testing the DLL from a stub EXE, the config file is located with the EXE.
Where should the app.config be located in a MTS environment?
And what is the app exe name?
Here is a code snippit:
Dim objNameValueCollection As NameValueCollection =
ConfigurationSettings.GetConfig(strHost)
strHost will be either 'EDS' or 'GPS' in this example.
Here is the config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="Gateway">
<section name="EDS" type="System.Configuration.NameValueSectionHandler " />
<section name="GPS" type="System.Configuration.NameValueSectionHandler " />
</sectionGroup>
</configSections>
<Gateway>
<EDS>
<add key="IPAddress" value = "127.0.0.1" />
<add key="Port" value = "8000" />
<add key="SendTimeOutSeconds" value = "10" />
<add key="RecvTimeOutSeconds" value = "10" />
<add key="RecvBufferSize" value = "3000" />
<add key="ConnectRetrys" value = "5" />
<add key="ConnectRetrySleepMilliseconds" value = "1000" />
</EDS>
<GPS>
<add key="IPAddress" value = "127.0.0.1" />
<add key="Port" value = "8000" />
<add key="SendTimeOutSeconds" value = "10" />
<add key="RecvTimeOutSeconds" value = "10" />
<add key="RecvBufferSize" value = "3000" />
<add key="ConnectRetrys" value = "5" />
<add key="ConnectRetrySleepMilliseconds" value = "1000" />
</GPS>
</Gateway>
--
Thank You
Robert Hill 6 1713
No matter what you are building the highest level process in that domain
controls the config file. Having said that ... in general, COM+/MTS processes
are best served from a known location rather than attempt to use the .NET
config file. There may be a way around this, but technically you are in the
COM world when you start playing around with component services. As such, you
are playing, at least in part, by COM rules.
If someone knows an exception to my understanding, please post. I would love
to learn some new tricks.
---
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"RobertHillEDS" wrote: I have a DLL created by vb.net using the comclass template. This Dll will be running in MTS on Windows NT4.
When testing the DLL from a stub EXE, the config file is located with the EXE.
Where should the app.config be located in a MTS environment? And what is the app exe name?
Here is a code snippit: Dim objNameValueCollection As NameValueCollection = ConfigurationSettings.GetConfig(strHost)
strHost will be either 'EDS' or 'GPS' in this example.
Here is the config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="Gateway"> <section name="EDS" type="System.Configuration.NameValueSectionHandler " /> <section name="GPS" type="System.Configuration.NameValueSectionHandler " /> </sectionGroup> </configSections>
<Gateway> <EDS> <add key="IPAddress" value = "127.0.0.1" /> <add key="Port" value = "8000" /> <add key="SendTimeOutSeconds" value = "10" /> <add key="RecvTimeOutSeconds" value = "10" /> <add key="RecvBufferSize" value = "3000" /> <add key="ConnectRetrys" value = "5" /> <add key="ConnectRetrySleepMilliseconds" value = "1000" /> </EDS> <GPS> <add key="IPAddress" value = "127.0.0.1" /> <add key="Port" value = "8000" /> <add key="SendTimeOutSeconds" value = "10" /> <add key="RecvTimeOutSeconds" value = "10" /> <add key="RecvBufferSize" value = "3000" /> <add key="ConnectRetrys" value = "5" /> <add key="ConnectRetrySleepMilliseconds" value = "1000" /> </GPS>
</Gateway>
-- Thank You Robert Hill
The reason I am looking to use the app.config .net functionality is because
it is my understanding that .net will read the values on the first reference.
The values are then cached for future use. I wish to avoid reading the
config file or a database on every call of this DLL. This is going to be a
Sockets DLL with a somewhat high volume of activity.
Thanks for the input.
Robert Hill
"Cowboy (Gregory A. Beamer) - MVP" wrote: No matter what you are building the highest level process in that domain controls the config file. Having said that ... in general, COM+/MTS processes are best served from a known location rather than attempt to use the .NET config file. There may be a way around this, but technically you are in the COM world when you start playing around with component services. As such, you are playing, at least in part, by COM rules.
If someone knows an exception to my understanding, please post. I would love to learn some new tricks.
---
Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA
*************************** Think Outside the Box! ***************************
"RobertHillEDS" wrote:
I have a DLL created by vb.net using the comclass template. This Dll will be running in MTS on Windows NT4.
When testing the DLL from a stub EXE, the config file is located with the EXE.
Where should the app.config be located in a MTS environment? And what is the app exe name?
Here is a code snippit: Dim objNameValueCollection As NameValueCollection = ConfigurationSettings.GetConfig(strHost)
strHost will be either 'EDS' or 'GPS' in this example.
Here is the config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="Gateway"> <section name="EDS" type="System.Configuration.NameValueSectionHandler " /> <section name="GPS" type="System.Configuration.NameValueSectionHandler " /> </sectionGroup> </configSections>
<Gateway> <EDS> <add key="IPAddress" value = "127.0.0.1" /> <add key="Port" value = "8000" /> <add key="SendTimeOutSeconds" value = "10" /> <add key="RecvTimeOutSeconds" value = "10" /> <add key="RecvBufferSize" value = "3000" /> <add key="ConnectRetrys" value = "5" /> <add key="ConnectRetrySleepMilliseconds" value = "1000" /> </EDS> <GPS> <add key="IPAddress" value = "127.0.0.1" /> <add key="Port" value = "8000" /> <add key="SendTimeOutSeconds" value = "10" /> <add key="RecvTimeOutSeconds" value = "10" /> <add key="RecvBufferSize" value = "3000" /> <add key="ConnectRetrys" value = "5" /> <add key="ConnectRetrySleepMilliseconds" value = "1000" /> </GPS>
</Gateway>
-- Thank You Robert Hill
Thanks for Gregory's quick response!
Hi Robert,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to know where to put the
config file for the DLL when you're using it from an MTS on NT4. If there
is any misunderstanding, please feel free to let me know.
As far as I know, only an EXE uses config file to store data, DLL doesn't
have a config file. If you're referring to the .config file for the caller,
I think it has to be in the same directory as the EXE.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Thanks for Gregory's quick response!
Hi Robert,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to know where to put the
config file for the DLL when you're using it from an MTS on NT4. If there
is any misunderstanding, please feel free to let me know.
As far as I know, only an EXE uses config file to store data, DLL doesn't
have a config file. If you're referring to the .config file for the caller,
I think it has to be in the same directory as the EXE.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
When calling a .net program from a DLL within MTS, the .net app config file
will be located with the MTX.EXE program. And its name will be
MTX.EXE.CONFIG. This location on our server was WINDOWS/SYSTEM32.
Robert.
"Kevin Yu [MSFT]" wrote: Thanks for Gregory's quick response!
Hi Robert,
First of all, I would like to confirm my understanding of your issue. From your description, I understand that you need to know where to put the config file for the DLL when you're using it from an MTS on NT4. If there is any misunderstanding, please feel free to let me know.
As far as I know, only an EXE uses config file to store data, DLL doesn't have a config file. If you're referring to the .config file for the caller, I think it has to be in the same directory as the EXE.
Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights."
Hi Robert,
Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights." This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Cui |
last post by:
Hello,
I make an application in ASP.NET (using VB.NET and some web services). For
my needs, I use also the SQL DMO library (with the SQL DMO.interop assembly)
and the Microsoft Web UI controls...
|
by: bbdobuddy |
last post by:
Hi,
How do I open a Microsoft Access 2003 form from Visual Basic.net
Thanks in advance
bbdobuddy
|
by: RobertHillEDS |
last post by:
I have a DLL created by vb.net using the comclass template.
This Dll will be running in MTS on Windows NT4.
When testing the DLL from a stub EXE, the config file is located with the EXE.
Where...
|
by: Laura Papez |
last post by:
(note: orginally posted to the dotnet.framework.webservices.enhancements
folks - thought this group may have more experience in this area. Ta, Laura.)
Hi,
I have created a secure Web Service...
|
by: Joseph Geretz |
last post by:
I've been using the following (client-side) configuration block to allow
WSE/DIME transfer of files larger than 4 meg:
<messaging>
<maxRequestLength>-1</maxRequestLength>
</messaging>
(Of...
|
by: Joseph Geretz |
last post by:
I need to download a greater than 4 megabyte attachment via WSE / DIME. The
only way I know how to configure this is via a .config file. Normally, the
..config file is the same name as the base...
|
by: SuperJason |
last post by:
We have a web application that uses 2 different virtual directories.
- The first is an ASP.NET application that has web services that can be used
to authenticate various clients.
- The second is...
|
by: prabu.girirajan |
last post by:
Hi,
I have a web application which internally calls certain web methods of
a web service. This web service has a interop to ATL COM Component and
that ATL component calls a .NET assembly.
I would...
|
by: iprogram2008 |
last post by:
I have a huge complex app.config and one of the sections in the config is connection strings.
I have a dot net class that uses this app.config and a com interop is generated for this dot net class....
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |