Problem with OData v4 endpoint

I have an internal Odata v4 endpoint running on my localhost in IIS with Windows Auth and a self-signed certificate. (The kind that will give you a warning and a big X in chrome, firefox, etc.)

Anyways, in linqpad, I try to connect to it, specifying the URL without the $metadata at the tail end.

I get the following error:

https://localhost/chipsdbwebapi/odata/ (Error: WebException - The underlying connection was closed: An unexpected error occurred on a send. (Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.)

Any ideas?



Comments

  • Disabled https - now with http and IIS Windows Auth (NTLM) enabled as security mode and I get this error:

    Error WebException - Failed to access the metadata document. The ODATA service required authentication for accessing it. Please download the metadata, store it into a local file, and set the value of "MathadataDocumentUri" in the .odata.config file to the file path. After that, run custom tool again to generate the OData client code.

    Note - yes, I have specified my domain credentials when creating the connection
  • Stack Trace from log file
    5.22.02 2017-07-14T18:27:58.3316433-07:00 Custom Data Context Driver - 
    WebException: Failed to access the metadata document. The OData service requires authentication for accessing it. Please download the metadata, store it into a local file, and set the value of “MetadataDocumentUri” in the .odata.config file to the file path. After that, run custom tool again to generate the OData Client code.
       at OData4.Builder.CodeGenerationContext.GetEdmxStreamFromUri(Uri metadataUri)
       at OData4.Builder.CodeGenerationContext.GetEdmxStringFromMetadataPath(Uri metadataUri)
       at OData4.Builder.CodeGenerationContext..ctor(Uri metadataUri, String namespacePrefix)
       at OData4.Builder.ODataClient.GenerateCode()
       at OData4.OData4DynamicDriver.GetSchemaAndBuildAssembly(IConnectionInfo cxInfo, AssemblyName assemblyToBuild, String& nameSpace, String& typeName)
       at LINQPad.SchemaBuilder.GetSchemaAndBuildAssembly(String repositoryData, AssemblyName assemblyToBuild, String& nameSpace, String& typeName, Boolean allowOneToOne, IDictionary`2& sessionData)
    First chance data:
    
    5.22.02 2017-07-14T18:27:58.3384788-07:00 Error opening DataContext - 
    DisplayToUserException: WebException - Failed to access the metadata document. The OData service requires authentication for accessing it. Please download the metadata, store it into a local file, and set the value of “MetadataDocumentUri” in the .odata.config file to the file path. After that, run custom tool again to generate the OData Client code.
    
    Server stack trace: 
       at LINQPad.SchemaBuilder.GetSchemaAndBuildAssembly(String repositoryData, AssemblyName assemblyToBuild, String& nameSpace, String& typeName, Boolean allowOneToOne, IDictionary`2& sessionData)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at LINQPad.SchemaBuilder.GetSchemaAndBuildAssembly(String repositoryData, AssemblyName assemblyToBuild, String& nameSpace, String& typeName, Boolean allowOneToOne, IDictionary`2& sessionData)
       at LINQPad.DataContextManager.<>c__DisplayClass30_1.<FetchDCInfoCore>b__0()
       at System.Threading.Tasks.Task.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
       at LINQPad.DataContextManager.<FetchDCInfoCore>d__30.MoveNext()
    First chance data: LINQPad.SchemaBuilder.GetSchemaAndBuildAssembly(repositoryData,assemblyToBuild,nameSpace,typeName,allowOneToOne,sessionData) offset=0xFFFFFFFF
       -LINQPad.DataContextManager+<>c__DisplayClass30_1.<FetchDCInfoCore>b__0() offset=0x2B
    
    LINQPad.DataContextManager+<FetchDCInfoCore>d__30.MoveNext() offset=0x3D8
       -LINQPad.TaskExtensions+<>c__DisplayClass24_0`1.<WithCancellation>b__1(ant) offset=0x40
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!