ASP.NET MVC2 errors with dotConnect for Oracle

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
r.m.saddler
Posts: 33
Joined: Thu 20 May 2010 08:57
Location: Wales, UK.

ASP.NET MVC2 errors with dotConnect for Oracle

Post by r.m.saddler » Tue 25 May 2010 09:47

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.

r.m.saddler
Posts: 33
Joined: Thu 20 May 2010 08:57
Location: Wales, UK.

Post by r.m.saddler » Tue 25 May 2010 10:22

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.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 25 May 2010 15:08

Could you please send us (support * devart * com, subject "EF MVC2") a test project illustrating the errors?
This will speed up the investigation.

r.m.saddler
Posts: 33
Joined: Thu 20 May 2010 08:57
Location: Wales, UK.

Post by r.m.saddler » Wed 26 May 2010 08:24

Hi,

I've sent the project as requested.

Many thanks,

Rob.

r.m.saddler
Posts: 33
Joined: Thu 20 May 2010 08:57
Location: Wales, UK.

Post by r.m.saddler » Thu 10 Jun 2010 10:21

Hi,

did you get anywhere with this investigation? We have just purchased an Enterprise license so I now have pressure to actually get this working :-)

Thanks,

Rob.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 10 Jun 2010 15:52

Our investigation is still in progress.
I will inform you about the results as soon as possible.

Post Reply