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 objNameValueCol lection As NameValueCollec tion =
ConfigurationSe ttings.GetConfi g(strHost)
strHost will be either 'EDS' or 'GPS' in this example.
Here is the config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<configSections >
<sectionGroup name="Gateway">
<section name="EDS" type="System.Co nfiguration.Nam eValueSectionHa ndler" />
<section name="GPS" type="System.Co nfiguration.Nam eValueSectionHa ndler" />
</sectionGroup>
</configSections>
<Gateway>
<EDS>
<add key="IPAddress" value = "127.0.0.1" />
<add key="Port" value = "8000" />
<add key="SendTimeOu tSeconds" value = "10" />
<add key="RecvTimeOu tSeconds" value = "10" />
<add key="RecvBuffer Size" value = "3000" />
<add key="ConnectRet rys" value = "5" />
<add key="ConnectRet rySleepMillisec onds" value = "1000" />
</EDS>
<GPS>
<add key="IPAddress" value = "127.0.0.1" />
<add key="Port" value = "8000" />
<add key="SendTimeOu tSeconds" value = "10" />
<add key="RecvTimeOu tSeconds" value = "10" />
<add key="RecvBuffer Size" value = "3000" />
<add key="ConnectRet rys" value = "5" />
<add key="ConnectRet rySleepMillisec onds" value = "1000" />
</GPS>
</Gateway>
--
Thank You
Robert Hill 6 1736
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!
*************** ************
"RobertHill EDS" 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 objNameValueCol lection As NameValueCollec tion = ConfigurationSe ttings.GetConfi g(strHost)
strHost will be either 'EDS' or 'GPS' in this example.
Here is the config file: <?xml version="1.0" encoding="utf-8" ?> <configuratio n> <configSections > <sectionGroup name="Gateway"> <section name="EDS" type="System.Co nfiguration.Nam eValueSectionHa ndler" /> <section name="GPS" type="System.Co nfiguration.Nam eValueSectionHa ndler" /> </sectionGroup> </configSections>
<Gateway> <EDS> <add key="IPAddress" value = "127.0.0.1" /> <add key="Port" value = "8000" /> <add key="SendTimeOu tSeconds" value = "10" /> <add key="RecvTimeOu tSeconds" value = "10" /> <add key="RecvBuffer Size" value = "3000" /> <add key="ConnectRet rys" value = "5" /> <add key="ConnectRet rySleepMillisec onds" value = "1000" /> </EDS> <GPS> <add key="IPAddress" value = "127.0.0.1" /> <add key="Port" value = "8000" /> <add key="SendTimeOu tSeconds" value = "10" /> <add key="RecvTimeOu tSeconds" value = "10" /> <add key="RecvBuffer Size" value = "3000" /> <add key="ConnectRet rys" value = "5" /> <add key="ConnectRet rySleepMillisec onds" 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! *************** ************
"RobertHill EDS" 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 objNameValueCol lection As NameValueCollec tion = ConfigurationSe ttings.GetConfi g(strHost)
strHost will be either 'EDS' or 'GPS' in this example.
Here is the config file: <?xml version="1.0" encoding="utf-8" ?> <configuratio n> <configSections > <sectionGroup name="Gateway"> <section name="EDS" type="System.Co nfiguration.Nam eValueSectionHa ndler" /> <section name="GPS" type="System.Co nfiguration.Nam eValueSectionHa ndler" /> </sectionGroup> </configSections>
<Gateway> <EDS> <add key="IPAddress" value = "127.0.0.1" /> <add key="Port" value = "8000" /> <add key="SendTimeOu tSeconds" value = "10" /> <add key="RecvTimeOu tSeconds" value = "10" /> <add key="RecvBuffer Size" value = "3000" /> <add key="ConnectRet rys" value = "5" /> <add key="ConnectRet rySleepMillisec onds" value = "1000" /> </EDS> <GPS> <add key="IPAddress" value = "127.0.0.1" /> <add key="Port" value = "8000" /> <add key="SendTimeOu tSeconds" value = "10" /> <add key="RecvTimeOu tSeconds" value = "10" /> <add key="RecvBuffer Size" value = "3000" /> <add key="ConnectRet rys" value = "5" /> <add key="ConnectRet rySleepMillisec onds" 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 misunderstandin g, 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 misunderstandin g, 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 misunderstandin g, 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 (in order to have the tree view, multi bar
controls).
When I make the compilation and the execution, I obtain then the next error:
"
|
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 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 =
|
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 via WSE with the use of WS-Policy. The
Web Service has been tested using a .NET client Console Application and
everything works.
However, the Web Service needs to be called from a VB6 application (running
|
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 course, I have a similar encoding on the Server. However, my question
relates to the client side.)
| |
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 application. I built a .NET driver
program to test this, NetBrokerDriver and provided a
NetBrokerDriver.exe.config file which specifies the following:
<messaging>
<maxRequestLength>-1</maxRequestLength>
</messaging>
|
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 simply an ASP application, that uses a .NET dll registered
for COM interop, so that it can talk to the other virtual directory.
The problem is that the .NET interop DLL we've been using for a long time,
now is breaking. On machines with .NET...
|
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 like to access a key value in the .NET assembly. I added this
to the Web.Config of the Web Service however it didnt read the value.
I also tried adding to the Web.config of the Web application however i
am faced with the same problem.
Am I...
|
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. I developed an unmanaged c++ app and it calls the com interop tlb. The problem I was getting was when I call from C++ the tlb I get an null reference exception at the following line in .NetClass:
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |