Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity Exception Message At least one of the input paths is not valid because either it is too long or it has incorrect format

using EF4 I atempt to make a connection but get this error message "Entity Exception Message At least one of the input paths is not valid because either it is too long or it has incorrect format."

This used the example from http://msdn.microsoft.com/en-us/library/bb738533.aspx but passing in my own server name. What is the "input paths" When I run it from a web app its fine, when I try and run it in a unit/integration test passing in the connection (as app.config might not be there) I get this error.

Whats going on?

like image 465
Doug Thompson - DouggyFresh Avatar asked Oct 24 '25 19:10

Doug Thompson - DouggyFresh


1 Answers

I had the same issue. I was writing the code in the following way

 ebuilder.Metadata = @"Model1.csdl, Model1.ssdl,Model1.msl";

Then after some research I changes it to

 ebuilder.Metadata = @"res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl";

The magic happened and it started working.

like image 181
Satinder Sidhu Avatar answered Oct 26 '25 15:10

Satinder Sidhu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!