none
Connecting to SQL2008 Database: Connection String: Unable to log in to Asp.net website project RRS feed

  • Question

  • Hello :) 
    I have a Website project that I have finally got up and running for a play environment. The site requires a user log-in in order to use all of the features that I would like to make adjustments to. I am connected to the database that I am accessing in SQL and the connection string is as follows:

    <add name="TrackingConnectionString" providerName="System.Data.SqlClient" connectionString="Data Source=FS23140D0020186\SQLEXPRESS;Initial Catalog=Tracking;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;User ID=userID;Password=password" />

    I am setting the UserID & Password to the UserID and Password of a user / Login that I have created in SQL2008 Management Studio. My user has database ownership rights. The website (editable playground) is initiated by using CNTRL+F5 and it opens an instance of my localhost:xxxx/login and is using the database in my connectionString for all of the data it needs.

    I thought that by creating a user and specifying the name and password of that user, it would allow me to log into the website using the user/Login I created on my local server & database. So sorry for my naivety, I am fairly new to ASP.net website projects. Am I going about working on the Website Project in the correct way? Is it possible for me to simply log into the application by creating a Login on my Local Server and a specific user in my database? 

    Thank you for your time and expertise! 


    :)

    Monday, October 16, 2017 10:37 PM

Answers

All replies

  • Hi,

    >> Am I going about working on the Website Project in the correct way?

    After reading your description,  I'm not really following what problem you're trying to solve. I guess you are trying to migrate your database.  Is right ?

    >> Is it possible for me to simply log into the application by creating a Login on my Local Server and a specific user in my database?

    You create a new SQL Server authentication login, then you want to log in the SQL Server via new Username and Password, but failed? is right?

    If I understand your confuse correctly, i would suggest you try to troubleshoot Connecting to the SQL Server Database Engine.

    https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/troubleshoot-connecting-to-the-sql-server-database-engine

    And try to learn more about Database ,there are official tutorials for your reference.

    https://docs.microsoft.com/en-us/sql/relational-databases/database-engine-tutorials

    Best Regards,

    Bob


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 17, 2017 10:41 AM
  • Hi again Bob!
    So sweet of you to respond to my question! Sorry it was a bit nebulous; turns out I was setting the connection string correctly and I had made a new SQL Server authentication login with the correct permissions. My issue (what I suspected!) was that when I received the project (via drag and drop from the old developers hard drive) it did not have a copy of their 'practice' database that contained all of the data for the site; users, requests, permissions. 

    After I had access to that database, I was able to login to the local instance of the application and make changes accordingly. A shame I had to dig so deep and try so many things; but a great opportunity to learn more about SQL, thank you for the links you provided!

    Happy Wednesday!

    :) 


    :)

    Wednesday, October 18, 2017 5:56 PM