
54 Wn. App. 424 (1989)
774 P.2d 44
STEVEDORING SERVICES OF AMERICA, INC., Respondent,
v.
MARVIN FURNITURE MANUFACTURING, INC., Appellant.
No. 21999-5-I.
The Court of Appeals of Washington, Division One.
June 12, 1989.
Michael D. Hunsinger and Neubauer & Hunsinger, for appellant.
Mark A. Wheeler and Lane, Powell, Moss & Miller, for respondent.
*425 SCHOLFIELD, J.
Marvin Furniture Manufacturing, Inc. (hereinafter Marvin), appeals the trial court's order granting summary judgment to the plaintiff, Seattle Stevedore Co. (Stevedore), in the amount of $43,314.29, for unpaid rent. We affirm.

FACTS
On November 10, 1981, Marvin and Stevedore entered into a lease agreement in which Marvin agreed to rent space in a building owned by Stevedore at 4975 Third Avenue South in Seattle. The lease provided, inter alia, that Marvin's use of the premises would be in conformity with all municipal, county, state, and federal ordinances, statutes, and regulations currently in force, or subsequently applicable.
Marvin manufactured mattresses and furniture, requiring the storage of foam rubber for both products. In 1982, Marvin was visited by fire inspectors, who found several violations of the fire code. The major problem was the storage of the foam rubber used in the manufacturing process. The foam was stacked in too great a quantity to be considered safe.[1] The fire department's letter to Marvin outlining the violations indicated that Marvin would be required to install a "one-hour occupancy separation" (a fire-resistant storage facility) for the foam rubber and to extend an automatic sprinkler system to various unprotected locations throughout the manufacturing plant.
According to Peter Horton, Marvin's manager, the fire department further required that all of the foam used in the manufacturing process be stored in the fire-resistant storage facility. Horton's affidavit indicated that such a *426 requirement would have required Marvin to cease operation because:
[i]t would have been logistically impossible to store all of the foam in one location and be able to construct furniture in any rational [manner and] would have required us to move our mattress operation to an entirely different building....
In his deposition, Marvin Apple, the owner of Marvin Furniture, was asked what the cost of compliance with the fire department's requirements would be. Apple stated that he did not have the actual figures, but that he and Horton had determined that compliance would be economically unfeasible:
[I]t would prohibit the ability to produce the low-end furniture ..., it would put us in a position of bankruptcy because we would have to incur the expense of enclosing the mill, it would cause us to install a sprinkler in the north building, it would cause us to store the foam rubber in the north building, it would cause us to move the mattress factory out of the north building into a location away from that building and would incur additional overhead of another rental property ...
Apparently, Marvin negotiated unsuccessfully with the Seattle Fire Department for 2 years in an attempt to avoid the requirement that the fire-resistant storage facility be built. Marvin argued to the fire department, as it does on appeal, that the fire code did not authorize it to impose the storage facility requirement. In support of its argument, Marvin notes § 81.105(a) of the Uniform Fire Code, which reads in pertinent part:
Automatic Fire-extinguishing Systems
Sec. 81.105. (a) An approved automatic fire-extinguishing system shall be required throughout the building when the contiguous area (minimum separation between storage areas is 60 feet) used for high-piled combustible storage exceeds 12,000 square feet, inclusive of aisles.
EXCEPTION: Automatic fire-extinguishing systems may be provided only in the storage area when it is separated from the remainder of the building by a one-hour fire-resistive occupancy separation in accordance with the Building Code.
Uniform Fire Code, at 293 (1982).
*427 Rather than comply with the fire department's requirements, Marvin gave notice and vacated the building on or about July 1, 1984. Marvin contends that it found a replacement tenant for the Stevedore building, such that it was vacant for only 6 months.
Stevedore filed suit against Marvin for breach of the lease agreement, and prayed for damages, including lost rent, late charges, renovation costs, and attorney's fees. On November 19, 1987, the trial court granted Stevedore's motion for summary judgment. The parties entered into a stipulation to a judgment amount of $43,314.29, including costs and attorney's fees.
Marvin argues that summary judgment was improper because a material issue of fact existed as to whether Marvin's purpose was commercially frustrated by the Seattle Fire Department's actions.

