Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the Web Service URL
Message
De
19/08/2010 02:47:31
 
 
À
18/08/2010 14:06:43
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01477089
Message ID:
01477240
Vues:
34
>>If it is derived from SoapClient then it looks as if you could also do this by setting the Destination property to a suitable instance of EndPointReference (but I haven't tried it :-{ )
>
>If you are making reference to something like this, then I can adjust the URL:
>
>
>    ' Add code here to start your service. This method should set things
>    ' in motion so your service can do its work.
>    Protected Overrides Sub OnStart(ByVal args() As String)
>        Dim lcUrl As String = ""
>        Dim loBasicHttpBinding As New System.ServiceModel.BasicHttpBinding()
>        Dim loEndpointAddress As System.ServiceModel.EndpointAddress
>
>        ' Get the Web Service URL
>        lcUrl = "https://www.mywebsite.com/MyWebServiceDirectory/MyWebService.asmx"
>
>        ' Adjust the URL
>        loEndpointAddress = New System.ServiceModel.EndpointAddress(lcUrl)
>        oMyClassSoapClient = New MyNamespace.MyClassSoapClient(loBasicHttpBinding, loEndpointAddress)
>
>
>However, the only problem with that is that we are not allow to use https under that protocol.
>
>I get this error:

>The provided URI scheme 'https' is invalid; expected 'http'.
>Parameter name: via

You can't use https when using basicHttpBinding. Try wsHttpBinding instead.
Actually it doesn't have to be *instead* - you can specify multiple end points for the same service.
Note: You can edit the WCF settings by right-clicking the web (or app) .config file and choosing 'Edit WCF Configuration'
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform