<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:36:47 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-422] Unable to connect to server localhost:27017: Configuration system failed to initialize.</title>
                <link>https://jira.mongodb.org/browse/CSHARP-422</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;string connectionString = &quot;mongodb://localhost:27017&quot;; &lt;br/&gt;
            MongoServer mongo = MongoServer.Create(connectionString);&lt;br/&gt;
            mongo.Connect();  //*******here i am getting error.&lt;br/&gt;
MongoDatabase database = mongo.GetDatabase(&quot;MyDB&quot;);&lt;br/&gt;
            MongoCollection MyData = database.GetCollection&amp;lt;BsonDocument&amp;gt;(&quot;users&quot;);&lt;br/&gt;
            BsonDocument Data = new BsonDocument { &lt;/p&gt;
{ &quot;firstname&quot;, &quot;Rick&quot; }
&lt;p&gt; };&lt;/p&gt;

&lt;p&gt;            MyData.Insert(Data);&lt;br/&gt;
            button1.Text = &quot;Data Inserted&quot;;&lt;br/&gt;
            mongo.Disconnect(); &lt;/p&gt;</description>
                <environment></environment>
        <key id="35074">CSHARP-422</key>
            <summary>Unable to connect to server localhost:27017: Configuration system failed to initialize.</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="mahendar.gunda">mahendar.gunda</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Mar 2012 07:47:54 +0000</created>
                <updated>Thu, 20 Mar 2014 16:39:15 +0000</updated>
                            <resolved>Thu, 12 Apr 2012 13:48:18 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="109090" author="rstam" created="Thu, 12 Apr 2012 13:48:18 +0000"  >&lt;p&gt;Appears to be an issue with the user&apos;s config file and not with the C# driver.&lt;/p&gt;</comment>
                            <comment id="107949" author="rstam" created="Mon, 9 Apr 2012 18:43:27 +0000"  >&lt;p&gt;I am assuming the problem was in your config file.&lt;/p&gt;

&lt;p&gt;In the absence of any further feedback this bug will be closed in the next few days.&lt;/p&gt;</comment>
                            <comment id="105750" author="rstam" created="Mon, 2 Apr 2012 17:02:29 +0000"  >&lt;p&gt;I am able to get the same stack trace by putting invalid entries into my App.config file.&lt;/p&gt;

&lt;p&gt;Please check your config file, as that is where the problem likely lies.&lt;/p&gt;

