Tuesday, November 10, 2009

Cannot use a leading .. to exit

Last week, When we moved our application from staging site to production site, we were encountered an interesting exception.


Cannot use a leading .. to exit above the top directory.


Screenshot is attached herewith.





Please note that we are using Master pages in our application and we had included javascripts and CSS files in this master page. After googling through different forums, I found that ../javascript/a.js was causing this error.



Actually, in our staging site, it worked perfectly because ../ was finding parent directory but when that master page moved in parent directory, it didn't had 1 futher parent/top directory. We solved this exception using ~/ sign instead of ../

No comments: