How do I reference the Sqlite db file in the App_Data folder for my ASP.NET Web Application?

前端 未结 1 826
长发绾君心
长发绾君心 2021-02-04 14:49

I\'m currently storing my sqlite db file in the App_Data folder as per ASP.NET best pattern and practices.

Currently I\'m using the following in the webconfig:



        
1条回答
  •  滥情空心
    2021-02-04 15:26

    Use Server.MapPath to your db file. So it would be something like

    Server.MapPath(@"~\App_Data\Your.db");
    

    0 讨论(0)
提交回复
热议问题