N
Neil Macdonald [Intergraph]
I am attempting to load a file that is situated in the same directory as an assembly that is called via a webservice
string csfFilePath = System.Configuration.ConfigurationSettings.AppSettings["CSFFilePath"]
if(csfFilePath==null || csfFilePath.Length==0
csfFilePath=System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\"
_csfFilePath=csfFilePath
The first line using System.Configuration returns null; This I have found out is because only exe's can use the .config files
However the GetExecutingAssembly().Location return
@"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\coordinatesystemtransformation\5e89ae88\c379ab0\assembly\dl2\df021851\907b49ab_fb49c401\
Which I guess is where the webservice is executing
Perhaps I am going about this all the wrong way; I am running in debug and need to step through the assembly and ws code to test
Any advice would be much help..
------------------------------------------------------------------------------------------------------------
Neil Macdonal
Senior Software Enginee
IntelliWhere Product Development Centr
Intergraph Corporation (NASDAQ: INGR
Intergraph Mapping and Geospatial Solution
Level 3, 299 Coronation Drive, Milton QLD Australia
string csfFilePath = System.Configuration.ConfigurationSettings.AppSettings["CSFFilePath"]
if(csfFilePath==null || csfFilePath.Length==0
csfFilePath=System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\"
_csfFilePath=csfFilePath
The first line using System.Configuration returns null; This I have found out is because only exe's can use the .config files
However the GetExecutingAssembly().Location return
@"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\coordinatesystemtransformation\5e89ae88\c379ab0\assembly\dl2\df021851\907b49ab_fb49c401\
Which I guess is where the webservice is executing
Perhaps I am going about this all the wrong way; I am running in debug and need to step through the assembly and ws code to test
Any advice would be much help..
------------------------------------------------------------------------------------------------------------
Neil Macdonal
Senior Software Enginee
IntelliWhere Product Development Centr
Intergraph Corporation (NASDAQ: INGR
Intergraph Mapping and Geospatial Solution
Level 3, 299 Coronation Drive, Milton QLD Australia