Server changes have no effect

2

I have an application running in C # with .NET 4.5 on IIS 8. To editing a Controller (which is a .cs file). However, I edited some things on this Controller and I saw that these changes were not spreading.

I tried to edit the Action of this Controller, I tried to edit the parameters that this Controller passes to View by a "ViewBag" variable.

No changes have been made, so I just deleted everything I had on the Controller and I still got access to the Actions.

So, is this some cache? Or by what I found searching on Google it "Compiles" my code.

How do I get him to compile again? Or how do I compile it for each change or does it compile by itself every time I access the Controller?

  

Note: The application is running on an online, non-local server.   There I have access to the IIS manager remotely.

    
asked by anonymous 13.04.2015 / 14:27

2 answers

1

You must publish the project through visual studio. This option is available by right-clicking on the project and the publish option. You can give a direct publish on the server if you have access. Otherwise you can use Web Deploy Package mode, which will generate a .zip that you will deploy to your IIS server in the corresponding site.

See these 2 links:

Import a Web Deploy Package in IIS

Generate a Web Deploy Package in Visual Studio

    
14.04.2015 / 20:12
0

Really as commented, check your deploy process.

In no way should you send the changes from your .cs file (from the Controller) to the server, so that you should send the server the .dll files generated by the build.

I mention this because I have already seen people coming from php and asp sending the cs file to the server.

Another thing that can give similar problems, is if your server is in Load Balance. Depending on the configuration, you need to update the dlls on each node of the cluster. I've seen cases where they updated only one of the servers and the application was then upgraded to some users and not to others. This is because part of the users because of the balancing accessed the server with the updated application and another part with the application outdated, which caused great confusion.

Always prefer an automated deploy. I hope it helps.

    
13.04.2015 / 15:16