So I have a web project, and I'm trying to get the root directory of the website using the c# method Directory.GetCurrentDirectory()
. I don't want to be using a static path as the file locations will be changing in the future. This method is running in my imageProcess.aspx.cs file, but where I thought it would return:
C:Userscbldocumentsvisual studio 2010ProjectsModelMonitoringModelMonitoringimageProcess.aspx.cs
I'm instead getting:
C:Program FilesCommon FilesMicrosoft SharedDevServer10.0
Can anyone explain why this is happening and what a possible solution might be? Thanks a lot.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…