ADO.NET Dataservice This collection already contains an address with scheme http PartII

You may have searched for

This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.

Parameter name: item

I have written some time ago a blog post which have a workaround with removing http headers in iis.

Now I found in documentation prefixfilters which allow the use of ado.net dataservice with multiple host headers on website. There must be some setting in web.config like

  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" >
    <baseAddressPrefixFilters>
      <add prefix="http://www.vsone.de"/>
    </baseAddressPrefixFilters>
    </serviceHostingEnvironment>
  </system.serviceModel>
</configuration>

No I run in second problem.

IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme.

OK- it’s easy to change that in IIS. But what's about authenticated access e.g. for Frontpage server extensions?

Still looking….

Next I got a error message

Request Error
The server encountered an error processing the request. See server logs for more details

aha-mhh- which logs- where, WTF?

I found a sloution to display the full error within browser. You have to add in service metadata.

<System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults := true)> _
Public Class EventDataService1

Now I have the next error:

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 eventsEntities..ctor() in C:\Inetpub\vs2005\App_Code\Model1.Designer.vb:Zeile 27. bei invoke_constructor() bei System.Data.Services.DataService`1.CreateDataSource() bei System.Data.Services.DataService`1.EnsureProviderAndConfigForRequest() bei System.Data.Services.DataService`1.ProcessRequestForMessage(Stream messageBody) bei SyncInvokeProcessRequestForMessage(Object , Object[] , Object[] ) bei System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) bei System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Reason now is that I developed with a Silverlight 2 project. And destination is a website. Connection String must be diffrent.

Web Project

connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;

Web Site

connectionString="metadata=res://*;

1 Comment

  • Hi Hannes, did you ever find a final resolution for this? I'm running into the same issue where I'm running my app on an ISP. I don't have control of IIS so I'd like some way to handle this on my side.

    Thanks for this post. It has helped me identify the problem at least.

Comments have been disabled for this content.