trying to get aspx application to connect to sql 2008

Posted on 2010-01-07
Last Modified: 2012-05-08
I am migrating an aspx application across to SBS2008 with a seperate SQL2008 server.

I have the site setup in IIS. I have the SQL server on the second server working however when I run the application I get

System.Data.SqlClient.SqlException: Login failed for user 'admin'.

The connection string from the web.config file looks like this

<add name="Application_Database" connectionString="Data Source=sql.domain.local;User ID=admin;Password=password;INITIAL CATALOG=abc123;Connect Timeout=15" />

What am I not doing right?

Question by:SM17CH
    LVL 31

    Accepted Solution

    LVL 7

    Assisted Solution

    Do few changes as specified below..,

    <add name="Application_Database" connectionString="Data Source=serverIP;User ID=serverUsername;Pwd=serverPassword;INITIAL CATALOG=DatabaseName; Connect Timeout=15" />
    LVL 2

    Author Comment

    after stuffing around for hours I fixed it :)
    SQL server was running in Windows Authentication mode only. I had to go into the SQL server properties (in the SQL manager) and change authentication to Windows and SQL (ie: mixed mode).
    Thanks for the input guys.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now