it works on localhost.
But not on server. I've put 4.0 instead of 2.0 on IIS. What do i have to change ?
What kind of error did you get when you type your Service URL in a browser? You should not have to change anything code wise. But did you turn on the WCF feature on your server?