Question for ASP.NET gurus....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • astronaut x
    Too lazy to set a custom title
    • May 2011
    • 4844

    #1

    Question for ASP.NET gurus....

    So I am trying to connect a website to an SQL server database on the machine that is hosting the website.

    I have managed to make the connection from my local application to a copy of the database also on my local machine.

    I would assume, that when I deploy the web app to their server, that I just change the connection string in the web.config file. They supplied me with DSN, UID, and PWD variables but it seems to me I need more than that, or do I need something totalyl different?

    Windows Server 2008 R2
    SQL server 2008

    What do I need to come up with the correct connection string?
    Hello
  • Ferus
    Bye - Left to do stuff
    • Feb 2013
    • 4108

    #2
    Should look like this. If it dont work, look at the eventlog on the SQL server, if you get a deny event, because your premissions is not set right


    Code:
    <connectionStrings>
        <add name="DefaultConnection" connectionString="Data Source=[B]SERVERNAME\sqlINSTANCE[/B];Initial Catalog=[B]Databasename[/B];User ID=[B]sa[/B];Password=[B]sa[/B]" />
      </connectionStrings>

    Comment

    • astronaut x
      Too lazy to set a custom title
      • May 2011
      • 4844

      #3
      Originally posted by Ferus
      Should look like this. If it dont work, look at the eventlog on the SQL server, if you get a deny event, because your premissions is not set right


      Code:
      <connectionStrings>
          <add name="DefaultConnection" connectionString="Data Source=[B]SERVERNAME\sqlINSTANCE[/B];Initial Catalog=[B]Databasename[/B];User ID=[B]sa[/B];Password=[B]sa[/B]" />
        </connectionStrings>

      Is it possible it could be any of these other options?

      https://www.connectionstrings.com/sql-server-2008/
      Hello

      Comment

      Working...