COMMERCIAL FRUSTRATION
A summary judgment motion may be granted under CR 56(c):
if the pleadings, depositions ... and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that the moving party is entitled to a judgment as a matter of law.
See also Herskovits v. Group Health Coop., 99 Wn.2d 609, 664 P.2d 474 (1983). The court must consider the evidence in the light most favorable to the nonmoving party. Yakima Fruit & Cold Storage Co. v. Central Heating & Plumbing Co., 81 Wn.2d 528, 503 P.2d 108 (1972).
[1] To rebut a summary judgment motion, the adverse party may not rest on allegations, but must set forth specific facts showing there is a genuine issue for trial or have the summary judgment, if appropriate, entered against him. CR 56(e); see also LaPlante v. State, 85 Wn.2d 154, 531 P.2d 299 (1975). On review of an order granting summary judgment, the appellate court must "engage in the same inquiry as the trial court." Wilson v. Steinbach, 98 Wn.2d 434, 437, 656 P.2d 1030 (1982).
*428 [2] The Restatement (Second) of Contracts § 265 (1981)[2] discusses discharge of performance by supervening frustration:
Where, after a contract is made, a party's principal purpose is substantially frustrated without his fault by the occurrence of an event the non-occurrence of which was a basic assumption on which the contract was made, his remaining duties to render performance are discharged, unless the language or the circumstances indicate the contrary.
Accompanying commentary to the section sets out three requirements for discharge of the frustrated party's duty. First, the principal purpose of the party must be frustrated. Second, the frustration must be substantial. If a transaction has become less profitable, that is insufficient to show substantial frustration. Third, the nonoccurrence of the frustrating event must have been a basic underlying assumption of the contract.
In Lloyd v. Murphy, 25 Cal.2d 48, 153 P.2d 47 (1944), a tenant entered into a 5-year lease in 1941 for a certain premises, "for the sole purpose of conducting ... the business of displaying and selling new automobiles ... and for no other purpose whatsoever ..." Lloyd, at 51. In 1942, the federal government ordered the discontinuation of the sale of new cars. The landlord agreed to modify the lease, waiving the restrictions as to use.
However, the tenant vacated the premises, giving oral notice of repudiation. The landlord sued the tenant for unpaid rent. The tenant testified at trial that he sold and serviced automobiles at two other locations and that he was aware of the fact that many other new car dealers were continuing in business. However, the tenant testified that he "couldn't make a go" of automobiles at the premises in question. Lloyd, 153 P.2d at 49. The trial court held that the war conditions had not terminated the tenant's obligations under the lease and ordered judgment in favor of the *429 landlord. Lloyd, 153 P.2d at 49. On appeal, the tenant argued that the doctrine of frustration applied, because the purpose for which the premises was leased had been frustrated by the government restrictions.
The California Supreme Court noted that, in the past, the doctrine of commercial frustration has not always been applied to leases, because leases are conveyances in which the tenant bears the risks accruing to the leasehold. In addition, application of the doctrine to leases "depends on the total or nearly total destruction of the purpose for which, in the contemplation of both parties, the transaction was entered into.'" Lloyd, at 53 (quoting 6 S. Williston, Contracts § 1955, at 5485-87 (rev. ed. 1938)).
According to the Lloyd court, the question to be answered in frustration cases is, "whether the equities of the case, considered in the light of sound public policy, require placing the risk of a disruption or complete destruction of the contract equilibrium on defendant or plaintiff under the circumstances of a given case". Lloyd, at 53-54. The answer to such a question turns on "whether an unanticipated circumstance, the risk of which should not be fairly thrown on the promisor, has made performance vitally different from what was reasonably to be expected". Lloyd, at 54. In making the determination, the relation of the parties, the terms of the contract, and the circumstances surrounding its formation must be examined to find out whether the risk of the supervening event causing the alleged frustration was reasonably foreseeable. Lloyd, 153 P.2d at 50.
In examining the lease before it, the Lloyd court first observed that both parties were aware at the time of the execution of the lease that certain restrictions as to the sale of new automobiles would probably soon go into effect, and sales of automobiles were soaring in anticipation of such restrictions. These facts gave rise to the inference that the risk of such restrictions was assumed. Secondly, due to the modification of the lease, the tenant had failed to sustain its burden of showing that the value of the lease had been *430 destroyed. Therefore, the Lloyd court affirmed the trial court in holding that the tenant was liable to the landlord for unpaid rent and that the doctrine of frustration did not apply. Lloyd, 153 P.2d at 52-53.
By way of contrast, in Weyerhaeuser Real Estate Co. v. Stoneway Concrete, Inc., 96 Wn.2d 558, 637 P.2d 647 (1981), Weyerhaeuser, a lessor, sought rent due under a mineral lease. The lessee had abandoned the project because of its inability to obtain permits necessary for mining. Based on the doctrine of commercial frustration, the trial court held that the lessee was excused from paying rent as of the day the mining permits were expected to be obtained. A divided Court of Appeals reversed,[3] holding that the doctrine of commercial frustration did not apply because the parties had agreed upon a remedy in the event the project was no longer profitable, and because the payment of rent was not conditioned on the lessee's success in obtaining minerals from the site.
However, the Washington Supreme Court reversed the Court of Appeals, determining that the doctrine of commercial frustration was applicable to the facts before it. The court noted the following summary of the doctrine of commercial frustration:
Where the assumed possibility of a desired object or effect to be attained by either party to a contract forms the basis on which both parties enter into it, and this object or effect is or surely will be frustrated, a promisor who is without fault in causing the frustration, and who is harmed thereby, is discharged from the duty of performing his promise unless a contrary intention appears.
Stoneway, at 562 (quoting Restatement of Contracts § 288, at 426-27 (1932)). The Stoneway court noted that the object of the contract, the obtaining of minerals, was frustrated for Stoneway, and that Stoneway was without fault *431 in the occurrence of the supervening event causing the frustration of purpose. The only question to be considered was whether the parties contemplated the failure to obtain the necessary permits, and provided for that contingency in the lease, thereby allocating the risk to one side or the other. Stoneway, at 562-63.
The Stoneway court at page 564 held that although the parties contemplated that the permit process might be lengthy, they did not anticipate the public's "massive outpouring of negative reaction to the proposed mining operation." Further, the Stoneway court held that it would be inequitable to require the lessee to bear the entire risk that the purpose of the contract would be frustrated. Stoneway, at 564-65.[4]
In McNally v. Moser, 210 Md. 127, 122 A.2d 555, 60 A.L.R.2d 388 (1956), a proceeding for a declaratory judgment of rights and obligations under a lease, the lessee, McNally, a chiropractor, argued that he was excused from performance under the lease, because a city ordinance did not permit him to have his office in a residence other than his own.
The Mosers, another chiropractor and his wife, had purchased the residence and had used the ground floor as an office, while residing on the upper floors. When Moser later sold his practice to McNally, part of the arrangement was for a 10-year lease of the ground floor office space. Four years later, when the final payment on the practice was due, McNally notified the Mosers of his intent to vacate the premises because he believed the lease had expired.
When the Mosers notified McNally that the lease was still in force and that they would institute a declaratory judgment action if necessary, McNally contacted the city's building inspector, asking whether the use of the premises *432 as a nonresident professional office complied with the zoning laws. The building inspector responded that the property could not be used for a doctor's office unless the doctor resided on the premises. McNally took no action to obtain official permission to continue using the leased premises, nor did he inform the Mosers of what he had learned. The Mosers filed suit, seeking a declaratory judgment. McNally's answer asserted that the lease was void because it was in violation of the zoning laws. The trial court found in favor of the Mosers and held that the lease continued in force for the full 10-year term.
On appeal, the McNally court noted that McNally's defense consisted of two prongs: first, that the lease was an illegal bargain because it violated the zoning laws at the time of its inception, and second, that a later ordinance made the previous use illegal. The McNally court rejected the first contention, based on the evidence presented, which did not clearly lead to the inference that prior to the enactment of a 1953 ordinance, uses such as McNally's were forbidden. McNally, 122 A.2d at 559.
As for the second prong concerning the 1953 ordinance, the McNally court stated that the enactment of the ordinance might have created impossibility of performance or frustration of purpose, because the event was not contemplated by the parties at the time of making the lease, and McNally did not bind himself to pay rent regardless of such a happening. McNally, 122 A.2d at 560. However, the McNally court stated that:
Not only does the evidence not show that Dr. McNally or the Mosers, singly or together, could not have secured a variance or a special exception to continue the challenged use or could not have established that a non-conforming use existed at the date of the 1953 ordinance, but rather, it permits an inference that any of these results might have been accomplished.
We think that Dr. McNally ... could not stand idly by and, because of a notice to that effect from an administrative official, gladly accept as a fact that his use of the office was illegal. Before he can say that the use of the *433 premises as professional offices by him was impossible, he was under an obligation, either on his own or through the Mosers, who were willing to act to attempt to establish a right to continue that use, or at least to wait until impossibility became a fact, not merely a possibility. One may not rely on illegality or invalidity where the doing of that said to be forbidden may reasonably be made legal and possible through administrative or judicial action.
McNally, at 137-38.
Applying the law to the facts before us, we hold that Marvin breached the lease agreement with Stevedore, and, therefore, summary judgment in Stevedore's favor was proper. Marvin's contention that the doctrine of commercial frustration operates here to relieve him of his obligations under the lease is without merit. Marvin has failed to show that the principal purpose of the contract was frustrated.
Marvin's counsel conceded at oral argument that if the Seattle Fire Department had correctly applied the law, Marvin would have been obligated to comply. Marvin's only argument was that it had no duty to attempt to resolve the disagreement with the fire department. We disagree.
[3] As in McNally, Marvin apparently chose for its own reasons to vacate the leased property, rather than take the necessary steps to preserve its right to use the property within the limits of the fire code. Assuming without deciding that Marvin is correct in its position that the Seattle Fire Department was in error in requiring both a fire storage area and a sprinkler system, Marvin could have easily resolved the matter through administrative appeal channels or, if need be, through a declaratory judgment action. We agree with the Maryland Court of Appeals' reasoning in McNally, and likewise hold that Marvin had a duty to attempt to resolve the problem concerning enforcement of the fire code. Only after such an attempt had failed could Marvin claim that its principal purpose was frustrated. In the absence of evidence of an attempt to correct the matter through administrative appeal or legal action, there was no *434 factual issue to be resolved and summary judgment was proper.
The defense of commercial frustration fails because Marvin has failed to show that its principal purpose was frustrated.
Judgment affirmed.
COLEMAN, C.J., and GROSSE, J., concur.
NOTES
[1]  Rubber products are considered to be "Class IV" combustible commodities under article 81 of the Uniform Fire Code, and as such are considered to be "highly combustible", according to the deposition of Wayne Gribble, the fire inspector involved here.
[2]  Cited with approval in Washington State Hop Producers, Inc. Liquidation Trust v. Goschie Farms, Inc., 112 Wn.2d 694, 773 P.2d 70 (1989).
[3]  Weyerhaeuser Real Estate Co. v. Stoneway Concrete, Inc., 26 Wn. App. 882, 614 P.2d 249 (1980), rev'd, 96 Wn.2d 558, 637 P.2d 647 (1981).
[4]  The Stoneway court did, however, modify the trial court's decision, and relieved Stoneway of its rent obligation as of the date of abandonment of the lease. Stoneway, at 566.
