11

simple stuff, I want to use App_Data as my db storage folder.

How can I reference App_Data in my connString.

<add name="ConnectionString" connectionString="Data Source=mydb.sqlite; ..." />

1 Answer 1

26
<add name="ConnectionString" 
connectionString="Data Source=|DataDirectory|\MyDb.sqlite;......" />

The |DataDirectory| token would expand to an App_Data folder under the root of a web application.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.