Skip to content

Error while Implementing "Simple Serach Panel" article

Sravs

Asked Aug 6, 2013, 7:58 AM EDT3 answers
Share
LinkedInX
Hi Friends 

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.

3 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Praveen Kumar
    0
    You can post the same to article comment. Author can help you better if post as article comment.
    0
  • 0
    Thank you very much Sir.Will do that.
    0
  • Maharudra Gadekar
    0
    sir DB back is not restore my database...please send script file
     
     
    thank you in advance
    0