&lt;p&gt;I would also warn you against calling server.Disconnect as it interferes with connection pooling. Calling Connect is also not necessary (the driver connects automatically) but is harmless, unlike Disconnect which is problematic.&lt;/p&gt;</comment>
                            <comment id="105624" author="mahendar.gunda" created="Mon, 2 Apr 2012 10:48:36 +0000"  >&lt;p&gt;MongoDB.Driver.MongoConnectionException was unhandled&lt;br/&gt;
  Message=Unable to connect to server localhost:27017: Configuration system failed to initialize.&lt;br/&gt;
  Source=MongoDB.Driver&lt;br/&gt;
  StackTrace:&lt;br/&gt;
       at MongoDB.Driver.Internal.DirectConnector.Connect(TimeSpan timeout)&lt;br/&gt;
       at MongoDB.Driver.MongoServer.Connect(TimeSpan timeout, ConnectWaitFor waitFor)&lt;br/&gt;
       at MongoDB.Driver.MongoServer.Connect(ConnectWaitFor waitFor)&lt;br/&gt;
       at MongoDB.Driver.MongoServer.ChooseServerInstance(Boolean slaveOk)&lt;br/&gt;
       at MongoDB.Driver.MongoServer.AcquireConnection(MongoDatabase database, Boolean slaveOk)&lt;br/&gt;
       at MongoDB.Driver.MongoCollection.InsertBatch(Type nominalType, IEnumerable documents, MongoInsertOptions options)&lt;br/&gt;
       at MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object document, MongoInsertOptions options)&lt;br/&gt;
       at MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object document)&lt;br/&gt;
       at MongoDB.Driver.MongoCollection.Insert&lt;span class=&quot;error&quot;&gt;&amp;#91;TNominalType&amp;#93;&lt;/span&gt;(TNominalType document)&lt;br/&gt;
       at mongoDB_project.Form1.button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\mgunda\my documents\visual studio 2010\Projects\mongoDB_project\mongoDB_project\Form1.cs:line 79&lt;br/&gt;
       at System.Windows.Forms.Control.OnClick(EventArgs e)&lt;br/&gt;
       at System.Windows.Forms.Button.OnClick(EventArgs e)&lt;br/&gt;
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)&lt;br/&gt;
       at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)&lt;br/&gt;
       at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;br/&gt;
       at System.Windows.Forms.ButtonBase.WndProc(Message&amp;amp; m)&lt;br/&gt;
       at System.Windows.Forms.Button.WndProc(Message&amp;amp; m)&lt;br/&gt;
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)&lt;br/&gt;
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)&lt;br/&gt;
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;br/&gt;
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp;amp; msg)&lt;br/&gt;
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)&lt;br/&gt;
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)&lt;br/&gt;
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)&lt;br/&gt;
       at System.Windows.Forms.Application.Run(Form mainForm)&lt;br/&gt;
       at mongoDB_project.Program.Main() in c:\documents and settings\mgunda\my documents\visual studio 2010\Projects\mongoDB_project\mongoDB_project\Program.cs:line 18&lt;br/&gt;
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)&lt;br/&gt;
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)&lt;br/&gt;
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()&lt;br/&gt;
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)&lt;br/&gt;
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)&lt;br/&gt;
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;br/&gt;
       at System.Threading.ThreadHelper.ThreadStart()&lt;br/&gt;
  InnerException: System.Configuration.ConfigurationErrorsException&lt;br/&gt;
       Message=Configuration system failed to initialize&lt;br/&gt;
       Source=System.Configuration&lt;br/&gt;
       BareMessage=Configuration system failed to initialize&lt;br/&gt;
       Line=0&lt;br/&gt;
       StackTrace:&lt;br/&gt;
            at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)&lt;br/&gt;
            at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)&lt;br/&gt;
            at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)&lt;br/&gt;
            at System.Configuration.ConfigurationManager.GetSection(String sectionName)&lt;br/&gt;
            at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)&lt;br/&gt;
            at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()&lt;br/&gt;
            at System.Diagnostics.DiagnosticsConfiguration.Initialize()&lt;br/&gt;
            at System.Diagnostics.DiagnosticsConfiguration.get_Sources()&lt;br/&gt;
            at System.Diagnostics.TraceSource.Initialize()&lt;br/&gt;
            at System.Net.Logging.InitializeLogging()&lt;br/&gt;
            at System.Net.Logging.get_On()&lt;br/&gt;
            at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)&lt;br/&gt;
            at MongoDB.Driver.MongoServerAddress.ToIPEndPoint(AddressFamily addressFamily)&lt;br/&gt;
            at MongoDB.Driver.MongoServerInstance.GetIPEndPoint()&lt;br/&gt;
            at MongoDB.Driver.Internal.MongoConnection.Open()&lt;br/&gt;
            at MongoDB.Driver.Internal.MongoConnection.GetNetworkStream()&lt;br/&gt;
            at MongoDB.Driver.Internal.MongoConnection.SendMessage(MongoRequestMessage message, SafeMode safeMode)&lt;br/&gt;
            at MongoDB.Driver.Internal.MongoConnection.RunCommand(String collectionName, QueryFlags queryFlags, CommandDocument command, Boolean throwOnError)&lt;br/&gt;
            at MongoDB.Driver.MongoServerInstance.VerifyState(MongoConnection connection)&lt;br/&gt;
            at MongoDB.Driver.MongoServerInstance.Connect(Boolean slaveOk)&lt;br/&gt;
            at MongoDB.Driver.Internal.DirectConnector.Connect(TimeSpan timeout)&lt;br/&gt;
       InnerException: System.Configuration.ConfigurationErrorsException&lt;br/&gt;
            Message=Unrecognized configuration section ConfigurationManager. (C:\Documents and Settings\mgunda\my documents\visual studio 2010\Projects\mongoDB_project\mongoDB_project\bin\Debug\mongoDB_project.vshost.exe.Config line 3)&lt;br/&gt;
            Source=System.Configuration&lt;br/&gt;
            BareMessage=Unrecognized configuration section ConfigurationManager.&lt;br/&gt;
            Filename=C:\Documents and Settings\mgunda\my documents\visual studio 2010\Projects\mongoDB_project\mongoDB_project\bin\Debug\mongoDB_project.vshost.exe.Config&lt;br/&gt;
            Line=3&lt;br/&gt;
            StackTrace:&lt;br/&gt;
                 at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)&lt;br/&gt;
                 at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)&lt;br/&gt;
                 at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()&lt;br/&gt;
                 at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)&lt;br/&gt;
            InnerException: &lt;/p&gt;</comment>
                            <comment id="105150" author="rstam" created="Fri, 30 Mar 2012 13:51:20 +0000"  >&lt;p&gt;I did a web search for &quot;Configuration system failed to initialize&quot; and a common cause for that is an invalid App.config file.&lt;/p&gt;

&lt;p&gt;Can you attach your config file to the ticket?&lt;/p&gt;

&lt;p&gt;Also, can you provide a full stack trace so we can see where the particular exception is coming from?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrh7tr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14067</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>