jquery - ASP.NET MVC 2. Javascript Error when deployed to IIS7 -


been working on asp.net mvc 2 solution time , today decided test in in iis7 put in on company server colleagues play with.

however got quite surprise when hosted it. started javascript errors in code worked while running locally in vs2010.

i getting errors on initial jquery command in script tag, looks this

<script language="javascript" type="text/javascript">  $(document).ready(function () {      setcss();  }); 

so searching around , found post :

my url "http://localhost/mvcajaxjson" have changed "http://localhost/mvcajaxjson/" , started working looks “/” @ end required call function. – prasanth mar 23 @ 11:43

so tried add forward slash page read

http://localhost:8008/apq/secretary/create/

that solved javascript errors, fine , all.

but since use normal routing e.g

 routes.maproute(             "default", // route name             "{controller}/{action}/{id}", // url parameters             new { controller = "account", action = "logoff", id = urlparameter.optional } // parameter defaults         ); 

i don't have additional forward slash on (action)links make javascript run without errors. must other people have experienced since presume use standard routing , form of javascript, jquery or not. there work around or neat trick working properly.

any highly appreciated.

thomas

blockquote

with aid of colleague we've established has references jquery libs because have issues displaying pictures , other resources.

so there must sort of setting in iis7 haven't configured properly.

my links looks in vs2010

    <script type="text/javascript" src="../../scripts/jquery-1.4.2.min.js"></script> <script src="../../scripts/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script> <link href="../../content/secretary.css" type="text/css" rel="stylesheet" /> <link href="../../content/jquery/ui-lightness/jquery-ui-1.8.2.custom.css" rel="stylesheet"     type="text/css" /> 

any ideas?


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -