0

I have an MVC .NET 4.0 web application which is using an EF4 Entity Model (database generated). In full trust all works ok, but in medium trust this exception is thrown when code is trying to access a model;

Schema specified is not valid. Errors: 
Models.Model.ssdl(2,89) : error 0002: Request failed. 

[MetadataException: Schema specified is not valid. Errors: 
Models.Model.ssdl(2,89) : error 0002: Request failed.]
   System.Data.Metadata.Edm.Loader.LoadItems(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths) +11108232
...

This is my connectionstring;

res://Manager/Models.Model.csdl|res://Manager/Models.Model.ssdl|res://Manager/Models.Model.msl

It is working in Full trust, so am I missing some permission in my Medium trust?

jaap
  • 373
  • 6
  • 15
  • Could [this](http://support.microsoft.com/kb/977866/nl) be related? – Gert Arnold Apr 17 '12 at 19:41
  • Can you show the first two lines of your ssdl (especially what's at 89 column of the second line)? You can also try getting the original exception by going do Debug->Exceptions menu and checking the "Thrown" checkbox next to "Common Language Runtime Exceptions" and starting debugging your application. The exception that most likely is causing the problem is the SecurityException. Check and/or post the details about this exception as this is the key to understanding what is really failing. – Pawel Apr 18 '12 at 16:54

0 Answers0