Test Url getting previous version

We are deploying a website service, we have a GetHealth url that will spit out the Version and some other information about the current deployment, we use the “HTTP - Test URL” step calling the process like so:

https://program.company.com/sitename/RESTServiceName.svc/GetHealth

In the GetHealth method, we are getting the version using:

System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();

For some reason - this is getting the previous version, when I go on the Server and go to the IIS sitename it shows the current version. Does anyone know why that is? Could the GetHealth be cached and calling from previous path?
Thanks.
Tom

Hi Tom,

Thanks for getting in touch! I would guess that you’re probably on the right track and the GetHealth is being cached and calling from the previous path.

You might be able to resolve this by modifying the source script of this community step template (where you’d need to make a copy of it and add that to your project). Though there might be other options to achieve what you’re after. Could you elaborate a bit on your scenario and requirements? I’ll be happy to try to think of other ways to potentially approach this. :slight_smile:

I look forward to hearing back!

Best regards,

Kenny

Thanks Kenny, so we literally just deploy the new version to IIS, we can go out into IIS and open the folder and it opens to the new versions path. I can view the properties of the dll we are getting the version from and it shows the new version, however, when we run the GetHealth to the IIS website as shown above - it is returning the previous version. When you say “Edit the Script”, what exactly would I edit/change in the script to remedy this?

Thanks

Well, we found just resetting IIS does the trick. Strange because this doesn’t seem to happen all the time. Thanks for your help Ken.

Regards,
Tom

Hi Tom,

Thanks for following up and letting me know resetting IIS did the trick! You’re very welcome, and please don’t hesitate to reach out if you have any questions or concerns in the future.

Best regards,

Kenny

FYI Update: We did not want to restart IIS since we have several sites that would’ve been affected. Restarting the App Pool did not resolve this either. So what we ended up doing was just prior to deploying we deleted the temp files with a pre-deployment PowerShell script removing all files in here:

“C:\Windows\Microsoft.NET\Framework*\v*\Temporary ASP.NET Files{WebAppName}”

and that fixed the issue. Not only that - the test url usually would take 14-16 attempts until it came back when it did work. Now - 1 call - done.

Hi Tom,

Thank you kindly for detailing your solution here publicly! That’s great to see, and I’m sure it’ll be helpful to someone in the future.

Please don’t hesitate to reach out if you have any questions or concerns moving forward, and we’ll be happy to help out in any way we can. :slight_smile:

Best regards,

Kenny

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.