Hello,
So originally the design aspect of a site that was being developed was supposed to be the mvc app would be the site name, essentially root on IIS. Development proceeded and everything was working good on the development side. Well a change was made to make this a subsite (www.sitename.com/mvcapp). After some discussion that things should work still, it was decided to push the app to the IIS server in UAT and go from there. An issue did present itself, and we have determined a work around, but I am trying to see if there is a reason behind the issue.
So the first thing that was notices was that when the app was launched to the first controller (Menu) that the background picture did not display. We were able to navigate to other sections of the app and most other controllers worked without a problem (www.sitename.com/mvcapp/controller/edit, etc. ) Further inspection of the reason the background were not working and the logo was working showed the background image pulling a 404 error, where it was looking for the image at www.sitename.com/mvcapp/Menu/~/images/BackgroundImages/imagename.png. Even more baffling was that the logo was stored in the same folder on the wwwroot and it worked. Then it was noticed that one of the modals was not working correctly as it tried to call up a differentcontroller/index it too was getting a 404 looking at the original controller and appending the next controller onto it so it was seeing Menu/DifferentController/Index. Now after some playing around with the images the tilde was not working, so it was replaced with a ../images/BackgroundImage/imagename.png and pushed to the server. This worked. The site.js was reworked so that the modal was now calling ../DifferentController/Index and it worked.
I guess the question comes in as to why the dot dot (..) worked and the tilde (~) didn't work? Everything that was read is that the tilde should have brought it back to the wwwroot folder. While there is a working solution in place, it there a way to make this work with the tilde or as in the case of the modal not have a tilde or dot dot in front?