allentran 0 Posted June 5, 2014 Report Share Posted June 5, 2014 I followed the whole tutorial here http://www.w3schools.com/website/webpages_demo.asp and have all the files in my WebMatrix Demo website project as instructed. I set up a "Northwind.sdf" database and created a table "Users" (having Id, CompanyName,City, Country columns) but my website could not run. Connection string "Users" was not found, is the issue. Line 2: WebSecurity.InitializeDatabaseConnection("Users", "UserProfile", "UserId", "Email", true); This line is highlighted in red. I don't know how to fix it. I read somewhere about "public static class WebSecurity" but I don't know where to put it, which file and which line (right place for it if inserting it can solve the issue). When I delete _AppStart.cshtml, and by hitting Run button in WebMatrix for testing, my Demo Website can run but Pages like Register, getCustomers, Customers are missing the database. Please help me to set up things properly in order to solve the problem. Im new to this. Thank you very much. Allen. Quote Link to post Share on other sites
justsomeguy 1,135 Posted June 5, 2014 Report Share Posted June 5, 2014 The error message makes it sounds like it is expecting a database connection string called "Users", and it can't find one. Look into creating a database connection string. If it was a problem with WebSecurity not being included, the error message would indicate that. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.