In an action pursuant to RPAPL 1501 for a judgment declaring certain mortgages to be invalid and directing the Suffolk County Clerk to cancel and discharge the mortgages, the plaintiff appeals from an order of the Supreme Court, Suffolk County (Gazzillo, J.), dated May 13, 2013, which granted the defendant’s motion pursuant to CPLR 3211 (a) (7) to dismiss the complaint and denied, as academic, his cross motion for summary judgment on the complaint.
Ordered that the order is affirmed, with costs.
The plaintiff commenced this action for a judgment declaring two mortgages on premises at 377 Chase Drive, Bridgehampton, New York, held by the defendant, JPMorgan Chase Bank, N.A. (hereinafter JPMorgan Chase), to be invalid and directing the Suffolk County Clerk to cancel and discharge the mortgages on the ground that they are unenforceable. The premises were the subject of a prior mortgage foreclosure action commenced on July 2, 2009, in the Supreme Court, Suffolk County, by JPMorgan Chase against, among others, the plaintiff. By order dated March 7, 2012, the Supreme Court granted the plaintiffs motion for summary judgment dismissing JPMorgan Chase’s complaint in the mortgage foreclosure action on the ground that JPMorgan Chase failed to establish that it had standing to bring the action. The Supreme Court stated in the order that the failure of JPMorgan Chase to comply with the plaintiff’s discovery demands and a discovery order provided an independent ground for striking the complaint. The plaintiff commenced this action pursuant to RPAPL 1501 for a judgment declaring the mortgages invalid, alleging that the notes and mortgages were no longer enforceable as a result of the order dated March 7, 2012.
On a motion to dismiss pursuant to CPLR 3211 (a) (7) for failure to state a cause of action, the court must accept the facts alleged in the complaint as true, accord the plaintiff the benefit of every possible favorable inference, and determine only *1031whether the facts as alleged fit within any cognizable legal theory (see Goshen v Mutual Life Ins. Co. of N.Y., 98 NY2d 314, 326 [2002]; Leon v Martinez, 84 NY2d 83, 87 [1994]; Sposato v Paboojian, 110 AD3d 979 [2013]; Constructamax, Inc. v Dodge Chamberlin Luzine Weber, Assoc. Architects, LLP, 109 AD3d 574 [2013]). Where, as here, evidentiary material is submitted and considered on a motion pursuant to CPLR 3211 (a) (7), and the motion is not converted into one for summary judgment, the question becomes whether the plaintiff has a cause of action, not whether the plaintiff has stated one, and unless it has been shown that a material fact claimed by the plaintiff to be one is not a fact at all, and unless it can be said that no significant dispute exists regarding it, dismissal should not eventuate (see Guggenheimer v Ginzburg, 43 NY2d 268, 275 [1977]; Sposato v Paboojian, 110 AD3d at 979; Constructamax, Inc. v Dodge Chamberlin Luzine Weber, Assoc. Architects, LLP, 109 AD3d at 574-575).
RPAPL 1501 (4) provides that “[w]here the period allowed by the applicable statute of limitation for the commencement of an action to foreclose a mortgage . . . has expired,” any person with an estate or interest in the property may maintain an action “to secure the cancellation and discharge of record of such encumbrance, and to adjudge the estate or interest of the plaintiff in such real property to be free therefrom” (RPAPL 1501 [4]). In opposition to the motion of JPMorgan Chase to dismiss the complaint, the plaintiff failed to establish that the foreclosure action commenced by JPMorgan Chase against him in 2009 was dismissed on the merits (see JBR Constr. Corp. v Staples, 71 AD3d 952 [2010]), and that the commencement of a new foreclosure action would be time-barred by the applicable six-year statute of limitations (see CPLR 213 [4]; LePore v Shaheen, 32 AD3d 1330, 1331 [2006]; Corrado v Petrone, 139 AD2d 483 [1988]; see also Plaia v Safonte, 45 AD3d 747 [2007]; Zinker v Makler, 298 AD2d 516 [2002]). Contrary to the plaintiffs contention, a dismissal premised on lack of standing is not a dismissal on the merits for res judicata purposes (see Landau, P.C. v LaRossa, Mitchell & Ross, 11 NY3d 8, 13 n 3 [2008]; Alco Gravure, Inc. v Knapp Found., 64 NY2d 458, 465 [1985]; Jackson v Jamaica Hosp. Med. Ctr., 61 AD3d 1166 [2009]; Tico, Inc. v Borrok, 57 AD3d 302 [2008]; Pullman Group v Prudential Ins. Co. of Am., 297 AD2d 578 [2002]). Furthermore, the alternative basis for dismissal of the prior action, the striking of the complaint for noncompliance with a discovery order, was not a dismissal on the merits (see Maitland v Trojan Elec. & Mach. Co., 65 NY2d 614, 615-616 [1985]; Daluise v Sottile, 40 AD3d 801 [2007]; Aguilar v Jacoby, 34 AD3d 706, 707 *1032[2006]; Stray v Lutz, 306 AD2d 836, 836-837 [2003]; Bullock v Wehner, 263 AD2d 739, 740 [1999]; see also CPLR 5013). Accordingly, the Supreme Court properly granted JPMorgan Chase’s motion to dismiss the complaint for failure to state a cause of action and denied, as academic, the plaintiffs cross motion for summary judgment on the complaint.
The plaintiff’s remaining contentions are without merit.
Skelos, J.P, Dickerson, Maltese and LaSalle, JJ., concur.