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 6 of 6

Thread: gccallback.aspx

  1. #1
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default gccallback.aspx

    I am noticing a ton of errors showing up in my system log. It is as follows:

    Code:
    Page URL:/product/8209/gccallback.aspx 
    Source:App_Code.9ooxpul4 
    Message:Object reference not set to an instance of an object. 
    Stack Trace: 
    at AspDotNetStorefront.SkinBase.get_CheckUserAgentForMobile() 
    at AspDotNetStorefront.SkinBase.GetTemplateName() 
    at AspDotNetStorefront.SkinBase.OnPreInit(EventArgs e) 
    at System.Web.UI.Page.PerformPreInit() 
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    This seems to happen for every product page and I cannot figure it out. The only thing I have done was clear out the mobile table as I don't want the mobile profile to show for anyone.

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Please open {root}/app_code/skinbase.cs and try changing your CheckUserAgentForMobile() method with this one. Be sure to make a backup first before anything else.

    Code:
    public bool CheckUserAgentForMobile
            {
                get
                {
                    try
                    {
                        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();
                        }
                    }
                    catch
                    {
                        return false;
                    }
    
                    return false;
                }
            }

  3. #3
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default

    Is there any problem with just commenting all that out and having a return false; only?

  4. #4
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default

    After doing this, now I'm getting an exception the exact same as above but the source is
    Code:
    Source:App_Code.ek-htowu

  5. #5
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Please send a ticket to support instead so I can send you the SkinBase.cs file and compare it against your version to make sure we're not messing up things, Ok?

  6. #6
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default

    I have done two things that could have possibly fixed my problem with the gccallback.aspx error as I no longer see them (9013).

    I set the checkuseragentformobile() to always be false (because we don’t have mobile site yet) and I also followed ssgumby’s post about reverting the “private static SqlCommand cmdGetState” to how version 8 did it http://forums.aspdotnetstorefront.co...422#post100422