Moving from local host to web server

Jul 16, 2009 at 4:43 PM

I finished creating my web portal on my local host, but now am having trouble getting it running on our web server.  Does anyone have any suggestions to move dropthings from a local host to a web server?

Here is the error i got when I moved it:

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) 

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error: 

 

Line 79:     {

Line 80:         //setup default roles, template user and role template      

Line 81:         ObjectContainer.Resolve()

Line 82:                             .ExecuteWorkflow<

Line 83:                                 SetupDefaultRolesWorkflow,
 


Source File: p:\NewIntranet\dropthings\trunk\Dropthings\Global.asax    Line: 81 

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]

   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887

   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194

   System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +4860189

   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +90

   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342

   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221

   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189

   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185

   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31

   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433

   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66

   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499

   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65

   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117

   System.Data.SqlClient.SqlConnection.Open() +122

   System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +87

   System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +221

   System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +478

   System.Web.Security.Roles.RoleExists(String roleName) +73

   Dropthings.Business.Activities.SetupDefaultRoleActivity.SetupRoles(String roleNames) in C:\Inetpub\wwwroot\dropthings\trunk\DashboardBusiness\Activities\SystemActivity\SetupDefaultRoleActivity.cs:41

   Dropthings.Business.Activities.SetupDefaultRoleActivity.Execute(ActivityExecutionContext executionContext) in C:\Inetpub\wwwroot\dropthings\trunk\DashboardBusiness\Activities\SystemActivity\SetupDefaultRoleActivity.cs:75

   System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext) +42

   System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext) +49

   System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime) +475

   System.Workflow.Runtime.Scheduler.Run() +373

 

[WorkflowException: 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)]

   Dropthings.Business.Workflows.WorkflowHelper.ExecuteWorkflow(WorkflowRuntime workflowRuntime, Type workflowType, Dictionary`2 properties) in C:\Inetpub\wwwroot\dropthings\trunk\DashboardBusiness\Workflows\WorkflowHelper.cs:79

   Dropthings.Business.Workflows.WorkflowHelper.ExecuteWorkflow(WorkflowRuntime workflowRuntime, TRequest request) in C:\Inetpub\wwwroot\dropthings\trunk\DashboardBusiness\Workflows\WorkflowHelper.cs:29

   ASP.global_asax.SetupDefaultSetting() in p:\NewIntranet\dropthings\trunk\Dropthings\Global.asax:81

   ASP.global_asax.Application_Start(Object sender, EventArgs e) in p:\NewIntranet\dropthings\trunk\Dropthings\Global.asax:24
 
Jul 17, 2009 at 7:01 AM

Did you set up valid DB Connection in web.config.

Sep 10, 2009 at 7:18 PM

I hope i did it right.  any pointers?

<add name="dropthingsConnectionString" connectionString="Data Source=.;Initial Catalog=dropthings;user id=dropthings;password=dropthings" providerName="System.Data.SqlClient"/>
		<!--<add name="DropthingsConnectionString" connectionString="Data Source=(local);Initial Catalog=Dropthings;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>-->
	</connectionStrings>
	<appSettings>
		<add key="server" value="blah" />
		<add key="database" value="blah" />
		<add key="username" value="blah" />
		<add key="password" value="blah" />
		<add key="WebRoot" value="http://test.intranet.com/"/>
		<add key="ScriptVersionNo" value="9"/>
		<add key="CssPrefix" value="http://test.intranet.com/"/>
		<add key="JsPrefix" value="http://test.intranet.com/"/>
		<add key="ImgPrefix" value="http://test.intranet.com//"/>
		<add key="CommonCssSet" value="~/Styles/Common.css"/>
		<add key="CssVersion" value="8"/>
		<add key="AdminEmail" value="admin@dropthings.com"/>
		<add key="ActivationRequired" value="false"/>
		<add key="EnableWidgetPermission" value="true"/>
	</appSettings>