1

生成された EF モデルで使用される次の接続文字列があります。ローカル マシンでは正しく動作しますが、展開すると以下のエラーが発生します。SOで何度も参照されているURLを見てきました: http://blogs.teamb.com/craigstuntz/2010/08/13/38628/答えが含まれている場合、私の場合は表示されません.

以下にエラーを貼り付けます

  <add name="svcodecampEntitiesAllTables" connectionString="metadata=res://*/EFModel.ModelAllTables.csdl|res://*/EFModel.ModelAllTables.ssdl|res://*/EFModel.ModelAllTables.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=svcc;integrated security=True;persist security info=True;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" />

{"message":"An error has occurred.","exceptionMessage":"Unable to load the specified metadata resource.","exceptionType":"System.Data.MetadataException","stackTrace":"   at System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources(String assemblyName, String resourceName, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver)\r\n   at System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource..ctor(String originalPath, String assemblyName, String resourceName, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver)\r\n   at System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver)\r\n   at System.Data.Metadata.Edm.MetadataArtifactLoader.Create(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver)\r\n   at System.Data.Metadata.Edm.MetadataCache.SplitPaths(String paths)\r\n   at System.Data.Common.Utils.Memoizer`2.<>c__DisplayClass2.<Evaluate>b__0()\r\n   at System.Data.Common.Utils.Memoizer`2.Result.GetValue()\r\n   at System.Data.Common.Utils.Memoizer`2.Evaluate(TArg arg)\r\n   at System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections)\r\n   at System.Data.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection()\r\n   at System.Data.Objects.ObjectContext..ctor(EntityConnection connection, Boolean isConnectionConstructor)\r\n   at System.Data.Objects.ObjectContext..ctor(EntityConnection connection)\r\n   at System.Data.Entity.Internal.InternalConnection.CreateObjectContextFromConnectionModel()\r\n   at System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel()\r\n   at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()\r\n   at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)\r\n   at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()\r\n   at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()\r\n   at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()\r\n   at System.Linq.Queryable.Select[TSource,TResult](IQueryable`1 source, Expression`1 selector)\r\n   at WebAPI.rest.AttendeesDashboardController.Get(String userSearch, Nullable`1 presentersOnly, Nullable`1 currentCodeCampYearOnly, Nullable`1 start, Nullable`1 limit) in c:\\VCProject\\SVCodeCampWeb\\WebAPI\\rest\\AttendeesDashboardController.cs:line 97\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4()\r\n   at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"}
4

3 に答える 3