Strange Error... can't access SQL.

Topics: General, Troubleshooting, Visual editor
Jun 12, 2011 at 9:36 AM

While working with the Visual editor, I had an odd error happen. I can't for the life of me figure out what went wrong, but now whenever I connect, I'm getting the following:

 

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)

[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)]
Composite.GlobalInitializerFacade.InitializeTheSystem() +610
Composite.Data.Foundation.DataProviderRegistry.get_AllInterfaces() +36
Composite.Data.DataFacadeImpl.GetData(Boolean useCaching, IEnumerable`1 providerNames) +49
Composite.Data.DataLocalizationFacadeImpl.get_DefaultUrlMappingCulture() +119
Composite.Data.PageUrl.ParsePublicUrl(UrlBuilder urlBuilder, NameValueCollection& notUsedQueryParameters) +182
Composite.Core.WebClient.Renderings.RequestInterceptorHttpModule.HandlePublicPageUrl(HttpContext context) +118

[InvalidOperationException: Failed to intercept URL 'http://localhost:8080/'.]
Composite.Core.WebClient.Renderings.RequestInterceptorHttpModule.HandlePublicPageUrl(HttpContext context) +835
Composite.Core.WebClient.Renderings.RequestInterceptorHttpModule.context_BeginRequest(Object sender, EventArgs e) +219
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266

Any ideas? I have set the site up on my localhost:8080 and I'm using the SqlDataConnector

Coordinator
Jun 12, 2011 at 1:44 PM

Most likely the connection string, that was generated by SqlDataConnector isn't valid.

 Open file "~/App_Data/Composite/Composite.config", seach for "connectionString", once you find it, try to test is out. Usually I do it with osql.exe, but there are seem to be some tools that can help, f.e.

http://www.digitalcoding.com/free-software/database/Database-Connection-String-Tester.html

Once you find what's wrong with it, fix it in Composite.config, and restart the site

Jun 12, 2011 at 5:02 PM

Yeah, that's what I had figured. The connection string looks good though, and it tested out fine.

Another message that pops up is on first load of default.aspx. I checked sitemapNavigator and it's null. It isn't initializing properly.

 


Object reference not set to an instance of an object.


Source Error:

Line 23:             {
Line 24: SitemapNavigator sitemapNavigator = new SitemapNavigator(dataConnection);
Line 25: PageNode homePageNode = sitemapNavigator.GetPageNodeByHostname(Request.Url.Host);
Line 26:
Line 27: if (homePageNode != null)


Source File: ~\default.aspx    Line: 25

Jun 12, 2011 at 5:05 PM
Edited Jun 12, 2011 at 5:05 PM

Followup: It seems to have... fixed itself. That's really odd.

I guess it must have been a database error, then. I just stepped through the code once more. Thought I had recycled IIS previously. ODD!