2

I'm trying to deploy an ASP.NET MVC 4 application to IIS 8. When built with Debug mode selected in VS 2012, the application runs fine on IIS. However, when Release mode is selected, the application gives a yellow screen with a 404 error and something about the path not implementing IController.

I found out that adding the .pdb debug symbols to the bin/ folder on IIS, the application starts working fine.

Does anyone know why this is happening? I've played around with the Release mode build settings in VS, but to no avail.

tereško
  • 58,060
  • 25
  • 98
  • 150
MLowijs
  • 1,485
  • 2
  • 11
  • 16
  • 1
    You should be able to run the app in Release Mode, maybe grab the exception from the event viewer and post it up here. – Andrew Walters Mar 27 '13 at 16:42
  • 1
    Thanks for your comment Andrew. Every time I ask a question like this, the answer pops up minutes later... Turns out I was using the StackFrame class, which of course doesn't work without the debug symbols present. Switched to using the CallerMemberName attribute in .NET 4.5 and everything is working fine now! (can't put this in an answer yet because my rep is too low!) – MLowijs Mar 27 '13 at 16:47
  • 1
    @MichielLowijs I'm so tempted to write an answer, "It turns out that you were using the StackFrame class, which of course..." – Evan Harper Mar 28 '13 at 20:56

1 Answers1

2

Turns out I was using the StackFrame class, which of course doesn't work without the debug symbols present. Switched to using the CallerMemberName attribute in .NET 4.5 and everything is working fine now!

MLowijs
  • 1,485
  • 2
  • 11
  • 16