Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Extension being unloaded



  • Hey

    I was experimenting with Proget extensions and trying to track down some odd behaviour. Think I've managed to reproduce something similar.
    I have created a very basic extension and its all running ok.
    If I go to the proget advanced settings page and hit 'save settings', occassionally, maybe 1 in 3, I'll get a exception thrown. It looks like proget is unloading and reloading the extension but gets caught on one of the files in the Temp directory. Not always the same file either. The extension is no longer loaded.
    I'm not sure if this is the only way to reproduce the error.
    The stack dump shows

    UnauthorizedAccessException: Access to the path 'TestPackageStore.dll' is denied.
    System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound) +14578821
    System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost) +277
    Inedo.ProGet.Extensibility.Management.ExtensionsVerifier.GetAssemblyLoadResults(String extensionsPath, String tempPath) +110
    Inedo.ProGet.Extensibility.Management.ExtensionsManager.InitializeAssemblies() +273
    Inedo.ProGet.Extensibility.Management.ExtensionsManager.InternalInitialize() +209
    Inedo.ProGet.Extensibility.Management.ExtensionsManager.Initialize(String extensionsPath, String tempPath) +509
    Inedo.ProGet.WebApplication.ProGetHttpModule.BeginFirstRequest(HttpApplication app) +1516
    Inedo.Web.InedoHttpModule.<Initialize>b__8(Object s, EventArgs e) +148
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165

    Thanks
    Sean

    Product: ProGet
    Version: 3.5.8



  • When you click save on the Advanced Settings page, it forces an ASP.NET hosting environment shutdown, which ought to unload the website appdomain, along with all of the assemblies loaded into it.

    I suppose it could be that the new hosting appdomain is attempting to initialize itself before everything has been completely unloaded, causing the locking issue. I'm not sure of any workarounds you can try - to be honest there aren't a whole lot of people using extensibility in ProGet right now so you're the first to report this issue.

    We can add some kind of retry/delay to the extension loader in a maintenance release that ought to fix this.



  • It may help, but I think there may be something else holding onto the file.
    I'm running Process Monitor and can see the SetDispositionInformationFile that fails.
    A little while later, just after the other files have been removed, I'm seeing another thread in the w3wp process closing the file.
    It doesn't get as far as creating any files in the temp directory.
    Hope this helps.
    Are the any other places where the extension would be reinitialized?
    I'm not sure if the times I have seen problems match up with times the settings have been saved.

    Thanks
    Sean



  • This issue was marked as resolved in our system, but I don't see any email responses. Are you still having this issue?



  • Yes, still having the issue.
    The extension was unloaded again yesterday. It is unlikely it was anyone changing anything on the advanced settings page.
    Is there some other case where the extension is reloaded?



  • The extension will be reloaded whenever the hosting AppDomain is reloaded in ASP.NET. Since you are hosting using IIS, it's likely recycling the worker process occasionally. You may want to try turning this off or increasing the idle time in IIS.



  • Thanks!
    I'll give it a go see if it helps



  • Hey.
    It looks like changing the IIS recycling settings resolved the file locking issue.
    I have a new question however.
    We've updated to 3.7.5 (Build3).
    There use to be a property in the Manage Feeds screen called Package Store Configuration where a custom extension could have xml data passed thru to it. This no longer appears to be available?
    Is there a way I can still do this?
    I haven't applied the new license to the server yet, so is it possible it will appear after I apply it?
    Thanks
    Sean



  • This field will only appear if you have a custom extension loaded in ProGet.



  • Hey
    Yes the extension is loaded. The 'Extensions Overview' dialog shows the extension. Proget has also unzipped the files under the windows\temp\proget\webapp\extensions.
    There are no errors reported in the 'View All Messages'.
    I've tried restarting, rebooting, recompiling a cut down extension, installing proget rather than upgrading. I just can't seem to get any custom extension field to appear.
    I'm using the same versions of the ProGetCore and Inedo dll's as in the 3.7.5 build.
    Anything else I can try?
    Thanks
    Sean



  • Apologies - looks like there was a regression that caused that option to be hidden in 3.7.5, but it is back in v3.7.6.



  • Thanks, all good now.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation