Embedded Resources accessed by WebResource.axd links not working in production environment
Ok, this has me stumped.
I have several server controls defined in a VB.NET .NET 4 proj开发者_如何学Pythonect, lets call it WebControls, to be shared with other projects in the solution. WebControls uses embedded resources (images) so that I don't have to remember to include images in each project that reference the controls. I use Page.ClientScript.GetWebResourceUrl to set image ImageUrl attributes in the server controls.
This all works fine in my application X that uses the controls from WebControls on my dev server. However, when I push this to production, the images represented as embedded resources do not show up.
My production server runs IIS 7.0. I know that disabling compression does not affect anything and that the proper IIS handlers are present for web resource .axd files.
What is even stranger is that I have copies of this application (named differently of course) on that same production server and everything works fine in those, but not in X. The application pool uses .NET 4 integrated and will not work on classic mode.
Any suggestions?
Figured this out. Very strange. I rebuilt my WebControls class and my other applications in debug mode and pushed those .dlls to my production server and everything worked fine. Then, I rebuilt in release mode and pushed the .dlls to production again, replacing the debug .dlls, and again all worked fine. Seems to have been an issue with VS 2010 not clearing out the dlls correctly when I cleaned and rebuilt my applications for release.
精彩评论