Can't upload nuget package


I’m on 2.6.5 and trying to upload nuget-packages to Octopus server with the web-GUI on the library page.
I get the following exception (from configuration/diagnostics)

Unhandled exception from web server: The file exists.

System.IO.IOException: The file exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Path.InternalGetTempFileName(Boolean checkHost)
at Nancy.IO.RequestStream.MoveStreamContentsToFileStream()
at Nancy.IO.RequestStream.MoveStreamOutOfMemoryIfExpectedLengthExceedSwitchLength(Int64 expectedLength)
at Nancy.IO.RequestStream…ctor(Stream stream, Int64 expectedLength, Int64 thresholdLength, Boolean disableStreamSwitching)
at Octopus.Server.Web.OctopusNancyHost.ConvertRequestToNancyRequest(HttpListenerRequest request) in y:\work\refs\heads\master\source\Octopus.Server\Web\OctopusNancyHost.cs:line 291
at Octopus.Server.Web.OctopusNancyHost.Process(HttpListenerContext ctx) in y:\work\refs\heads\master\source\Octopus.Server\Web\OctopusNancyHost.cs:line 426

Any idea about how to solve this?
BR Mikael

Hi Mikael,

Thanks for getting in touch! You can see in the log that Octopus is calling this function:


In the Windows temp folder, there is a limit to 65,000 temporary files - beyond this the function will fail because there are no more file name combinations left. Chances are that some software on your system is creating temporary files and not deleting them properly. You can see more here:

Hope that helps,

Hi Dalmiro and thanks for the feedback!
I have read the Stackoverflow question and verified that the temp-folder is completly empty.
Is there any other folder Octopus can use as a temp-folder?
I have looked in the folder "C:\Users\xx\AppData\Local\Temp"
Where xx is the user account I use to log in on the server.
I have looked in the corresponding temp-folder for the other accounts as well, but every temp-folder is empty

Any other idea?


Hi again!
I have solved this now.
The Octopus Service on my server runs under Local System account and the temp file for Local system is on c:\windows\temp.
That folder was full :slight_smile:


Glad to hear that Mikael :slight_smile: