an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Installation > Database configuration issue
Last Post 5/26/2008 6:58:32 PM By Ryan. 11 replies.
Page 1 of 2 (12 posts) << First < Prev 1 2 Next > Last >> 
3/17/2008 9:56:31 AM
jmlee
Posts: 11
Joined: 4/23/2008
Database configuration issue

Hi,

I am trying to install the 1.1 version of the code.

I was able to run through the instdsc.exe without a problem, but when i tried to load the page, i get the following error:

I have made all the required changes to point to the server/database that was created, but cannot seem to bypass this.

can you help?

thanks,

Jerry

 

<span>

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)

</span>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: 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)

Source Error:

<table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td>
Line 88:             NamedTimeStamp timeStamp = null;
Line 89: Database db = DBController.CreateDatabase(host);
Line 90: DbCommand cmd = db.GetStoredProcCommand(TimeStampProc, key);
Line 91: dep = DBController.GetSqlCacheDependency(host, (SqlCommand)cmd);
Line 92: using (IDataReader dataReader = db.ExecuteReader(cmd)) {
</td> </tr> </tbody> </table>
Source File: C:\Inetpub\wwwroot\DotShop1\Common\Object\DbFileBase.cs    Line: 90

Stack Trace:

<table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td>
[SqlException (0x80131904): 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)]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +435
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +494
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +84
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() +136
Microsoft.Practices.EnterpriseLibrary.Data.Database.DiscoverParameters(DbCommand command) +36
Microsoft.Practices.EnterpriseLibrary.Data.ParameterCache.SetParameters(DbCommand command, Database database) +125
Microsoft.Practices.EnterpriseLibrary.Data.Database.GetStoredProcCommand(String storedProcedureName, Object[] parameterValues) +84
XShan.DotShoppingCart.Common.Object.DbFileBase.GetTimeStamp(String host, Object key, SqlCacheDependency& dep) in C:\Inetpub\wwwroot\DotShop1\Common\Object\DbFileBase.cs:90
XShan.DotShoppingCart.Common.Object.DbFileBase.GetFile(String host, Object key) in C:\Inetpub\wwwroot\DotShop1\Common\Object\DbFileBase.cs:66
Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() +136
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +663
Microsoft.Practices.EnterpriseLibrary.Data.Database.DiscoverParameters(DbCommand command) +36
Microsoft.Practices.EnterpriseLibrary.Data.ParameterCache.SetParameters(DbCommand command, Database database) +125
Microsoft.Practices.EnterpriseLibrary.Data.Database.GetStoredProcCommand(String storedProcedureName, Object[] parameterValues) +84
XShan.DotShoppingCart.Common.Object.Task.IsScheduledToRun(String host, String taskName, Int32 intervalInMiniute, Nullable`1 startAt) in C:\Inetpub\wwwroot\DotShop1\Common\Object\Task.cs:27
XShan.DotShoppingCart.OrderPipeline.TaskProvider.Proccess(String host) in C:\Inetpub\wwwroot\DotShop1\OrderPipeline\OrderPipeline\TaskProvider.cs:48
XShan.DotShoppingCart.OrderPipeline.ProcessorProvider.Run() in C:\Inetpub\wwwroot\DotShop1\OrderPipeline\OrderPipeline\ProcessorProvider.cs:32
XShan.DotShoppingCart.OrderPipeline.RunnableProvider.StartRun() in C:\Inetpub\wwwroot\DotShop1\OrderPipeline\OrderPipeline\RunnableProvider.cs:43
System.Threading.ThreadHelper.ThreadStart_Context(Object state) +58
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +128
System.Threading.ThreadHelper.ThreadStart() +63
</td> </tr> </tbody> </table>

3/17/2008 1:35:30 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Database configuration issue

Check connectionStrings in the web.config file and make sure it's correct.

DotShoppingCart Staff
3/17/2008 3:03:58 PM
jmlee
Posts: 11
Joined: 4/23/2008
Re: Database configuration issue

Hi Luke,

Thanks for the quick response.  It appears that the application would not run correctly if my MSSQL 2005 is setup as an instance on the system, and not the default.

I was able to duplicate the entire thing and got it to run (somewhat) on a separate system.

I also noticed that in the 1.1 download, it's missing the "File" folder underneath the "Web" folder....I had to copy the same folder from the 2.0 version.

3/17/2008 4:52:52 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Database configuration issue

All the files are stored inside DB. The web\files folder is the cache folder. Make sure you give write perms to the account running your app pool.

DotShoppingCart Staff
3/18/2008 9:41:08 AM
jmlee
Posts: 11
Joined: 4/23/2008
Re: Database configuration issue

Hi Luke,

Today i tried to make another clean install on Win2003 server and i get the following error message. can you advise on what i may be doing wrong?  the install was completed successful but when i tried to run the site, i got the following:

 

<span>

Compilation Error

</span>Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0234: The type or namespace name 'DotShoppingCart' does not exist in the namespace 'XShan' (are you missing an assembly reference?)

Source Error:

<table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td> </td> </tr> <tr> <td>
Line 192:        </roleManager>
Line 193:
Line 194: <profile automaticSaveEnabled="true" defaultProvider="SqlProfileProvider" inherits="XShan.DotShoppingCart.Common.ProfileDSC">
Line 195: <providers>
Line 196: <clear/>
</td> </tr> </tbody> </table>

 

UPDATE: It appears that most of the reference dlls that are suppose to be in the /web/bin directory were not added during the installation.

 

I am curious to know if thse auto-generated files are machine/configuration specific? Can i just copy from another machine, in which i got the site running, over to this new machine?

 

Please advise. Thanks.

 

3/18/2008 11:09:08 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Database configuration issue

If you downloaded the source code zip file, you might want to recomplie the solution again. The binaries in web/bin folder are prebuilt for the binaries release zip file.\

Most are not machine specific. The only one machine specific file is DotshoppingcartMaster.key which is using DPAPI. But you could use Enterprise Library tool to move it to your new machine.

DotShoppingCart Staff
4/7/2008 2:52:31 PM
cleveland75
Posts: 8
Joined: 4/23/2008
Re: Database configuration issue

Luke,
since DotshoppingcartMaster.key is machine specific, backing it up and restoring to a new server is not going to work.
Can you give some instructions on how to use the Enterprise Library tool to move it to the new machine?  I tried looking online on how-to, but not finding much.

thanks,
Nick

4/7/2008 8:08:58 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Database configuration issue

I found this blog entry http://davidhayden.com/blog/dave/archive/2006/03/02/2870.aspx talking about the Cryptography Application Block in Enterprise Library. It should give you enough hint about exporting and importing the encryption key. I will create a document entry to discuss about this in detail when I get time.

DotShoppingCart Staff
4/8/2008 7:37:23 AM
cleveland75
Posts: 8
Joined: 4/23/2008
Re: Database configuration issue

Thanks, after some trials and errors, I got it working!!!

4/8/2008 11:48:02 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Database configuration issue

Nice. It would be great that you could share your experience with us and write a little documentation about how you did it.

DotShoppingCart Staff
5/21/2008 7:49:07 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Database configuration issue

I created an entry in the online document describing how to back up DotshoppingcartMaster.key.

DotShoppingCart Staff
Page 1 of 2 (12 posts) << First < Prev 1 2 Next > Last >>