Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8267533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:34:00+00:00 2026-06-08T05:34:00+00:00

When I try to write in C# a connection to my app to my

  • 0

When I try to write in C# a connection to my app to my database, I build the application successfully in Visual Studio 2005 but when I run the site in debugger i get an error:

Exception Details: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 118.

Here is the connection code that is giving the error:

SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Server"].ConnectionString);

I have the connection string written correctly in my web.config, file so im clueless on what this remotely means. Im not sure if im missing anything. Any help appreciated. Here is my entire code for the section that might help:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Configuration;
using System.Data.SqlClient;

public partial class RateAnalyzerPage: System.Web.UI.Page
{
    protected void Search_Click(object sender, EventArgs e)
    {
        string IDnumber = mechantNumber.Text;
        string selectSQL = "SELECT FROM Authors Where MID='"+ IDnumber +"'";
   // SqlConnection con = new SqlConnection(@"Server="); 
    //SqlConnection con = new SqlConnection();
    SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Server"].ConnectionString);
    SqlDataReader reader;
    try
    {
        con.Open();
        SqlCommand cmd = new SqlCommand(selectSQL, con);
        reader = cmd.ExecuteReader();
        while (reader.Read())
        {
            QualVol.Text = reader["TotalVolume"].ToString();
        }
        reader.Close();
    }
    catch (Exception err)
    {

    }
    finally
    {
        con.Close();
    }
}
}

Let me know if im missing some data that would help.

Heres the connection string:

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T05:34:03+00:00Added an answer on June 8, 2026 at 5:34 am

    I’ve separated out and XML decoded the connection string value:

    Data Source=Server;Initial Catalog=Odata;Integrated Security=True;MultipleActiveResultSets=False;Packet Size=4096;Application Name="Microsoft SQL Server Management Studio"User ID=Name;Password=PW

    As you can see, you’re missing a ; between Application Name and User ID. I’m not sure if that’s the issue, but it’s possible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to write a site with CodeIgniter but I've a problem with PHP.
I try to write a Facebook app. This app will communicate with a rfid
I try to write a javascript Self-Executing Anonymous Function window.App = window.App || {}
I try to write :ab in Vim for faster coding but the question is
Now I try to write a Java Application what uses the Epson Java Pos
I am trying to write an app that will connect to a database, extract
try to write a composite component that allows mutltiple text inputs. I read that
I try to write Activator action for changing current song rating. I now that
I try to write DSL class Warcraft class << self def config unless @instance
I try to write a macro in clojure that sets up a namespace and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.