4

I have created an ASP.Net MVC4 site and deployed it to IIS7.

We noticed that the images in the css were not showing.

Trying to directly access the image file like this http://.com/CircuitSearch/Images/CircuitSearchBackgroundTrans.png returns the 500 error. Yes the filepath is correct.

Odd part if another site hosted on the same IIS works fine and can display images.

jlh3302
  • 125
  • 1
  • 2
  • 9
  • Possible duplicate of [How to set web.config file to show full error message](http://stackoverflow.com/questions/11665322/how-to-set-web-config-file-to-show-full-error-message) – Alex K. May 05 '17 at 16:07
  • @AlexK.: That's not a duplicate. It may help the OP solve the issue, but the two questions are totally different. – Chris Pratt May 05 '17 at 18:02
  • Is the Images directory virtual in IIS? Is it pointing to the right folder? Other sites may not have a vdir set up for that. Although thinking about it, that would probably 404 rather than 500. – Craig H May 05 '17 at 18:42
  • my web.config did not have those so I added them. Accessing the site during debug does not proved any errors, just does not show the image. Accessing the image directly does show the 500 error – jlh3302 May 05 '17 at 20:58
  • Detailed Error Information: Module ManagedPipelineHandler Notification ExecuteRequestHandler Handler ExtensionlessUrlHandler-Integrated-4.0 Error Code 0x800703e9 Requested URL http://localhost:54898/Images/CircuitSearchBackgroundTrans.png Physical Path D:\Migration\InterfaceCode\Web\CircutiSearch\OnlineCircuitSearch\OnlineCircuitSearch\Images\CircuitSearchBackgroundTrans.png Logon Method Anonymous Logon User Anonymous – jlh3302 May 05 '17 at 20:58
  • I just recreated the site and added the cshtml and css files to it. Now the image works on index.cshtml but not on the other page. – jlh3302 May 09 '17 at 15:32
  • I'm having the same problem...sigh. – Shawn de Wet Jun 08 '17 at 17:26

2 Answers2

5

Change authentication for the site to Anonymous authentication/ application pool identity

enter image description here

helpME1986
  • 933
  • 3
  • 12
  • 26
4

I went into the IIS Log (usually under c:\inetpub\Logs) and discovered that I was getting error 500 with sub status of 19.

I looked up the causes for 500.19 via google and found the below link: https://support.microsoft.com/en-us/help/942055/http-error-500-19-error-when-you-open-an-iis-7-0-webpage

Based off a clue that there could be a duplicate entry for some of the modules, handlers, or mime types causing an error, I commented out my system.webServer and noticed the images worked. I then commented out only portions of my web config and narrowed it down to a duplicate staticContent entry in my web.config.

AdamantineWolverine
  • 2,131
  • 1
  • 17
  • 14
  • Check the web.config. Mine had a duplicate EntityFramework being inherited from an upper-level directory. – Donna Mar 01 '21 at 13:38