Sunday, February 26, 2012

Error connecting from classic ASP

I'm haveing some problems with using SQL Server in a classic ASP app.

When trying to connect with the db I get the error:

Microsoft SQL Native Client error '80004005'

TCP Provider: No connection could be made because the target machine actively refused it.

The Windows 2003 server runs both the SQL server 2005 express and IIS.

Connectionstring: "Provider=SQLNCLI;Server=KSP;Database=KSB;UID=sa;PWD=;"

I don't have a good answer for this one; it seems a bit like a permissions issue, you might want to check what user context your ASP app is running in and make sure that user has permission to the database file or server.

You should also consider asking this question in the .NET Data Access forum or in the ASP.NET fourms. The folks that hang out there have probably had more experience with ASP than I have.

Regards,

Mike Wachal
SQL Express team

-
Check out my tips for getting your answer faster and how to ask a good question: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=307712&SiteID=1

|||

Sql server express is a named instance, so you need to specify <servername>\sqlexpress in you connection string.

Check this out.

http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx

|||

Thank both of you for your advice. It was the <servername>\sqlexpress which was the problem.

No comments:

Post a Comment