ezet / evelib

Eve Online Library.NET is an open source C# wrapper for CCPs Eve Online API and other popular Eve Online APIs.
Apache License 2.0
72 stars 36 forks source link

Could not find a part of the path '\\Cache\EveXml'. #85

Closed KrisQuack closed 8 years ago

KrisQuack commented 8 years ago

Recently I have started getting this error turn up in my logs and no API's are being updated. A Stack Trace is bellow. I have not applied any cache settings myself so it is all default and I cant figure out what could have triggered it to start exception screen

Exception

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path '\Cache\EveXml'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace

[DirectoryNotFoundException: Could not find a part of the path '\Cache\EveXml'.] System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath) +338 System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost) +1534 System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) +216 eZet.EveLib.Core.Cache.d14.MoveNext() +497 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84 eZet.EveLib.EveXmlModule.RequestHandlers.d13`1.MoveNext() +2094 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84 eZet.EveLib.EveXmlModule.d30.MoveNext() +562

[AggregateException: One or more errors occurred.] System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) +14086697 eZet.EveLib.EveXmlModule.ApiKey.Init() +447 eZet.EveLib.EveXmlModule.CorporationKey.<.ctor>b__1_0() +23 System.Lazy1.CreateValue() +14337348 System.Lazy1.LazyInitValue() +524 ****.Operations.apiupdate() +289 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178

ezet commented 8 years ago

So you are running this in a web environment? With the default cache settings? Do you know what the cache path was before this error appeared? And what version of EveXml and Core are you using ?

ezet commented 8 years ago

The easiest fix is probably to just set the cache to a valid path for now, and I'll look into fixing the default value.

ezet commented 8 years ago

So I think I found the bug, but in general it should not work for web environments without setting the cache explicitly, I think. So you should set the path using Config.AppData before instantiating EveXml. I guess using Server.MapPath() or something, I've never really used asp.net.

KrisQuack commented 8 years ago

Alright, I have set it manually and it seems to be working fine now

Thanks