I have a MVC Application where I'm using a lot of function on javascript and I have a separate file (that's why I cant use URL helpers) for those javascript call msa.js and it is in the folder Scripts I referenced on my mvc View like this:
<script type="text/javascript" src="~/Scripts/msa.js"></script>
The reference work fine, but the problem is in the javascript file:
I have a lot of calls to server methods using ajax that's why I have to use the property "url" many times on the ajax call.
The problem is that on my local computer it's work fine and the url is structure like this:
http://localhost:59655/WorkPanel/GetListOfPermissons
And it is correct!! But when I want to upload the application for the server I have to use a Virtual Directory that's why the url change for:
http://10.10.25.161/MSA/WorkPanel/
When I Execute the application on the server mvc try to put the url like this:
http://10.10.25.161/WorkPanel/GetListOfPermissons
And there is the problem don't execute the function because the directory MSA is missing from the url: this is an example of my code javascript:
$.ajax({
type: "POST",
url: '/WorkPanel/GetListOfPermissons',
data: {},
contentType: "application/json; charset=utf-8",
dataType: "json",
Any body had faced this problem?? How did you solved this. Thank you in advanced... Jose