Click here to Skip to main content
16,009,114 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have Windows 2008 R2 and running SQL Server 2008 R2.
When adding a web part manager to my page and run it gives me the following 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)


Please Advise
Posted
Updated 7-Aug-11 11:51am
v2

The error says it all. Are you sure SQL Server is running? See following solutions for troubleshooting it.

A network-related or instance-specific error occurred[^]
A network-related or instance-specific error[^]
Error in asp.net web parts[^]
how to resolve this error[^]
 
Share this answer
 
Comments
Moustafa Safwat 7-Aug-11 17:59pm    
Sure its running on instance MSSQLServer
walterhevedeich 7-Aug-11 18:00pm    
Have you checked the links?
Moustafa Safwat 7-Aug-11 18:01pm    
I have login control on anther page and connected correctly and i could access and retrieve data also. but the probleam occured when adding the web part control
Monjurul Habib 7-Aug-11 18:13pm    
nice links.5+
walterhevedeich 7-Aug-11 22:22pm    
Thanks Monjurul.
Finally I found the solution :)

XML
<connectionStrings>
    <!-- Resolve Web Parts Provider Probleam with connection -->
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="SERVER=.;Integrated Security=true;Initial Catalog=DotStreamDB" providerName="System.Data.SqlClient" />
</connectionStrings>
 
Share this answer
 
Comments
Moustafa Safwat 7-Aug-11 19:24pm    
The Source Article
http://daron.yondem.com/CommentView.aspx?guid=cb37f9ff-81d3-4b9c-ab97-18e9eddd9a27
walterhevedeich 7-Aug-11 21:54pm    
Good. So you managed to search the net for a solution. How does it feel that you have solved it by yourself? My 5. :)
Moustafa Safwat 8-Aug-11 16:15pm    
Yup we should close this community "This is lesson one" :)
The solution is here

I just pick the first link from google
 
Share this answer
 
Comments
Moustafa Safwat 7-Aug-11 18:17pm    
Thank You I read it before posting the article. I have Network service account grant all and i disabled my firewall for testing also the remote connection is enabled and sure after doing this restarted the service :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900