Monday, February 20, 2012

remote connection not allowed, but its local

I have a form to submit some data to a database located in the App_Data folder. I have the following connection string:

<

connectionStrings>

<

addname="ConnectionString"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Siven.mdf;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient"/>

</

connectionStrings>

On the form I'm using a DetailsView control and using a SqlDataSource as the datasource, pointing to the above connection string. In realtime, when i submit the data, I receive the following error:

Server Error in '/' Application.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

I'm using discountasp.net as the host, and I did not elect to use the SQL Server databases, I'm just going to use SQL 2005 express. I dont understand why it's not pointing to the db when it's there (and to make sure, I re-uploaded). Is there something I missed here?

pcdebb:

In realtime, when i submit the data, I receive the following error:

When debug, the application can connect to SQL Server via Shared Memory Protocol (lpc). I guess when in realtime, Shared Memory Protocol may not be used by the website connection. So make sure you've enabled remote connection in SQL Server Surface Area Configuration

No comments:

Post a Comment