Error in hosting N2 CMS ASP.Net Project

Topics: Developer Forum, Project Management Forum, User Forum
Jul 18, 2012 at 3:20 PM

Hi All,

  I am trying to host N2CMS integrated ASP.NET project in my server but when i login it is giving my 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)

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)

Source Error:

Line 6:  
Line 7:  
Line 8:  <html xmlns="http://www.w3.org/1999/xhtml" class="navigation <%= Server.HtmlEncode(Request.QueryString["location"]) %>Location">
Line 9:      <head runat="server">
Line 10:         <title>Navigation</title>


Source File: d:\complete\N2\Content\Navigation\Tree.aspx    Line: 8

Stack Trace:

[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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +706
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +89
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6372110
   System.Data.SqlClient.SqlConnection.Open() +300
   System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +150
   System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +4718367
   System.Web.Security.SqlRoleProvider.GetRolesForUser(String username) +1466
   System.Web.Security.RolePrincipal.IsInRole(String role) +263
   N2.Security.AuthorizedRole.IsAuthorized(IPrincipal user) +73
   N2.ContentItem.IsAuthorized(IPrincipal user) +194
   N2.Security.DynamicPermissionMap.Authorizes(IPrincipal user, ContentItem item, Permission permission) +228
   N2.Security.SecurityManager.GetPermissions(IPrincipal user, ContentItem item) +48
   N2.Edit.NodeAdapter.GetMaximumPermission(ContentItem item) +141
   N2.Management.Content.Navigation.TreeUtility.BuildLink(NodeAdapter adapter, ContentItem item, Boolean isSelected, String target, Boolean isSelectable) +1162
   N2.Management.Content.Navigation.<>c__DisplayClass5.<Write>b__0(HierarchyNode`1 n, TextWriter w) +163
   N2.Web.Tree.WriteChildren(TextWriter writer, HierarchyNode`1 parent, Boolean renderUl) +419
   N2.Web.Tree.WriteTo(TextWriter writer) +349
   N2.Edit.Web.UI.Controls.Tree.Render(HtmlTextWriter writer) +385
   ASP.n2_content_navigation_tree_aspx.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\cms\c91c8bb5\381d568\App_Web_m1cxerte.0.cs:0
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +315
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
   ASP.n2_content_navigation_tree_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\complete\N2\Content\Navigation\Tree.aspx:8
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5290



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

 

Please help me in fixing this issues.

  My Data Base is enabled with network access

 

Thanks In Advance,

Sravani

Coordinator
Jul 18, 2012 at 10:46 PM

It seems the web site cannot access the database for some reason. Permissions? Firewalls? Typo?

Jul 26, 2012 at 2:37 PM

There is no firewall on in the server I hosted it.

And I am getting the error only in the navigation part of N2.