Skip to content

JS script file path issue with hosting on IIS

MSWeb Developer

Asked May 13, 2015, 10:30 PM EDT2 answers
Share
LinkedInX
Hello All.......

I am new in Asp.Net Web development & deployment too.........I have created sample SignalR application, it uses js  script files, these files work fines with Visual Studio 2012, but when I publish it & deploy on IIS, the script files are not being called, I am giving the path using


<script type="text/javascript" src="<%= Page.ResolveUrl("~/Scripts/jquery-1.6.4.min.js")%>"></script>


what is an ideal way to give the reference of js script file?can anybody help me to resolve this issue?

Thanks in advance


Regards

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Manoj Bhoir
    0
    Hi,

    Why you are using Page.ResolveUrl? Just simply use below code :

     <script type="text/javascript" src="Scripts/jquery-1.10.2.js"></script>

    Or Juse write
    <script type="text/javascript" src=""></script>
    Place your mouse pointer on highlighted area (src="") Press Control+Space and use pick url.
    0
  • 0
    Hi Manoj,


    Thanks for responding............I have already tried both the way you have mentioned, it is not working, any other way to resolve this issue??


    Regards
    0