none
Problem in fetching the values from the .Config file in COM+ RRS feed

  • Question

  • Hi,

    I have created a COM+ component using C#. in this i am fetching data from the SQL2000 database. the connection string is in the App.Config file. 

    problem:

    When i try to open the connection from COM+ component to perform any kind of operation i am getting the following error "The ConnectionString property has not been initialized."  I am working with the following

    OS: WindowsXP

    Language: C#

    .net 1.1

    third party tool : ORM.Net for dataAccess layer

    I have done the following things after registering the COM+ component.

    1.Have put all the dlls refered by the COM+ component in the GAC.

    2.I have put the .Config file in System32 folder along with the dllhost.exe so that the COM+ can recongnise it.

    3.In the Activation tab of the component, i have mentioned in the Application Root Directory text box with the directory in which my component's DLLs reside..

    4.I have created  a xml file called "application.manifest" and added this xml

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"></assembly>

    5. created a app.config. Named it "application.config" and fill it with the normal application settings.(ie; connectionstring);

    but still i am getting the above metioned error. if any one knows please give me the solution ASAP, its really important for me, as all the database transaction happens from this component.

    Regards & thanks

    Pramod

     

     

    Friday, June 30, 2006 6:25 AM

Answers

All replies

  • You allready asked the same question in post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=518161&SiteID=1 to which I also replied. If the reply is incorrect, please say so instead of starting a new thread on exactly the same issue.

    The config file in System32 should be 'dllhost.exe.config'. This is shared by all components.

    To use per application configuration file, place the 'application.config' & 'application.manifest' in a separate folder and set the 'Application Root Directory' of the component to that folder.

     

    Friday, June 30, 2006 9:57 AM
  • Silly question here but is the COM+ package set to be a server application or a library application.  The default being library which would of course make all of this stuff regarding the system32 folder and dllhost.exe.config irrelevant.

    Like I said it's a silly question so my apologies if this is not helpful.  I know you are still able to set the application root even when it's a library application which is a little misleading because you would of course be hosted within the running process making it that processes config file that you need to use.

    Monday, July 3, 2006 6:46 PM
  • Pramod

    The same question has been answered posted here and has been marked as 'answered'

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=515150&SiteID=1

    Can you either remove one of the post or also mark this question as answered?

    thx

    Thursday, July 6, 2006 7:15 AM