loli
loli

Reputation: 1068

Application_BeginRequest not firing when there is no extension

Application_BeginRequest fires when I start debugging. Then, if I click a link like "/home", I get a 404 error right away, Application_BeginRequest is not even fired, but if I add ".aspx", it's fired. Odd thing is, it was working last week.

Upvotes: 3

Views: 3252

Answers (1)

Andrew
Andrew

Reputation: 3796

It's the configuration issue of your application. IIS is not handling extentionless urls correctly.

try adding following entry to your web.config file:

<modules runAllManagedModulesForAllRequests="true" />

Also there's a hotfix from Microsoft available here: http://support.microsoft.com/kb/980368

I've installed that one some time ago and problems with WebApi requests(extentionless) were gone.

Upvotes: 4

Related Questions