New Posts New Posts RSS Feed: NorthwindIB with MSSQL2008
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Forum LockedNorthwindIB with MSSQL2008

 Post Reply Post Reply
Author
TroyDotNet View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Feb-2009
Location: IL
Posts: 5
Post Options Post Options   Quote TroyDotNet Quote  Post ReplyReply Direct Link To This Post Topic: NorthwindIB with MSSQL2008
    Posted: 10-Feb-2009 at 9:38am
I am using DevForce EF Professional 4.2.2 on Vista Business x64 with VS2008 Pro SP1, MSSQL2008 Pro and .Net 3.5 SP1.
 
I loaded the ASP.Net Learning Unit via C:\Program Files (x86)\IdeaBlade DevForce EF\Learning Units\200 Intermediate\ASP.NET Apps Using AspDatasource\02 Tutorials\CS\Completed_Pt01.  I set the starting project and starting page and pressed F5.  After logging in I am met with the following error:
 
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
 
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844759
 
I assume there is a problem with the connection string in ServerModelNorthwindIB-->App.Config:
 
    <add name="ServerModelNorthwindIBContext" connectionString="metadata=res://*/ServerModelNorthwindIB.csdl|res://*/ServerModelNorthwindIB.ssdl|res://*/ServerModelNorthwindIB.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.;Initial Catalog=NorthwindIB;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
So I set the DDL's data source to (None) on http://localhost:1103/Nancy/DevForceWeb.aspx and drag & configure a SqlDataSource and GridView on the page.  Pressing F5 yields a grid of 10 employees.  The SqlDataSource's connection string points to a connection string in web.config:
 
  <add name="NorthwindIBConnectionString_TroyLaptop" connectionString="Data Source=TROY_LAPTOP\TROYLAPTOP;Initial Catalog=NorthwindIB;Integrated Security=True"
   providerName="System.Data.SqlClient" />
 
So I point the DDL back to mEmployeeSelectorAspDataSource and modify the App.Config connection string to make it point to TROY_LAPTOP\TROYLAPTOP (server/instance names).  I press F5 and still encounter the error.  I've tried a few other remedies, including detaching & reinstalling the NorthwindIB db, with no positive results.
 
Thus my question: what is my Jethro noggin overlooking?
 
Thanks for your time & attention.
 
Troy
 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 10-Feb-2009 at 10:42am
Is it only the AspDataSource Learning Unit with which you are having connection problems, or do you also have this problem with other Learning Units?
Back to Top
TroyDotNet View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Feb-2009
Location: IL
Posts: 5
Post Options Post Options   Quote TroyDotNet Quote  Post ReplyReply Direct Link To This Post Posted: 10-Feb-2009 at 10:59am
I had not previously tried to execute other tutorials.  However, I just loaded the ConfiguringAWinform.sln and (after setting the Winforms01 project as the Startup Project) executed it, causing a "TargetInvocationException was unhandled" error with an InnerException of "*** License Violation *** - Product key found was invalid.".
 
I ran into that same License Violation error when running the AspDataSource solution but once I selected a startup project and startup webform I never encountered that error again.  That remedy did not work for the Winform tutorial mentioned above.
 
My non-trial license key should be valid. 
 
Troy
Back to Top
TroyDotNet View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Feb-2009
Location: IL
Posts: 5
Post Options Post Options   Quote TroyDotNet Quote  Post ReplyReply Direct Link To This Post Posted: 10-Feb-2009 at 11:06am
p.s.  I should have listed the DomainModel.ServerModelNorthwindIB.Designer.cs code that threw the TargetInvocationException mentioned above:
 
    #region DefaultManager
    public new static DomainModelEntityManager DefaultManager {
      get {
        return GetDefaultEntityManager<DomainModelEntityManager>();  <--- EXCEPTION THROWN
      }
    }
    #endregion
 
p.p.s.  I am signed in as an Administrator on this laptop.
 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 10-Feb-2009 at 3:55pm

