I am new to Mvc. Got an error while trying to implement the article "Simple Search Panel" posted in this link.
http://www.c-sharpcorner.com/UploadFile/scottlysle/simple-search-panel-in-mvc-4/
Steps I followed:
1.Downloded the bak file & source code.
2.Completed restoring the database into my local SQL Server instance.
3.Changed the connection string in web.config as follows.
<connectionStrings>
<add name="PostalCodesEntities" connectionString="Data Source=.\SqlExpress;
AttachDbFilename=|DataDirectory|\PostalCodes.mdf;
integrated security=True;
MultipleActiveResultSets=True;"
providerName="System.Data.EntityClient" />
</connectionStrings>
4.Now tried running the application.Got the following error.
Server Error in '/' Application.
Keyword not supported: 'data source'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.ArgumentException: Keyword not supported: 'data source'.
Source Error:
| Line 13: PostalCodesEntities context = new PostalCodesEntities(); Line 14: Line 15: return (from a in context.ZIP_Codes Line 16: join b in context.States on a.State_Code equals b.State_Code Line 17: orderby b.State_Code ascending, a.City, a.ZIP_Code1 ascending |
Please guide me where I am doing mistake.Thanks for any kind of advice.
Praveen KumarRank #4 · 79.9K pointsPosted Aug 6, 2013, 7:10 PM EDT
Sravs30 pointsPosted Aug 7, 2013, 6:54 AM EDT
Maharudra GadekarRank #5,691 · 288 pointsPosted Nov 14, 2016, 3:00 AM EST