Using Entityframework in asp.net webservice

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
ALBOS
Posts: 5
Joined: Mon 18 Jan 2010 16:59

Using Entityframework in asp.net webservice

Post by ALBOS » Mon 18 Jan 2010 17:23

Hallo,

I' ve added an Oracle LinqToEntity model to a new webservice. In the entity developer I can retrieve data by right clicking. All works fine.
I started my webservice and go to the default page. The page is showing and I can execute the webservice. The call failed and I get the following message in my explorer:

xml version="1.0" encoding="utf-8" ?>
System.Data.MetadataException: Angeforderte Metadatenressource kann nicht geladen werden. bei System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources(String assemblyName, String resourceName, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) bei System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) bei System.Data.Metadata.Edm.MetadataArtifactLoader.Create(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) bei System.Data.EntityClient.EntityConnection.SplitPaths(String paths) bei System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections) bei System.Data.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection() bei System.Data.Objects.ObjectContext..ctor(EntityConnection connection, Boolean isConnectionConstructor) bei System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) bei DEMO100Model.DEMO100Entities..ctor() in C:\VS.NET Projekte 2008\Albos\albos.als\albos.als.server\App_Code\DataSourceModel.Designer.vb:Zeile 22. bei Services.TestDevart() in C:\VS.NET Projekte 2008\Albos\albos.als\albos.als.server\App_Code\Services.vb:Zeile 66.

What is wrong?

Thanks a lot
Juergen

ALBOS
Posts: 5
Joined: Mon 18 Jan 2010 16:59

Post by ALBOS » Tue 19 Jan 2010 07:35

I solved the problem by creating a new webservice. The connectionstring was there written in app.config. I copied this string to the web.config and all worked fine.

Juergen

Post Reply