View Full Version : How to install ASP.NET 2.0 Commerce Starter kit?
pleblanc
06-20-2006, 07:19 AM
I follow all of the directions step by step. I am stuck at number 6. Can you please give # 6 directions step by step?
Aristotle
06-20-2006, 09:11 AM
Are you running the sqlcmd from the directory where you extracted the .sql scripts? What error are you getting?
Aristotle
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
pleblanc
06-20-2006, 09:56 AM
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized configuration section add.
Source Error:
Line 113:
Line 114:
Line 115: <add name='CommerceTemplate'
Line 116: connectionString='Data Source=sql2k503.discountasp.net;Integrated Security=False;Initial Catalog=SQL2005_257457_commercedb;User ID=SQL2005_257457_commercedb_user;Password=*****'
Line 117: providerName='System.Data.SqlClient'/>
Source File: E:\web\*****\htdocs\web.config Line: 115
Post Edited By Moderator (Aristotle [DASP]) : 6/21/2006 5:28:45 AM GMT
Aristotle
06-20-2006, 10:13 AM
Are the 'add' elements within the <connectionStrings></connectionStrings> section?
Aristotle
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
Aristotle
06-20-2006, 11:27 AM
Here's how I got version 1.0.2 working on the DiscountASP.NET servers. Version 2.0 Beta 2 is available also, but since it's beta I don't know if you want to install it on your production site yet.
Requirements:
Visual Studio 2005 or Visual Web Developer 2005
SQL 2005 Database
1. Download the following from the Commerce Starter Kit website.
Commerce Starter Kit (C# or VB) - http://www.commercestarterkit.org
Unzip and run the CommerceStarterKitVB.vsi. This will install the template in your Visual Studio 2005.
SQL 2000 Scripts - http://forums.commercestarterkit.org/files/7/sql_2000_upsize_scripts/entry470.aspx
Unzip the sql script files and note the path where you unzipped for step 6. Don't worry, these scripts will also work for your SQL 2005 database.
2. Open Visual Studio 2005 and create a New Web Site. Select the Commerce Starter Kit template.
3. Open the Web.config file.
In the connectionStrings section, modify the following connectionString values to connect to your DiscountASP SQL 2005 database. The 'CommerceTemplate' connection string is used to connect to the store database containg the orders, shipping info, etc. The 'LocalSqlServer' connection string is used to connect to the Membership database containing the registered user information. I assume that you would want to use the same SQL database for both so, the connectionString value will be the same here.
You can find your SQL_SERVER_NAME, DATABASE_NAME, and USERNAME in the MS SQL 2005 section of your control panel.
[quote]
<addname='CommerceTemplate'
connectionString='DataSource=SQL_SERVER_NAME;Integ ratedSecurity=False;InitialCatalog=DATABASE_NAME;U serID=USERNAME;Password=PASSWORD'
providerName='System.Data.SqlClient'/>
<addname='LocalSqlServer'
connectionString='DataSource=SQL_SERVER_NAME;Integ ratedSecurity=False;InitialCatalog=DATABASE_NAME;U serID=USERNAME;Password=PASSWORD'
providerName='System.Data.SqlClient'/>
</CODE>
Save and close the web.config.
4. Deploy to your DiscountASP site with either Visual Studio (http://kb.discountasp.net/article.aspx?id=10364) or any FTP client software. If you uploaded to a subdirectory, log into your control panel and enable the directory as a web application root using the Web Application tool.
5. Now for the SQL databases. You will notice that there's 2 databases in the App_Data directory:
ASPNET.MDF - contains the Membership/Roles data
CommerceDB.mdf - contains the store data
Both of these are SQL Express databases. Since DiscountASP does not support SQL Express, you'll need to use your SQL 2005 database.
Use the Attach SQL Tool in the control panel to attach the ASPNET.MDF only. Specify the path \App_Data\ASPNET.MDF if you uploaded your project in your site's root. This tool will copy the MDF file to the SQL Server and attach to your SQL database. Do not attach the CommerceDB.mdf file afterward as it will overwrite the ASPNET.MDF that you've just attached. We will create the store's database objects in the next step.
6. Run the SQL scripts you downloaded using any SQL client to create the Commerce store database schema and objects. I used SQLCMD that came with the Visual Studio / SQL Express installation. For the option -i value, you may need to include the full path to the sql script file.
Open the command prompt on your local computer and execute the commands in this order:
[quote]
sqlcmd-SSQL_SERVER_NAME-UUSERNAME-PPASSWORD-dDATABASE_NAME-iTablesAndSPs.sql
sqlcmd-SSQL_SERVER_NAME-UUSERNAME-PPASSWORD-dDATABASE_NAME-iCategoryData.sql
sqlcmd-SSQL_SERVER_NAME-UUSERNAME-PPASSWORD-dDATABASE_NAME-iOrderStatus.sql
sqlcmd-SSQL_SERVER_NAME-UUSERNAME-PPASSWORD-dDATABASE_NAME-iProductData.sql
sqlcmd-SSQL_SERVER_NAME-UUSERNAME-PPASSWORD-dDATABASE_NAME-iTaxAndShipping.sql
</CODE>
7. Your web application is now ready. You can login as 'admin' with password 'admin' to administer the store.
GOOD LUCK!!!
Aristotle
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
pleblanc
06-21-2006, 03:12 AM
My connection strings look different than yours....here is mine.
<add name="CommerceTemplate"
connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Comm erceDB.mdf" providerName="System.Data.SqlClient" />
<add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|ASPN ET.mdf" providerName="System.Data.SqlClient" />
</connectionStrings>
However...I used yours and endered the correct db, password, username...etc.
Aristotle
06-21-2006, 04:31 AM
Right, you should modify the connectionString values as indicated in Step 3.
By the way, I edited your previous post with the error message. You included your login information. The error still points to a problem with your web.config. It looks like you're adding the connection strings in the wrong place. Double-check your web.config on the server again.
Aristotle
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
pleblanc
06-21-2006, 05:13 AM
Thanks for the edit to the previous post...i should have caught that.
Just incase this makes a difference with the web.config I am using vwd...the fully supported and release version. I look through the web.config from top to bottom. I don't see what is in session 3.
<connectionStrings>
<clear/>
<add name="CommerceTemplate"
connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Comm erceDB.mdf" providerName="System.Data.SqlClient" />
<add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|ASPN ET.mdf" providerName="System.Data.SqlClient" />
</connectionStrings>
Should I just cut and copy what you have in session 3 and modify with my db information?
pleblanc
06-21-2006, 05:29 AM
It was the web.config. I copied over the connectionstring varible. Sincerely. There is no way I would have got this to work without you. Thanks!!!!!!
BootlegBill
07-09-2006, 03:29 AM
If I install the commerce starter kit to the root folder, it works as expected.
However, if I install it to a sub folder, eg www.myweb.com/myshop (http://www.myweb.com/myshop)
I get all kinds of errors.
I have been informed that this starter kit dose not like to be run from a sub folder, is this true ? or am I missing something in the web.config ?
Bill
bruce
07-10-2006, 05:50 AM
Bill,
>I have been informed that this starter kit dose not like to be run from a sub folder, is this true ? or am I missing something in the web.config ?
no. it is not true.
What err are you getting?
Bruce
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
BootlegBill
07-11-2006, 12:51 AM
The problem appears to be with the web.configs having crossed wires.
</o:p>
I created a folder from my root, and named it ?onlineshop?.
I uploaded all files and folders to this ?onlineshop? folder.
I set the folder as a web application.
I set the paths to my MSSQL 2000 database within the web.config file of the ?onlineshop? folder.
</o:p>
The error is referring to the source file ?web.config? within the root folder, not the shop folder.
</o:p>
Parser Error Message: The connection name 'SiteConnectionString' was not found in the applications configuration or the connection string is empty.
Source Error: </o:p>
</o:p>Line 58: <providers></o:p>Line 59: <remove name="AspNetSqlRoleProvider"/></o:p>Line 60: <add name="AspNetSqlRoleProvider" connectionStringName="SiteConnectionString" type="System.Web.Security.SqlRoleProvider"/></o:p>Line 61: </providers></o:p>Line 62: </roleManager></o:p>
[b]</o:p>
[B]Source File: E:\web\webpresenta\htdocs\web.config Line: 60</o:p>
</o:p>
</o:p>
The main site is http://www.web-presentations.com (http://www.web-presentations.com/)</o:p>
The commerce software is http://www.web-presentations.com/onlineshop</o:p>
</o:p>
</o:p>
Is there a way to uncross the wires ?</o:p>
Thanks</o:p>
Bill
Aristotle
07-11-2006, 08:35 AM
BootlegBill said...
The problem appears to be with the web.configs having crossed wires.
I created a folder from my root, and named it ?onlineshop?.
I uploaded all files and folders to this ?onlineshop? folder.
I set the folder as a web application.
I set the paths to my MSSQL 2000 database within the web.config file of the 'onlineshop' folder.
The error is referring to the source file ?web.config? within the root folder, not the shop folder.
Parser Error Message: The connection name 'SiteConnectionString' was not found in the applications configuration or the connection string is empty.
What does the web.config in the onlineshop directory look like? Have you removed or cleared the connection strings?
Aristotle
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
Post Edited (Aristotle [DASP]) : 7/11/2006 11:02:37 PM GMT
Aristotle
07-11-2006, 09:58 AM
If you get a CryptographicException error 'cannot find the file specified' when using the PayPal payment method, there is a fix.
See this thread in the Commerce Starter Kit forum:
http://forums.commercestarterkit.org/forums/642/ShowPost.aspx
As I understand it, when the PayPal API wrapper creates a new X509 certificate object, it needs to temporarily store the key somewhere. By default, the User keystore is used, which is the site's ASPNET user keystore. DiscountASP does not provide a Windows profile for ASPNET users, so the User keystore doesn't exist. Therefore, you must configure the PayPal API wrapper to use the Machine keystore instead.
You have 2 options to fix this:
1. Download the source version for the starter kit.
In the Commerce.PayPal project, open up the APIWrapper class.
On line 69, change the X509Certificate2 spin up to this:
[quote]X509Certificate2cert=newX509Certificate2(buffer,_C ertPassword,X509KeyStorageFlags.MachineKeySet);</CODE>
Recompile, and upload the Commerce.PayPal.dll to your app's bin.
2. Download the fixed Commerce.PayPal.dll from the Commerce Starter Kit website and replace on your site.
http://forums.commercestarterkit.org/files/8/paypal_api_dlls/default.aspx
Aristotle
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
kingpenart
10-12-2006, 06:21 AM
I'm having issues figuring out Step 6 in your instructions. I think it assumes knowledge I don't have. Logically it doesn't make sense to me.
Steps 1-2: No problems.
Step 3: You mention to update the web.config file's connection strings to the following:
<connectionStrings>
<clear />
<add name="CommerceTemplate" connectionString="Data Source=SQL_SERVER_NAME;Integrated Security=False;Initial Catalog=CommerceDB.mdf;User ID=USERNAME;Password=PASSWORD" providerName="System.Data.SqlClient" />
<add name="LocalSqlServer" connectionString="Data Source=SQL_SERVER_NAME;Integrated Security=False;Initial Catalog=ASPNET.MDF;User ID=USERNAME;Password=PASSWORD" providerName="System.Data.SqlClient" />
</connectionStrings>
Step 4: You have us upload our site files (which includes the modified web.config file). No problems here.
Step 5: No problems.
Step 6: The scripts I'm assuming are run on my local machine. I have SQL 2005 Express installed. Here's one of the commands you have us type at a command prompt:
sqlcmd-SSQL_SERVER_NAME-UUSERNAME-PPASSWORD-dDATABASE_NAME-iTablesAndSPs.sql
What SQL_SERVER_NAME, USERNAME, PASSWORD, and DATABASE_NAME are we to use with this step? If it's local information (which is different than the variables in Step 3) then what would the username/password be? I use Windows authentication to get into my databases through Express. And I'm assuming if it's local credentials, we would have to re-upload the database(s) back to our hosted site at discountasp.com? If the credentials are the same as in Step 3, then the script hangs, which makes sense since I don't have the same SQL_SERVER_NAME on my local machine as I do on my hosted account.
Could you provide more detailed examples in this Step 6?
Thanks!
kingpenart
10-12-2006, 08:40 AM
I figured it out (after many different types of tries). Hopefully this info will help someone else who might have the same newbie confusions I had :)
In Step 6, it is asking for the credentials that are the same as in Step 3, which are discount.asp credentials.
I appreciate the tutorial, even with my added confusion. Without this tutorial, it would have been much longer for me.
Tonerz
10-27-2006, 06:16 AM
I was able to follow all your steps, however I get the following error:
====start======]
Login failed for user 'brinksterne'.
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: Login failed for user 'brinksterne'.
Source Error:
Line 88: /// <returns></returns>
Line 89: public static ShoppingCart GetCart() {
Line 90: IDataReader rdr = ShoppingCartProvider.Instance.CartGetCurrentCart(G etUserName());
Line 91: ShoppingCart cart = new ShoppingCart();
Line 92: cart.Load(rdr);
Source File: e:\web\brinksterne\htdocs\App_Code\BLL\ShoppingCar tManager.cs Line: 90
====end======
I have attached the aspnetdb.mdf to my SQL 2005 database.
Here is my connection string:
<connectionStrings>
<clear/>
<add name='CommerceTemplate'
connectionString='Data Source=sql2k505.discountasp.net;Integrated Security=False;Initial Catalog=SQL2005_299931_info;User ID=brinksterne;Password=******'
providerName='System.Data.SqlClient' />
<add name='LocalSqlServer'
connectionString='Data Source=sql2k505.discountasp.net;Integrated Security=False;Initial Catalog=SQL2005_299931_info;User ID=brinksterne;Password=*******'
providerName='System.Data.SqlClient' />
</connectionStrings>
Please advise me what to do. Thanks
bruce
10-27-2006, 08:31 AM
you are probably using the wrong database username / password.
Note that your database name can be different from your account username. Check the SQL manager in the control panel to confirm.
Bruce
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
fmk786
12-08-2006, 06:07 AM
Hi,
I am new to the discountASP, I have followed the 6 steps (apart from Step5) but still getting error message... Regarding step 5, I can't find the MDF databases in the zip CSK, do you know where I can get these databases? Also is there anything else in the web.config which needs to be changed like dbo etc?
My configuration is as follows:
I am using .Net 2 framework which I selected from thediscountASP control panel.
My web.config is:
------------------<connectionStrings>
<clear/>
<!--This is the connection to your STORE -->
<add name="CommerceTemplate" connectionString="DataSource=sql2k503.discountasp.net;InitialCatalog =SQL2005_314046_hd;UserID=SQL2005_314046_hd_user;P assword=******;" providerName="System.Data.SqlClient"/>
<!--This is the connection to your Membership System -->
<add name="LocalSqlServer" connectionString="DataSource=sql2k503.discountasp.net;InitialCatalog =SQL2005_314046_hd;UserID=SQL2005_314046_hd_user;P assword=******;" providerName="System.Data.SqlClient"/>
</connectionStrings>
------------------
I have copied the unzip of CSK in a new folder on my web space.
I am getting this error message:
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.ArgumentException: Keyword not supported: 'datasource'.
Source Error:
Line 18: {
Line 19:
Line 20: rptRecentProds.DataSource = SPs.StatsFavoriteProducts(Utility.GetUserName()).G etReader();
Line 21: rptRecentProds.DataBind();
Line 22:
Can someone please help...
Thanks
FMK
bruce
12-09-2006, 02:07 AM
The mdf should be in the App_data directory once you unzip it.
The error you are seeing is usually caused by a bad connection string. Check it again to make sure you put in the correct content.
Bruce
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
vandiermen
12-09-2006, 09:01 AM
Can you please tell me in step 5 what control panel are you talking about, discoundASP.net control panel or VWD2005 control panel? how do I get to the control panel where I may attach the ASPNET.MDF file
Is it theODBC Tool. If so what do I put in theData Source Name [ ]
http://www.budgetwebdesign.com.au/images/ScreenShot_018.jpg
Budget Web Design Australia
www.budgetwebdesign.com.au (http://www.budgetwebdesign.com.au)
Post Edited (vandiermen) : 12/10/2006 5:13:04 PM GMT
vandiermen
12-11-2006, 05:39 AM
The step 5 refers to your DASP Control Panel.Goto , Database Management> MS SQL 200X> SQL Tool Suite>'Attach Data File'. Specify the path w.r.t your application root.
Quote "Vikram" in How to install the ASP.NET 2.0 DotNetNuke 4.3.1 (step 5)
Budget Web Design Australia
www.budgetwebdesign.com.au (http://www.budgetwebdesign.com.au)
fmk786
12-11-2006, 09:19 AM
Hi,
It was the problem with connection string - thanks Bruce ...
Now I am getting different error, the website is working but when I click on the any product on the main page it shows this error. I haven't changed any code at all.
here the error:
-----------------------------------------------------------
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: CS1513: } expected
Source Error:
Line 61: BindProductInfo();
Line 62: TickStats();
Line 63: }
Source File: e:\web\hotdevicesc\htdocs\HotDevices\Product.aspx. cs Line: 63
--------------------------------------------------------------
vvsharma
12-11-2006, 10:01 AM
Thats a Syntax error.Try downloading another version of the same,since you havent touched the code.
Vikram
DiscountASP.NET
www.DiscountASP.NET (http://www.discountasp.net/)
vandiermen
12-11-2006, 12:44 PM
After I attached an ASPNET.MDF to my database and used SQL client to create the Commerce store database schema and objects, I cant seem to recreate my other pages database information..
OK so I got it to work.. http://www.budgetwebdesign.com.au/CommerceStarterKit/
Before I got this to work I tried to make a DotNetNuke site, oh my god, well lets just say I did not get it to work,and I dont intend on trying again anytime soon..
When I tried todo this I had to attach a Database.mdf which deleted my previous database information, kind of like whith this you have to attach aASPNET.MDF
So if Iattach anASPNET.MDF and use SQL client to create the Commerce store database schema and objects, can and how do I use this database for my personal starter kitandmy .aspx login page (http://www.budgetwebdesign.com.au/billhayes_access/login.aspx)which are not working properly after this
In other words I set up a Commerce Starter Kit (http://www.budgetwebdesign.com.au/CommerceStarterKit/)(attach ASPNET.MDF and use SQL client to create the Commerce store database schema and objects) and tried to make the old sites work again, and ranaspnet_regsql.exe -S [DB Server Name] -U [DB login] -P [Password] -A all -d [Database name], and either my sites are not working at all or when I try access the ASP.Net Web Application Administration this does not work properly. I think I will have to rest the database somehow and set up my old one again, and buy a new separate database for the Commerce Starter Kit
Budget Web Design Australia
www.budgetwebdesign.com.au (http://www.budgetwebdesign.com.au)
Post Edited (vandiermen) : 12/11/2006 12:52:40 PM GMT
vivobonitoc
03-13-2007, 08:55 AM
Hi there
I am getting an error while installing commerce starter kit.
I have read the following thread and followed every instruction. I am not able to reproduce the error on my local machine.
http://community.discountasp.net/default.aspx?f=25&m=11684&g=14880#m14880
=================ERROR======================
Server Error in '/' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Unable to convert input xml file content to a DataSet. Type 'urn:ebay:apis:eBLBaseComponents:CurrencyCodeType' is not declared, or is not a simple type.
Source Error:
Line 1:
Line 2: <xs:schema xmlns:ebl='urn:ebay:apis:eBLBaseComponents' xmlns:ns='urn:ebay:apis:CoreComponentTypes' attributeFormDefault='unqualified' elementFormDefault='qualified' targetNamespace='urn:ebay:apis:CoreComponentTypes' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
Line 3: <xs:import schemaLocation='eBLBaseComponents.xsd' namespace='urn:ebay:apis:eBLBaseComponents' />
Source File: /App_Code/App_WebReferences/PayPalSvc/CoreComponentTypes.xsd Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
=============ERROR ================
Any help will be much appreciated.
Thanks
vvsharma
03-14-2007, 12:20 AM
Make sure ,you have uploaded eBLBaseComponents.xsd.Actually,I would recommend to upload all the files again,it seems you are missing something.
Vikram
DiscountASP.NET
www.DiscountASP.NET (http://www.discountasp.net/)
bigjimcalhoun
01-06-2008, 07:30 AM
http://community.discountasp.net/emoticons/freaked.gifthink some things have changed considerable since this was first written.
The new webconfig has this for connection strings
<dataConfiguration defaultDatabase="CommerceTemplate"/>
<!--################################ Connection Strings ################################################-->
<!--DONOTREMOVE-->
<connectionStrings>
<clear />
<add name="CommerceTemplate" connectionString="STOREDATASOURCEUNSET" providerName="System.Data.SqlClient" />
</connectionStrings>
<!--/DONOTREMOVE-->
<!--################################################## ##################################################-->
vBulletin® ©Jelsoft Enterprises Ltd.