views:

33

answers:

2

I've just deployed my first ASP.NET MVC 2 site, and all appears to be well except I've run into an issue with IIS banning double-escaped characters, which I was relying on for a few routes.

As I don't have control over IIS (it's on a shared host) I've decided to go around the issue and replace the spaces with underscores in my URLs. Have tested and verified that this works on my local machine, and deployed the two new model classes which contain the methods that url-encode and url-decode the various bits that need this.

However, the remote website hasn't apparently noticed that I've updated the code. I've edited web.config a couple of times to try and force a recompile, deleted the remote model classes and reuploaded them, and googled around for any other reason why this would be happening. Any ideas?

+2  A: 

Make sure you've made a xcopy to the whole site including all the assemblies that you've modified in the bin folder.

Darin Dimitrov
I haven't modified any assemblies directly, just the actual classes. Where would I find them? I can't see any dlls in my site tree except for external references I've uploaded myself.
randomsequence
C#/VB.NET are static languages. This means that whenever you modify the source code it needs to be compiled. When you compile the source code it produces an assembly (dll). For an ASP.NET application this assembly is stored in the `bin` folder. So once you compile your web application you need to upload the resulting assemblies to the server.
Darin Dimitrov
@randomsequence - I'm guessing you are familiar with the old "web site" architecture model? MVC uses the "web application" model, in which you should deploy compiled assemblies to the server, not your .CS files.
GalacticCowboy
Thanks all, this sounds like it thoroughly explains it. Hadn't come across this distinction between web applications and web sites. Will try it today.
randomsequence
.. which turned out to be 3 minutes later. Apparently I was being an idiot and hadn't noticed the extra dll file in the bin folder - I had looked there expecting to find the compiled site but completely missed it.I presume then that I don't need the Models/Controllers folders on the server, just the Views and this dll? (and static files etc, obviously).
randomsequence
You absolutely don't need any source code files to the server. You need the `bin` folder and of course the `Views` folder containing `aspx` and `ascx` files.
Darin Dimitrov
A: 

Try clearing your browser cache by pressing Ctrl+F5.

SLaks
I wondered about that but have cleared the cache and tried different browsers - it's definitely server-side. The RouteLink it's generating calls the method I want to update and the link href is still putting + characters instead of underscores.
randomsequence