Sono stato attraverso Stack Overflow e seguito an online tutorial per SSL E WebHttpBinding.Getting "Impossibile trovare un indirizzo di base che corrisponda a http dello schema per l'endpoint con binding WSHttpBinding. Gli schemi di indirizzi di base registrati sono []"
Sto tornando lo stesso errore di quello menzionato. Sono tornato alla vecchia web config come mostrato di seguito. Il mio sito https sta funzionando bene e ho aggiunto il mio WCF come parte del sito per evitare di dover aprire una nuova porta.
Sto cercando di raggiungere qualcosa di simile ora quando ottengo l'errore:
https://localhost/_vti_bin/TestingSQL/sample.svc/mex
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<services>
<service name="SharePointBits.Samples.WCFService.SampleService" behaviorConfiguration="SharePointBits.Samples.WCFService.SampleServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="https://testsite/_vti_bin/TestingSQL/Sample.svc"/>
</baseAddresses>
</host>
<endpoint address="https://localhost/_vti_bin/TestingSQL/Sample.svc" binding="wsHttpBinding" contract="SharePointBits.Samples.WCFService.ISampleService"
bindingConfiguration="wsHttpBindingEndpointBinding">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="wsHttpBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="SharePointBits.Samples.WCFService.SampleServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
<!--<behavior name="">-->
<!--<serviceMetadata httpGetEnabled="true" />-->
<!--</behavior>-->
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>'
Dopo che ho aggiunto il mio indirizzo web un nuovo errore:
Could not find a base address that matches scheme https for the endpoint with binding MetadataExchangeHttpsBinding. Registered base address schemes are [].
ho provato entrambi i modi e entrambi hanno errori.
Aggiunta di un indirizzo assoluto per metadatabinding
mi viene questo errore:
The HttpsGetEnabled property of ServiceMetadataBehavior is set to true and the HttpsGetUrl property is a relative address, but there is no https base address. Either supply an https base address or set HttpsGetUrl to an absolute address.
Utilizzando l'indirizzo di base ottengo questo errore:
Could not find a base address that matches scheme https for the endpoint with binding MetadataExchangeHttpsBinding. Registered base address schemes are [].
Nota: Ho cambiato il codice di cui sopra con il indirizzo di base.
Ho provato in entrambi i modi e non funziona e sono perplesso sull'indirizzo di base. Ho provato a cambiare il mio endpoint in "" dopo aver aggiunto l'indirizzo di base ma mi ha dato l'errore di essere vuoto, non dovrebbe fare riferimento all'indirizzo di base? Ho posto nella posizione sbagliata? Ho fatto riferimento a http://msdn.microsoft.com/en-us/library/ms734786.aspx –
abbastanza corretto. Hai già provato a modificare l'elemento [serviceMetaData] (http://msdn.microsoft.com/en-us/library/ms731317.aspx)? Specificamente httpsGetUrl? O provato a rimuovere temporaneamente l'endpoint MEX? – Jeroen
Sì! hai ragione! L'aggiunta di httpsGetUrl funziona e il mio endpoint è errato, ho incluso il mio nome del file di servizio che ha fornito un errore indicando che l'url è già registrato. Grazie mille per il vostro tempo! Grazie! –