My web site is working when I click Start Debugging(F5). The data can be retrived from the database correctly. The url is
http://localhost:1708/mywebsite/home.aspx. But when I type
http://localhost/mywebsite/home.aspx in the url directly, I got the following error message:
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) .
I use SQL Server 2000 (not 2005) and the database is on another server
myWebsiteDB. The connectString set up is: <add name="LocalSqlServer" connectionString="Data Source=dbServer;Initial Catalog=myWebsiteDB;Persist Security Info=True;User ID=sa;Password=mypw#" providerName="System.Data.SqlClient"/>.
Could any one tell me why the localhost doesn't work? Thanks in advance!