David
David

Reputation: 149

web.config file causing 500 internal server error

I am trying to add browser caching to resources on my site. I am completely new to this but found some information on how to do this. It was recommended that I create a web.config file with the following code and place it in my root folder.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
    <staticContent>
        <clientCache cacheControlMode="UseMaxAge" CacheControlMaxAge="365.00:00:00" />
    </staticContent>
  </system.web>
</configuration>

When I do, however, I get a 500 Internal Server error on my site. Anyone know why this is happening? Is it something to do with permissions? Am I missing something crucial?

Any help would be appreciated.

Upvotes: 2

Views: 1550

Answers (1)

Rudis
Rudis

Reputation: 1217

It should be in element system.webServer instead of system.web

Upvotes: 3

Related Questions