Hi,
I cannot get the most simple MVC 2 app running with dotConnect for Oracle in VS2010.
I have created a blank MVC 2 project and added a DevArt Entity Model with one oracle table in it (a simple department lookup list). I have added one view and controller and wired them to a silmple call into the repository to return a list of all departments (this data access call has been verified independently and works fine).
With "Metadata Artefact Processing" set to "CopyToOutputDirectory" I can compile successfully but when I run I get an exception:
"System.Data.MetadataException was unhandled by user code
Message=The specified metadata path is not valid. A valid path must be either an existing directory, an existing file with extension '.csdl', '.ssdl', or '.msl', or a URI that identifies an embedded resource."
To overcome this I had to put "~bin/" in front of the cdsl, ssdl and msl entires of the connection string that I pasted from app.config into my web.config file.
This also compiles successfully but when trying to access the view I get a "BC30456: 'Title' is not a member of 'ASP.views" exception when trying to access the view that lists the departments.
If I leave "Metadata Artefact Processing" as "EmbedInOutputAssembly" I got the following errors when compiling:
Error 1 Unable to open file 'C:\Documents and Settings\r.m.saddler\Local Settings\Temp\1\usapzcga.wzw\DataSourceModel1.csdl': System Error &H80070003& MvcApplication1
Error 2 Unable to open file 'C:\Documents and Settings\r.m.saddler\Local Settings\Temp\1\usapzcga.wzw\DataSourceModel1.msl': System Error &H80070003& MvcApplication1
Error 3 Unable to ope
n file 'C:\Documents and Settings\r.m.saddler\Local Settings\Temp\1\usapzcga.wzw\DataSourceModel1.ssdl': System Error &H80070003& MvcApplication1
I have read numerous other similar posts on this site and everything I have tried has not succeeded - any ideas what is going wrong? This must be something very simple.
Regards,
Rob.
ASP.NET MVC2 errors with dotConnect for Oracle
-
- Posts: 33
- Joined: Thu 20 May 2010 08:57
- Location: Wales, UK.
-
- Posts: 33
- Joined: Thu 20 May 2010 08:57
- Location: Wales, UK.
As a work around I have created a view which is now not strongly typed and am instead trying to push the data into the view using ViewData. This time I get the follwoing error when trying to iterate the IEnumerable(Of dept):
BC30007: Reference required to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' containing the base class 'System.Data.Objects.DataClasses.EntityObject'. Add one to your project.
This is odd because this class is already referenced by the project.
BC30007: Reference required to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' containing the base class 'System.Data.Objects.DataClasses.EntityObject'. Add one to your project.
This is odd because this class is already referenced by the project.
-
- Posts: 33
- Joined: Thu 20 May 2010 08:57
- Location: Wales, UK.
-
- Posts: 33
- Joined: Thu 20 May 2010 08:57
- Location: Wales, UK.