Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 29 of 29

Thread: Server Errors

  1. #1
    Penny is offline Junior Member
    Join Date
    Aug 2008
    Posts
    18

    Default Server Errors

    We have recently upgrading our version of AspDotNetStorefront from v7 to v9. Since the upgrade, we have received an endless amount of Server Errors. There have been a wide range of errors that have populated and have become quite troublesome for customers and employees. I have attached an image, which contains screenshots of 2 of the many errors that we have received. I am not a programmer and have no idea what could be causing this issue. The programmers that we do have, have been working on the issue with no success. If anyone has any input on the matter, please help.

    Thank you for any and all help provided.
    Attached Images Attached Images  

  2. #2
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Hi Penny

    We also saw this issue when upgrading a site from v7 to v9. We've also seen it on v9 sites when updating some of the Dlls in the /bin directory when the site is running.

    The solution seems to be to recycle the Application Pool in IIS. If this doesn't work, stop and restart the Application Pool.

    As a secondary measure, on the 'v7 to v9' site, we also reduced the time between application pool recycles to about 3hrs from what I think is the standard 29hrs.

    Adam

  3. #3
    tom18845 is offline Member
    Join Date
    Jul 2008
    Posts
    31

    Default Server Error in '/' Application

    I'm having the same issues on our site. We have been getting this server error after upgrading from v7 to v9.

    In order for me to get the site back up again, we had to restart IIS each time.

    We are getting this error daily now.

    Below is the same error message that I"m getting.


    Error #1

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    N
    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.IndexOutOfRangeException: N

    Source Error:

    An 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.

    Stack Trace:


    [IndexOutOfRangeException: N]
    System.Data.ProviderBase.FieldNameLookup.GetOrdina l(String fieldName) +4841826
    System.Data.SqlClient.SqlDataReader.GetOrdinal(Str ing name) +67
    AspDotNetStorefrontCore.DB.RSFieldInt(IDataReader rs, String fieldname) +213
    AspDotNetStorefrontCore.DB.GetSqlN(String Sql) +197
    AspDotNetStorefrontCore.AppLogic.IPIsRestricted(St ring IPAddress) +116
    AspDotNetStorefront.Global.(Object , EventArgs ) +367
    AspDotNetStorefront.Global.Application_Authenticat eRequest(Object sender, EventArgs e) +147
    System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute() +68
    System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +75




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.4206; ASP.NET Version:2.0.50727.4209



    Error #2


    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    CustomerID
    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.IndexOutOfRangeException: CustomerID

    Source Error:

    An 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.

    Stack Trace:


    [IndexOutOfRangeException: CustomerID]
    System.Data.ProviderBase.FieldNameLookup.GetOrdina l(String fieldName) +4841826
    System.Data.SqlClient.SqlDataReader.GetOrdinal(Str ing name) +67
    AspDotNetStorefrontCore.DB.RSFieldInt(IDataReader rs, String fieldname) +213
    AspDotNetStorefrontCore.Customer.Init(IDataReader rs) +1304
    AspDotNetStorefrontCore.Customer.Init(Int32 CustomerID) +358
    AspDotNetStorefrontCore.Customer..ctor(SqlTransact ion DBTrans, Int32 CustomerID, Boolean SuppressCookies, Boolean UseDBDataOnly) +145
    AspDotNetStorefrontCore.Customer..ctor(Int32 CustomerID, Boolean SuppressCookies, Boolean UseDBDataOnly) +49
    AspDotNetStorefrontCore.Customer..ctor(Int32 CustomerID, Boolean SuppressCookies) +44
    AspDotNetStorefrontCore.Customer..ctor(Boolean SuppressCookies) +41
    AspDotNetStorefront.Global.(Object , EventArgs ) +1776
    AspDotNetStorefront.Global.Application_Authenticat eRequest(Object sender, EventArgs e) +147
    System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute() +68
    System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +75




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.4206; ASP.NET Version:2.0.50727.4209

  4. #4
    tom18845 is offline Member
    Join Date
    Jul 2008
    Posts
    31

    Default

    Adam, if I set the application pool to recycles every 3 hours, will this end the session for our customers while they are online placing orders, login to view their orders status, etc?

    Also, is this a code issues and do you have any fix for it?

    Thanks!

  5. #5
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Hi Tom

    We've had the Apppool recycling change implemented for about 5 months on one heavy traffic site without any issues with Customers being thrown out. Thinking aloud, the cart information is stored in the database so nothing should be lost during a recycle but yes, I guess it could log the customers out.

    I don't personally have a code fix for this issue - good question for the ASPDNSF support team.

  6. #6
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    I suspect there is a larger issue here and its not related to v7 - v9. I have a v9 site from scratch that had those errors, I resolved them but don't recall what I did exactly. I have a recurring issue similiar to this in Applogic.GetStateId which I am still trying to figure out. The issue when it rears its ugly head will bring the site down and only an app pool recycle will resolve it.

    I may change the recycle time to 3 hours to see if that helps. I have a strange suspicion this is all a threading issue.

  7. #7
    tom18845 is offline Member
    Join Date
    Jul 2008
    Posts
    31

    Default

    Hi All,

    We have changed our application pool setting to 6 hours and I"m still getting this error message.

    Because this is our busy season, our site is getting a lot more traffic so it look like the application pool setting is not enough.

    Anyone have a fix for this issues?

    Thanks,
    Tom
    Last edited by tom18845; 12-07-2010 at 04:06 PM.

  8. #8
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Ive made some code changes, set my app pool too recycle every 4 hours AND to recycle each day at 8 am eastern. I set 8 am eastern as Mcafee Secure scan completes around 7:30ish each day. So far *knocking on wood* my site hasnt went down for a few days now so we'll see.

  9. #9
    tom18845 is offline Member
    Join Date
    Jul 2008
    Posts
    31

    Default

    ssgumby,

    I'm lowering down my application pool to 3 hours as well to see if this helps.

    Which code did you have to change on your website? Would you be able to share this?

    Thanks!

  10. #10
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Let me find the code I changed then ill get back to you. Im not in the office right now.

    Curious, do you have Mcafee Secure on your site?

  11. #11
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    I should have not jinxed myself, my site crashed again this morning. Here is the error that eventually leads to a all out site crash.

    Code:
    Page URL:/Default.aspx 
    Source:System.Data 
    Message:An SqlParameter with ParameterName '@Abbreviation' is not contained by this SqlParameterCollection. 
    Stack Trace: 
    at System.Data.SqlClient.SqlParameterCollection.GetParameter(String parameterName) 
    at System.Data.SqlClient.SqlParameterCollection.get_Item(String parameterName) 
    at AspDotNetStorefrontCore.AppLogic.GetStateID(String StateAbbreviation) in C:\inetpub\wwwroot\AspDotNetStorefront9.0\ASPDNSFCore\AppLogic.cs:line 7106 
    at AspDotNetStorefrontCore.Shipping.ShippingMethodIsValid(Int32 ShippingMethodID, String StateAbbrev, String CountryName) in C:\inetpub\wwwroot\AspDotNetStorefront9.0\ASPDNSFCore\Shipping.cs:line 115 
    at AspDotNetStorefrontCore.ShoppingCart.AnalyzeCartForFreeShippingConditions(Int32 AddressID) in C:\inetpub\wwwroot\AspDotNetStorefront9.0\ASPDNSFCore\ShoppingCart.cs:line 8081 
    at AspDotNetStorefrontCore.ShoppingCart..ctor(SqlTransaction DBTrans, Int32 SkinID, Customer ThisCustomer, CartTypeEnum CartType, Int32 OriginalRecurringOrderNumber, Boolean OnlyLoadRecurringItemsThatAreDue, Boolean IsAjaxMiniCart) in C:\inetpub\wwwroot\AspDotNetStorefront9.0\ASPDNSFCore\ShoppingCart.cs:line 688 
    at AspDotNetStorefrontCore.ShoppingCart..ctor(Int32 SkinID, Customer ThisCustomer, CartTypeEnum CartType, Int32 OriginalRecurringOrderNumber, Boolean OnlyLoadRecurringItemsThatAreDue, Boolean IsAjaxMinicart) in C:\inetpub\wwwroot\AspDotNetStorefront9.0\ASPDNSFCore\ShoppingCart.cs:line 597 
    at AspDotNetStorefront.MinicartControl.InitializeDataSource() 
    at AspDotNetStorefront.MinicartControl.OnInit(EventArgs e) 
    at System.Web.UI.Control.InitRecursive(Control namingContainer) 
    at System.Web.UI.Control.AddedControl(Control control, Int32 index) 
    at System.Web.UI.ControlCollection.Add(Control child) 
    at AspDotNetStorefront.MasterPageBase.LoadMiniCartIfEnabled() 
    at AspDotNetStorefront.MasterPageBase.OnInit(EventArgs e) 
    at System.Web.UI.Control.InitRecursive(Control namingContainer) 
    at System.Web.UI.Control.InitRecursive(Control namingContainer) 
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  12. #12
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Ok, hopefully im not jinxing myself again. But i've made a code change and so far so good (no crashes). In fact, my error log is exceptionally clean and my orders are up .. orders are up because, well, because my site is up.

    Anyway, in Applogic.cs i've nuked the following code and implemented a method(s) to get the state id using simple sql and an IDataReader. Seeing as how I consistently had zillions of errors with regards to these params being out of whack it seemed like the only solution. The code now is identical to version 8.0.1.3 which never had an issue.

    ASPDNSF, I would strongly suggest going back to how this was done in 8.x.


    Code:
            /// <summary>
            /// SQLCommand that Selects the stateID or 0 based on parameters
            /// </summary>
            private static SqlCommand cmdGetState
            {
                get
                {
                    if (_cmdGetState == null)
                    {
                        _cmdGetState = new SqlCommand(@"
                        DECLARE @StateID INT
                        SELECT @StateID = StateID FROM STATE WITH (NOLOCK)
                            WHERE (Abbreviation = @Abbreviation OR @Abbreviation IS NULL)
    	                    AND ([Name] = @StateName OR @StateName IS NULL)
                            AND (CountryID = @CountryID OR @CountryID IS NULL)
                        SELECT ISNULL(@StateID, 0) AS [StateID]
                        ");
                        _cmdGetState.Parameters.AddRange(new SqlParameter[]{
                            new SqlParameter("@Abbreviation", DBNull.Value),
                            new SqlParameter("@CountryID", DBNull.Value),
                            new SqlParameter("@StateName", DBNull.Value)
                        });
                    }
                    return _cmdGetState;
                }
                set
                {
                    _cmdGetState = null;
                }
            }

  13. #13
    tom18845 is offline Member
    Join Date
    Jul 2008
    Posts
    31

    Default Server Error

    There is an option in the admin.
    Configuration ->Maintanence->Monthly Maintanecne.Check the Tune Indexes checkbox and select the Go Button.This will retune all database Indexes.This has solved our problem

  14. #14
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    My post above has solved my problem, been over a month with that fix and no site crash

  15. #15
    abhinesh is offline Junior Member
    Join Date
    Feb 2010
    Posts
    9

    Default

    We were also getting the same error.
    There is an option in the admin site to tune the Indexes.
    For this you have to go to Configuration -> Maintanence -> Monthly Maintanence
    On the bottom you have a check box Tune Indexes,check it and press the Go Button.After completing the process you will be logged out from the admin site.
    That has solved our issue.

  16. #16
    toofast is offline Senior Member
    Join Date
    Dec 2005
    Location
    Cherry Hill, NJ, USA
    Posts
    239

    Default

    i'm getting same error. the tuning didn't fix the error, does anyone else have a fix? or is ssgumby's fix the best solution still?

  17. #17
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Quote Originally Posted by toofast View Post
    i'm getting same error. the tuning didn't fix the error, does anyone else have a fix? or is ssgumby's fix the best solution still?
    I can say since I made this change my site hasnt crashed since. My traffic is steadily building and so far so good. Before this change it crashed daily. I worked directly with Vortx and they had no solution. I narrowed it down to this, made the change and its been what, 5 months now, and solid. Id say make this change and see if you see the same thing.

  18. #18
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Default

    We are seeing the same errors as Tom and it is bringing our website down every 5-10 minutes, we have the app pool set to 3 minutes to try and keep ontop of the crashing. This is simply mental. We never had the slightest hint of this issue on ver 8.

    We have updating from 8 to 9 and the errors are non stop.

    We did not see any errors in our dev or local host, but as soon as it went live this happened.

    We are completely lost with what to do. We can not find any solution at all.
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience

  19. #19
    toofast is offline Senior Member
    Join Date
    Dec 2005
    Location
    Cherry Hill, NJ, USA
    Posts
    239

    Default

    this is really troubling, hope to hear good news

  20. #20
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Default

    As more users has started hitting the website it was going down every 3 minutes or so. We have changed the app pool to restart every minute and so far we can get through to the checkout.

    I have looked at the performance as the SQL usage. The errors being returned seem completely pointless. We know this is not any of our mods as it worked on localhost, worked on the dev website (which is on and uses the same settings as the live), if there was a problem with our code it would just outright crash.

    Any ideas of a pattern? I have heard some ver 9 websites get these errors and they are pretty sporadic.

    Edit:

    Just to add most of our crashes are ending with a stack trace dying on
    Code:
    System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
    Last edited by DotNetDevelopments; 06-16-2011 at 07:57 AM.
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience

  21. #21
    toofast is offline Senior Member
    Join Date
    Dec 2005
    Location
    Cherry Hill, NJ, USA
    Posts
    239

    Default

    here is one of the random errors i am getting, when you go to this page, you wont see an error, so i'm not sure why this error popped up randomly.....

    HTML Code:
    Process information: 
        Process ID: 9988 
        Process name: w3wp.exe 
     
    Exception information: 
        Exception type: NullReferenceException 
        Exception message: Object reference not set to an instance of an object. 
     
    Request information: 
        Request URL: http://www.toofastonline.com/p-12152-iron-fist-frank-the-tank-tote.aspx 
        Request path: /p-12152-iron-fist-frank-the-tank-tote.aspx 
        Is authenticated: False 
        Authentication Type: Forms 
     
    Thread information: 
        Thread ID: 22 
        Is impersonating: False 
        Stack trace:    at AspDotNetStorefront.SkinBase.get_CheckUserAgentForMobile() in c:\inetpub\vhosts\toofastonline.com\httpdocs\App_Code\SkinBase.cs:line 133
       at AspDotNetStorefront.SkinBase.GetTemplateName() in c:\inetpub\vhosts\toofastonline.com\httpdocs\App_Code\SkinBase.cs:line 185
       at AspDotNetStorefront.SkinBase.OnPreInit(EventArgs e) in c:\inetpub\vhosts\toofastonline.com\httpdocs\App_Code\SkinBase.cs:line 520
       at System.Web.UI.Page.PerformPreInit()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     

  22. #22
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Default

    We had that error pop up a few times, we don't use mobiles and had cleared the table.

    To ensure nothing would ever happen or even try and happen we then change that code in the app_code/skinbase.cs

    Code:
    public bool CheckUserAgentForMobile
            {
                get
                {
                    //using (SqlConnection conn = new SqlConnection(DB.GetDBConn()))
                    //{
                    //    conn.Open();
    
                    //    String usrAgent = HttpContext.Current.Request.UserAgent.ToLowerInvariant();
    
                    //    using (IDataReader rs = DB.GetRS("select UserAgent from dbo.MobileDevice with(NOLOCK)", conn))
                    //    {
                    //        while (rs.Read())
                    //        {
                    //            String mDevice = DB.RSField(rs, "UserAgent").ToLowerInvariant();
    
                    //            if (usrAgent.Contains(mDevice))
                    //            {
                    //                rs.Close();
                    //                rs.Dispose();
    
                    //                return true;
                    //            }
                    //        }
                    //    }
                    //    conn.Close();
                    //    conn.Dispose();
                    //}
    
                    return false;
                }
            }
    basically we have commented out everything but return false so it doesn't even open a connection with the db.
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience

  23. #23
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Quote Originally Posted by DotNetDevelopments View Post
    As more users has started hitting the website it was going down every 3 minutes or so. We have changed the app pool to restart every minute and so far we can get through to the checkout.

    I have looked at the performance as the SQL usage. The errors being returned seem completely pointless. We know this is not any of our mods as it worked on localhost, worked on the dev website (which is on and uses the same settings as the live), if there was a problem with our code it would just outright crash.

    Any ideas of a pattern? I have heard some ver 9 websites get these errors and they are pretty sporadic.

    Edit:

    Just to add most of our crashes are ending with a stack trace dying on
    Code:
    System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
    Have you tried my code change shown above? My site runs without issue since that change, prior to that change it crashed continously.

  24. #24
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Default

    Hey ssgumby,

    I am running ver 9.1.0.1 and that change is already present.

    Some of the errors we see
    Code:
    Exception type: IndexOutOfRangeException
        Exception message: LevelDiscountsApplyToExtendedPrices
    
        Exception type: IndexOutOfRangeException
        Exception message: PropertyName
    
        Exception type: IndexOutOfRangeException
        Exception message: N
    
        Exception type: NullReferenceException
        Exception message: Object reference not set to an instance of an object.
    
        Exception type: IndexOutOfRangeException
        Exception message: CustomerID
    This seems to be when in real use.
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience

  25. #25
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Default

    Once last update, ssgumby's change does work. I just replaced the code with the same code from ver 8 and no problems on the dev server when stress testing.
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience

  26. #26
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Quote Originally Posted by DotNetDevelopments View Post
    Once last update, ssgumby's change does work. I just replaced the code with the same code from ver 8 and no problems on the dev server when stress testing.
    Excellent, glad to hear!

  27. #27
    espey127 is offline Junior Member
    Join Date
    Aug 2009
    Posts
    15

    Default

    Does anyone have any ideas how to fix this issue with when using MS 9.1.0.1? Our site is total junk, its in a continuous state of crashing. We spend more time dealing with customer complaints than processing orders.

    Where is ASPDNSF or Vortx comments regrading this painful problem!

    We have been burned when we purchased DNN. Then got burned when we purchased ML9 and was then forced into MS which we had been told would fix all of the bugs form ML.

    Where is the justification for our companies to spend all of our time, money and resources to invest into a broken cart?

    Sorry to have to post this here but I wasn't sure my voice would be heard elsewhere.

  28. #28
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    We are in the final stages of testing a fix that looks to take care of this problem. We've got it running on a live site now and everything looks good so far - we've got a few things left to check and as soon as it's ready, I'll be replying here with information on how to get the patch we've created.

    I apologize on the behalf of everyone for how long it took to get an update out for this, but as this thread shows, there seem to be different conditions that cause the problem to pop up, when it even does. Most sites never run into this, so it's been tricky to track down.

    Update coming soon.

  29. #29
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default Patch posted

    We have posted patches for this issue on versions 9.0.1.3, 9.0.1.3 SP1, and 9.1.0.1 at http://www.aspdotnetstorefront.com/t...ool-patch.aspx

    If you run into any problems with the patch, please let us know!