A License Key with sufficient privileges has been embedded in each Learning Unit to allow you to compile and run the Learning Unit.  However, if you bring up the Object Mapper and then save, you will replace the License Key with your own key which may or may not have sufficient priviliges. If you install the Learning Units, and never go into the Object Mapper and do a Save, you should not get a License Violation.

the reason that I asked about other Learning Units was to see if you have a problem in general accessing the Northwind IB database, or whether your database access problems are unique to the AspDataSource Learning Unit.
Back to Top
TroyDotNet View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Feb-2009
Location: IL
Posts: 5
Post Options Post Options   Quote TroyDotNet Quote  Post ReplyReply Direct Link To This Post Posted: 10-Feb-2009 at 6:40pm

> If you install the Learning Units, and never go into the Object Mapper and do a Save, you should not get a License Violation.

Hmmm, I must have missed that warning in the readme file.  I have indeed used the Object Mapper--seemed like a good idea at the time (said Adam, after he ate the apple).  Anyway, does that mean I should NEVER go in to the Object Mapper or does that mean I should not go into it until I'm done with the Learning Units?  Both options seem silly.  My Jethro brain expects a valid non-trial license key (i.e. worth money) to be able to run any sample code (Learning Unit) before or after running a DevForce feature (Object Mapper).  This is one of those "What were they thinking" situations that we peons are incapable of fathoming.
 
> ...was to see if you have a problem in general accessing the Northwind IB database
 
As mentioned previously I can access the NorthwindIB db via a SqlDataSource control within the AspDataSource Learning Unit, just not with an AspDataSource control.
 
At this point I assume I need to perform the usual Windows remedy of uninstalling & reinstalling DevForce EF, then ensure I don't utilize the tantalizing Object Mapper until I've exhausted the Learning Units.  If anyone has any better work arounds I'd be most grateful.
 
Thanks again for your time and wisdom.
 
Troy
Back to Top
TroyDotNet View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Feb-2009
Location: IL
Posts: 5
Post Options Post Options   Quote TroyDotNet Quote  Post ReplyReply Direct Link To This Post Posted: 13-Feb-2009 at 1:58pm
Addendum to anyone stumbling onto this thread: I uninstalled and reinstalled DevForce EF and still encounter the same "Could not open a connection to SQL Server" error.  At least I no longer run into the License Key violation error. 
 
If I wipe out databinding for the DDL then the page comes up with no problem (though no data is displayed, of course).
 
If I add a SqlDataSource and ListView, I get data.
 
If I manually add an AspDataSource and ListView tied to Web.Model.OrderAdapterManager I receive the following error:
 
[NotImplementedException: Must be implemented in EntityAdapterManager subclass]
   IdeaBlade.Asp.v4.EntityAdapterManager.SelectEntities(IOrderedDictionary parameters, DataSourceSelectArguments pSelectArgs) +71
   IdeaBlade.Asp.v4.AspDataSourceView.ExecuteSelect(DataSourceSelectArguments pSelectArgs) +129
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
I am off to try other remedies.  In the meantime, we're still using CodeSmith templates to generate our BLL skeleton, Entity and DAL files.  Hopefully we'll have good experience with DevForce EF down the road.
 
Troy
Back to Top
thecotton View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Mar-2008
Location: United States
Posts: 8
Post Options Post Options   Quote thecotton Quote  Post ReplyReply Direct Link To This Post Posted: 09-Sep-2009 at 8:38pm
Troy,
Just for grins :=)  :-)
 
Try changing connection string to say "Persist Security Info=False" and see if it runs - sometimes SQL Server can be strange, too...
Back to Top
enterprisetoday View Drop Down
Newbie
Newbie


Joined: 03-Mar-2009
Posts: 12
Post Options Post Options   Quote enterprisetoday Quote  Post ReplyReply Direct Link To This Post Posted: 09-Sep-2009 at 8:52pm
I've seen your issue before:

(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)




Make sure the configuration manager is set correctly to allow connections. However if you are able to access other learning units and things, this won't matter. It could only assist if you are completely unable to run anything.

Dallas
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down