Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have built a very small (3 page) asp.net site using MS Access 2010 as the database. page 1 is splash, 2 and 3 show aspects of the data. This all works in test mode. This is for an off-line intranet application, so I'm not concerned about security- hardware access is the route for hacking here. This is all being built in VS WebExpress 2012.

When I try to publish to IIS 7.5, open the splash page and then proceed to page 2, I'm given two top tier error messages:

[Win32Exception (0x80004005): The network path was not found]

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]

My connection string is:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source="C:\inetpub\wwwroot\App_Data\PersonalArt Version 0055.accdb";Persist Security Info=True

I don't know why this is creating a SQL Server error, as I'm not trying to use SQL Server.

I've tried looking into the SQL Server side of things here:

http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/

I have checked that SQL Server is running, that SQL Browser is enabled and running, that appropriate ports are open in the firewall.

I have added a connection string to IIS 7.5 that at least points to ACE.OLEDB.12.0, but I cannot remove the default connection string for SQL Server Express.

I've looked here about construction of connection strings: http://databases.aspfaq.com/database/what-should-my-connection-string-look-like.html

and I've seen instructions about removing bad connections strings and replacing them here:

http://forums.asp.net/t/1454592.aspx

(but I'm afraid of this- I don't understand it)

I'm intending to use a WIFI tablet controller, and I've established that IIS is working well enough that I can see an index page on the controller.

So I've been bouncing around trying to figure out if this is an IIS problem, a SQL install/manage problem, a firewall/security problem. I've been working on this for weeks (part time obviously) and have tried to hire local talent to come over and solve this. Turns out to be very hard to do...being trying this for weeks as well.

Thanks-

Dave

share|improve this question
Are you using System.Data.SqlClient objects and methods to try and connect to the Access database? If so, then try using the corresponding System.Data.OleDb gizmos instead. – Gord Thompson 19 hours ago
Gordon, thanks- But I'm not using either, at least not knowingly. I've been working under the very naive idea that everything I do in test mode should migrate transparently to the website. Are you thinking this belongs in the config file? somewhere on each webpage? I need a little more to work with here. – Dave123 9 hours ago

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.