an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > User Login fault, raises exception error, inste...
Last Post 5/27/2009 10:22:33 AM By Bahram. 5 replies.
5/26/2009 10:41:01 AM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
User Login fault, raises exception error, instead of simple message to user
 
Hi Luke
 
If a user has login mistype, Then why the error handler raises exception, insted of proper message to trhe user.
 
 
Bahram
5/26/2009 11:30:06 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: User Login Error, raises exception error, instead of simple message to user
Please post the exception detail. We cannot help you without context.
DotShoppingCart Staff
5/26/2009 4:10:32 PM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
False Login attemot error logs , raises exception error, instead of simple message to user
 

ObjectDataSource 'odsProducts' could not find a non-generic method 'GetProductCount' that has parameters: keywords, categoryId, sortBy.

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.InvalidOperationException: ObjectDataSource 'odsProducts' could not find a non-generic method 'GetProductCount' that has parameters: keywords, categoryId, sortBy.

Source Error:

unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below
5/26/2009 4:16:21 PM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
Re: User Login Error, raises exception error, instead of simple message to user
Hi luke,
 
Also You can do it on any test site :
 
Type a fake username and password more than 2 times
 
Bahram
5/26/2009 4:59:42 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: User Login fault, raises exception error, instead of simple message to user
This was a bug that has been fixed in the latest zip package.
 
In web\Controls\Core\Search.ascx.cs replace Page_Load with the code as follows.
 
    protected void Page_Load(object sender, EventArgs e) {
        EnableViewState = WebUtils.IsPageEditorEnable();
 
        if (null != Data) {
            searchData = Utils.FromXml<SearchData>(Data.ToString());
        }
 
        if (EditModeEnabled) {
            SwitchToEditor();
            return;
        }
 
        lvwProducts.GroupItemCount = searchData.Columns;
        bool showOutofStockPara = false;
        foreach (Parameter p in odsProducts.SelectParameters) {
            if (p.Name == "showOutofStock") {
                showOutofStockPara = true;
                break;
            }
        }
        if (!showOutofStockPara)
            odsProducts.SelectParameters.Add("showOutofStock", StoreConfigurationSection.GetSection().ShowStock.ToString());
        if (searchData.ProductsPerPage == 0)
            searchData.ProductsPerPage = SearchData.Default.ProductsPerPage;
        dpg2.PageSize = searchData.ProductsPerPage;
 
        keywords = Utils.GetParameter("q", string.Empty);
        lblSearchKeywords.Text = keywords;
        if (!string.IsNullOrEmpty(keywords)) {
            lvwProducts.DataBind();
            ProductCount = dpg2.TotalRowCount;
            lvwPages.DataBind();
            TextCount = dpg.TotalRowCount;
        } else {
            lvwProducts.Visible = lvwPages.Visible = false;
        }
 
        pnlEmptyResult.Visible = ProductCount + TextCount == 0;
        dvProducts.Visible = ProductCount > 0;
        dvPages.Visible = TextCount > 0;
    }
 
DotShoppingCart Staff
5/27/2009 10:22:33 AM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
Re: User Login fault, raises exception error, instead of simple message to user
Hi Luke,
 
The exception error raise was fixed, but these are remaining issues :
 
1- The message should appear after 3 times flase attempt ( It appears after 2 )
2- The message is wrong, it is the same message as for search : Where can I put new  message not to mix with Search not found
 
Search Results
You searched for the word(s):
 
No product is found by your search.