
505 N.W.2d 191 (1993)
Don MOYER, Appellant,
v.
CITY OF DES MOINES, John Pat Dorrian, Archie Brooks, Connie Cook, Tom Vlassis, Rick Jorgensen, and George Flagg, Appellees,
44th Street Neighborhood Association, et al., Intervenors-Appellees.
No. 92-644.
Supreme Court of Iowa.
August 25, 1993.
As Corrected September 21, 1993.
*192 Robert A. Nading II of Nading Law Firm, Ankeny, for appellant.
Lawrence R. McDowell, City Sol., Des Moines, for appellees.
F. Richard Lyford of Dickinson, Throckmorton, Parker, Mannheimer & Raife, P.C., Des Moines, for intervenors-appellees.
Considered by HARRIS, P.J., and LARSON, CARTER, NEUMAN, and SNELL, JJ.
CARTER, Justice.
Residential developer Donald Moyer appeals from judgments dismissing his two-count petition against the City of Des Moines and individual city council members. The action sought damages against the City and members of the city council for alleged willful actions to preclude the building of a proposed condominium development. In addition, the action sought a writ of mandamus to compel a site approval for an eleven-unit condominium project. After considering the arguments presented, we reverse the judgment of the district court as it pertains to dismissal of the count seeking money damages. We vacate the judgment of that court as it pertains to the mandamus action and remand that issue for dismissal on mootness grounds.
The present conflict arises because, although the property on which Moyer at one time held an option to build a condominium development is zoned for that use, a proposed condominium project was denied by city authorities under a so-called "Site Plan Review Ordinance." The City claimed that the site failed to satisfy unspecified density requirements. It was also suggested, in denying site approval, that the project failed to meet a fifty-foot setback requirement.[1]
The district court granted defendants' motion to dismiss the count seeking money damages on the ground that the petition alleged a failure to perform a discretionary function, thus rendering the City and its council members immune from suit under Iowa Code section 613A.4(3) (1989).[2] On the count seeking a writ of mandamus, the district court granted a motion for summary judgment on the theory that the actions of the City were discretionary and, consequently, did not involve conduct that could be compelled under a writ of mandamus.
Moyer urges on appeal that his count seeking money damages in fact alleges that defendants' actions were a bad-faith violation of a known legal duty (paragraph 12) and were "willful and intentional" (paragraph 13). Those allegations, he asserts, were sufficient to preclude the granting of a motion to dismiss on a discretionary function theory. Defendants seek to avoid the effect of these allegations by claiming that allegations of a petition need not be accepted when a motion to dismiss is based on subject matter jurisdiction under Iowa Rule of Civil Procedure 104(a).
We conclude that, in the present case, the allegations of the petition on the count seeking money damages did have to be accepted as true by the district court in ruling on the motion to dismiss. If the immunity claim under section 613A.4(3) is a matter of subject matter jurisdiction, it is still necessary to establish the facts upon which that claim may be predicated. The allegations of the petition assert that the nature of the proposed development (the details of which are not to be found in the pleadings and would be a matter of proof at trial) was such that there was in fact no discretion to deny site approval and a building permit. It is further alleged that the City's refusal was done willfully with knowledge of that fact. The pleadings *193 do not contradict these claims, and the defendants have made no evidentiary record disputing the allegations.[3]
The fact that the application of the Site Plan Review Ordinance by city officials may involve the performance of discretionary functions does not mean that this will be so in all instances. Factual situations can be visualized under which the conditions of that ordinance might be satisfied beyond dispute. In addition, under a broad interpretation of Moyer's pleadings, a claim is made for reliance damages incurred as a result of the City's unreasonable delay in communicating the grounds upon which his application was ultimately denied.
A second reason for holding that the district court was bound by the allegations of the petition on the money damages count is our disbelief that the determination of statutory immunity for certain acts or omissions of municipal corporations or their employees under section 613A.4 is really an issue of subject matter jurisdiction. In Hansen v. City of Audubon, 378 N.W.2d 903, 905 (Iowa 1985), we discussed the litigant's contention that, by analogy to the State Tort Claims Act, immunity issues under section 613A.4 involve matters of subject matter jurisdiction. We did not adopt or reject that contention in Hansen because we found no immunity available to the municipal corporation in that case. We now conclude that section 613A.4 issues are more properly characterized as substantive rules of law affecting the municipal corporation's liability on the merits. The district courts do have subject matter jurisdiction to hear claims involving these rules of law and to issue judgments on the merits for or against the municipal corporation based on these statutes. Based on these conclusions, the motion to dismiss was actually one involving rule 104(b) rather than rule 104(a). As such, the grounds of a motion to dismiss must be based on the contents of the pleading assailed. Iowa Truck Ctr., Inc. v. Davis, 204 N.W.2d 630, 634 (Iowa 1973). We reverse the order sustaining the motion to dismiss and remand the case for further proceedings on the count seeking money damages.
On the count seeking mandamus relief, the district court concluded that the acts or omissions were of a discretionary nature and thus not of a type that would permit the issuance of a writ of mandamus. Although that ruling was made on a motion for summary judgment rather than a motion to dismiss, there were no affidavits, other than a conclusory affidavit not complying with Iowa Rule of Civil Procedure 237(e), offered by defendants to negate Moyer's allegations that his site proposal was such that the City was without discretion under the ordinance to deny it. We therefore must conclude that summary judgment was inappropriate on the ground given by the district court. There were, however, other grounds urged in support of the summary judgment motion.
A successful party, without appealing, may attempt to save a judgment on appeal based on grounds urged in the district court but not considered by that court. Berger v. General United Group, Inc., 268 N.W.2d 630, 634 (Iowa 1978). We decline the invitation to rule on the other grounds of defendants' motion for summary judgment, however, because it appears that the mandamus issue is now moot. Moyer's option to build on the property has expired. Consequently, we vacate the district court's ruling on the mandamus issues and remand the case to that court for an order dismissing those issues as moot.
Costs of appeal are assessed forty percent to appellant and sixty percent to appellees.
REVERSED IN PART, VACATED IN PART, AND REMANDED.
NOTES
[1]  Two members of the city council believed the City's application of the Site Plan Review Ordinance was beyond its authority based on the zoning ordinance. They voted to uphold the denial only on the basis of the 50-foot setback requirement. The basis for imposing a setback requirement is not clearly identified in the record and has not been made an issue in the argument of the parties.
[2]  This Code section has been recodified and presently appears as Iowa Code § 670.4(3) (1993).
[3]  Prior to 1987, subject matter jurisdiction could be raised in advance of filing an answer by special appearance. Affidavits and other evidentiary showings could be used in support of and resistance to a special appearance. Now that preanswer jurisdictional challenges are embraced by rule 104(a), we assume that the same opportunity to present evidence exists.
