views:

9839

answers:

5

Hello,

I'm very frustrated. I have a website running on Visual Web Developper 2008 Express with my local database, everything works great. I also have the same web site running on a production server. Everything was working great but tonight I did a "reset" on production.

1) I deleted a couple of table, recreate them and insert data. Everything is ok at this time.

2) I delete ALL the file connected on the FTP.

3) I used the module called "Copy website" in visual studio and copy the site to the website via FTP.

When I log on my website, here is the error I got: Server Error in '/' Application.

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)


Nothing has changed related to SQL connection, this is OLD code that I always used. My website is completly paralysed because of this and I feel sick inside because I feel there is nothing I can do.

Can someone help me please?

Thanks

DarkJaff

A: 

You need to reset IIS or recycle worker process. This issue is getting me mad already. Sometimes when I publish web application on production server this error is appear. I don't know how fight with it.

AlfeG
A: 

Your connection string was probably overriden when you copied your new website version on the server. Please check the connection string in web.config and see if it is valid.

Johannes Rudolph
In fact, I was using Visual Studio 2005 before and was doing a "Publish to website". What I didn't know was that in the process, Visual studio put the site in debug mode = false juste before compiling. Now that I have Visual Web developper 2008 express and use the copy to web site instead, that was not done. Since my connexion string is based on "Are we on debug or not", it was trying to connect to my dev server ! Thanks!
DarkJaff
glad to help :-)
Johannes Rudolph
A: 

check forthe followings :

Make sure your database engine is configured to accept remote connections

• Start > All Programs > SQL Server 2005 > Configuration Tools > SQL Server Surface Area Configuration • Click on Surface Area Configuration for Services and Connections • Select the instance that is having a problem > Database Engine > Remote Connections • Enable local and remote connections • Restart instance

  1. Check the SQL Server service account

• If you are not using a domain account as a service account (for example if you are using NETWORK SERVICE), you may want to switch this first before proceeding

  1. If you are using a named SQL Server instance, make sure you are using that instance name in your connection strings in your ASweb P.NET application

• Usually the format needed to specify the database server is machinename\instancename • Check your connection string as well

Brajendu Kumar Das
A: 

when am tryng 2 bind data 2 grid am getting this error.. {"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)"}

i tried Surface Area Configuration from configuratn tools..and my system s showing this error message...

TITLE: Surface Area Configuration

Computer localhost does not exist on the network, or the computer cannot be configured remotely. Verify that the remote computer has the required Windows Management Instrumentation components and then try again. (SQLSAC)



Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476


The operation could not be completed. (WinMgmt)


BUTTONS:

OK

fkuwait
A: 

@ fkuwait

This looks like due to wrong connection string. Use IP address of SQL server instead of computer name in the connection string.

Rahul