emonarafat / socialauth-net

Automatically exported from code.google.com/p/socialauth-net
0 stars 0 forks source link

Conflict between SocialAuthHttpModule and OutputCache MVC Attribute #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add social-auth's web.config to Win7/IIS7.5 instance:
    <handlers>
      <add name="SocialAuth.NET" verb="*" path="*.sauth" type="Brickred.SocialAuth.NET.Core.CallbackHandler" />
    </handlers>
    <modules>
<!--    appears to cause a caching issue -->
    <add name="SocialAuthAuthentication" type="Brickred.SocialAuth.NET.Core.SocialAuthHttpModule" />
    </modules>
2. Set the OutputCache attribute on an action that returns a File type (In my 
case use to provide an png/jpg image file for an <img> tag.
3. Check the response headers on the image retrieval and caching options don't 
take effect. 

What is the expected output? What do you see instead?
I expected to see headers like:

Cache-Control:private, max-age=2592000
Content-Length:1674
Content-Type:image/png
Date:Thu, 19 Jul 2012 22:26:34 GMT
Expires:Sat, 18 Aug 2012 22:26:34 GMT
Last-Modified:Thu, 19 Jul 2012 22:26:34 GMT
Server:Microsoft-IIS/7.5
X-AspNet-Version:4.0.30319
X-AspNetMvc-Version:3.0
X-Powered-By:ASP.NET

What I see in its place:
Cache-Control:no-cache
Content-Length:1674
Content-Type:image/png
Date:Thu, 19 Jul 2012 22:27:19 GMT
Expires:-1
Pragma:no-cache
Server:Microsoft-IIS/7.5
X-AspNet-Version:4.0.30319
X-AspNetMvc-Version:3.0
X-Powered-By:ASP.NET

What version of the product are you using? On what operating system?
2.3, Windows 7 and Windows Server 2008 R2

Please provide any additional information below.

SocialAuth-net appears to still work as expected with this module missing. Not 
entirely sure what it does.

Original issue reported on code.google.com by Matthew....@gmail.com on 19 Jul 2012 at 10:28

GoogleCodeExporter commented 9 years ago
Hi could you confirm that if you remove SocialAuthHttpModule, does your output 
cache issue resolves?

(This module is not required when you use Forms based Authentication.)

Deepak

Original comment by daggar...@brickred.com on 24 Jul 2012 at 6:11

GoogleCodeExporter commented 9 years ago
Yes, if I remove <add name="SocialAuthAuthentication" 
type="Brickred.SocialAuth.NET.Core.SocialAuthHttpModule" /> from the config, my 
caching works as expected. I looked through the source and saw no reason why 
that should be happening.

Original comment by Matthew....@gmail.com on 24 Jul 2012 at 3:37

GoogleCodeExporter commented 9 years ago
Closing this as it was fixed by removing module.
Deepak

Original comment by daggar...@brickred.com on 3 Sep 2012 at 8:19