How to install ASP.NET 2.0 Commerce Starter kit?

Discussion in 'ASP.NET Starter Kits' started by pleblanc, Jun 20, 2006.

  1. I follow all of the directions step by step. I am stuck at number 6. Can you please give # 6 directions step by step?
     
  2. 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
     
  3. 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
     
  4. Are the 'add' elements within the <connectionStrings></connectionStrings> section?

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  5. 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.

     
  6. 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|CommerceDB.mdf" providerName="System.Data.SqlClient" />


    <add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|ASPNET.mdf" providerName="System.Data.SqlClient" />


    </connectionStrings>


    However...I used yours and endered the correct db, password, username...etc.
     
  7. 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
     
  8. 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|CommerceDB.mdf" providerName="System.Data.SqlClient" />


    <add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|ASPNET.mdf" providerName="System.Data.SqlClient" />


    </connectionStrings>
    Should I just cut and copy what you have in session 3 and modify with my db information?
     
  9. 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!!!!!!
     
  10. 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
    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
     
  11. Bruce

    Bruce DiscountASP.NET Staff

    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
     
  12. 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>
    </o:p>
    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</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
     
  13. 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

    Post Edited (Aristotle [DASP]) : 7/11/2006 11:02:37 PM GMT
     
  14. 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:
     
  15. 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!
     
  16. 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.
     
  17. 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(GetUserName());
    Line 91: ShoppingCart cart = new ShoppingCart();
    Line 92: cart.Load(rdr);


    Source File: e:\web\brinksterne\htdocs\App_Code\BLL\ShoppingCartManager.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
     
  18. Bruce

    Bruce DiscountASP.NET Staff

    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
     
  19. 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;Password=******;" 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;Password=******;" 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:





    Code:
    Line 18:         {
    Line 19:             
    Line 20:             rptRecentProds.DataSource = SPs.StatsFavoriteProducts(Utility.GetUserName()).GetReader();
    Line 21:             rptRecentProds.DataBind();
    Line 22: 
    Can someone please help...

    Thanks
    FMK
     
  20. Bruce

    Bruce DiscountASP.NET Staff

    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
     
  21. 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 [ ]

    [​IMG]





























    Budget Web Design Australia
    www.budgetwebdesign.com.au

    Post Edited (vandiermen) : 12/10/2006 5:13:04 PM GMT
     
  22. 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
     
  23. 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:








    Code:
    Line 61: 		BindProductInfo();
    Line 62: 		TickStats();
    Line 63: 	}
    
    Source File: e:\web\hotdevicesc\htdocs\HotDevices\Product.aspx.cs Line: 63

    --------------------------------------------------------------
     
  24. Thats a Syntax error.Try downloading another version of the same,since you havent touched the code.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  25. 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 which are not working properly after this

    In other words I set up a Commerce Starter Kit(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

    Post Edited (vandiermen) : 12/11/2006 12:52:40 PM GMT
     
  26. 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
     
  27. 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
     
  28. [​IMG]think 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-->


    <!--####################################################################################################-->
     

Share This Page