I am using a 3rd party website to launch a DLL I've written in .Net 4.0. The DLL will be uploaded onto the website alongside an SQLite database providing me results which I can then view on the website. I know that the website will place my DLL and SQLite database in the same directory, however I don't know where that directory will be. Is there a way for the DLL to recognise where it is so that it can locate the SQLite database? I've tried the following...
string path = GetType().Assembly.GetModules(false)[0].FullyQualifiedName;
string path = typeof(YourClass).Assembly.Location;
System.Reflection.Assembly.GetExecutingAssembly().Location;
however all of these show the directory as 'C:\WINDOWS\system32\<library>.dll'. Is there any way to accomplish this or do I have to accept the inevitable and write my own website?