Embedded Resources accessed by WebResource.axd links not working in production environment

StackOverflow https://stackoverflow.com/questions/5904334

  •  29-10-2019
  •  | 
  •  

문제

Ok, this has me stumped.

I have several server controls defined in a VB.NET .NET 4 project, 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top