In .NET solutions I use custom classes for translations. Main idea of translation framework that files with translations are placed in folder near assembly.
All work fine when it calles from windows forms application. But it does not work when I call it from web service...
I debug web service via Visual Studio 2010 and via bult-in debugger. And I see that buit-in ASP.NET Developpment loades assemply from C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\
and there is no possibility to find my folder with translations...
So suggest please what to do in this case?
I tested under IIS7 it does not work also.
sample code how I load assembly:
if (languageSettings == null)
{
TraceIt(assembly.Location);
string strPath = Path.Combine(Path.GetDirectoryName(assembly.Location), "Language.config");
TraceIt(strPath);
languageSettings = new LanguageSettings(strPath);
if (!languageSettings.LoadSettings())
{
languageSettings.CurrentLanguage = DefaultLocale;
languageSettings.SaveSettings();
}
}