I have below enpoints defined
<Sites>
<Site name="Internal" physicalDirectory="location">
<Bindings>
<Binding name="HttpIn100" endpointName="HttpInLB" />
<Binding name="HttpIn101" endpointName="HttpInLB" hostHeader="someheader" />
<Binding name="HttpIn102" endpointName="HttpInLB" hostHeader="someheader" />
<Binding name="HttpIn103" endpointName="HttpInLB" hostHeader="someheader" />
</Bindings>
</Site>
</Sites>
And this is the endpoint
<Endpoints>
<InputEndpoint name="HttpInLB" protocol="http" port="80" loadBalancer="LB" />
</Endpoints>
Then in my cscfg file I have
<NetworkConfiguration>
<VirtualNetworkSite name="Development" />
<AddressAssignments>
<InstanceAddress roleName="SiteName">
<Subnets>
<Subnet name="DMZ-subnet" />
</Subnets>
</InstanceAddress>
<ReservedIPs>
<ReservedIP name="ipname"/>
</ReservedIPs>
</AddressAssignments>
<LoadBalancers>
<LoadBalancer name="LB">
<FrontendIPConfiguration type="private" subnet="DMZ-subnet" staticVirtualNetworkIPAddress="00.0.00.001" />
</LoadBalancer>
</LoadBalancers>
When I publish, I get below error
ReservedIP 'ipname' was not mapped to an endpoint. The service definition must contain atleast one endpoint that maps to the ReservedIP.
Appreciate if someone could help me with this.
Many Thanks
ReservedIP is only supported with services containing an external endpoint. What you can do is add an external endpoint and block it with Network Security Groups.
For example, add following endpoint to your Endpoints tag. Then you could block the port using NSG.
<InputEndpoint name="Endpoint1" protocol="http" port="8078" />
Related
I developed a wcf webservice in a sharepoint 2016 on premise environment.
When I try to upload a long body I used to get a 413 payload too large error so I changed my app.config to this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="ilem.Sharepoint.WebServices.ISAPI.ilemGroupWS.Service">
<endpoint address="" binding="basicHttpBinding" contract="ilem.Sharepoint.WebServices.ISAPI.ilemGroupmWS.IService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/ilem.Sharepoint.WebServices.ISAPI.ilemGroup/Service/" />
</baseAddresses>
</host>
</service>
</services>
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name=""
helpEnabled="true"
automaticFormatSelectionEnabled="true"
maxReceivedMessageSize="2147000000"
/>
</webHttpEndpoint>
</standardEndpoints>
<bindings>
<basicHttpBinding>
<binding name="MyBinding" maxBufferPoolSize="2000000000"
maxBufferSize="2000000000" maxReceivedMessageSize="2000000000">
<readerQuotas maxDepth="32"
maxArrayLength="200000000"
maxStringContentLength="200000000"/>
</binding>
</basicHttpBinding>
<basicHttpsBinding>
<binding name="MyBinding" maxBufferPoolSize="2000000000"
maxBufferSize="2000000000" maxReceivedMessageSize="2000000000">
<readerQuotas maxDepth="32"
maxArrayLength="200000000"
maxStringContentLength="200000000"/>
</binding>
</basicHttpsBinding>
</bindings>
</system.serviceModel>
</configuration>
But now I get this error: 500 (System.ServiceModel.ServiceActivationException)
Is there any way to resolve this issue?
I found that behaviorConfiguration, bindingConfiguration, <security mode="Transport"> are not set in your code, please make sure to configure them.
You can try setting includeExceptionDetailInFaults to true or configuring tracing to get error details.
Hi i am calling a asmx web service in my MVC project. Everything working fine on my development environment but after publishing my project i get the error "The HTTP request was forbidden with client authentication scheme 'Anonymous'". I tried a lot of methots on th internet bu they did'nt work. You can see my config down below and many thanks for help.
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="FastApiSoap">
<security mode="Transport">
<transport clientCredentialType=""/>
</security>
</binding>
</basicHttpBinding>
<customBinding>
<binding name="FastApiSoap12">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://fastsms.codec.com.tr/FastApi.asmx"
binding="basicHttpBinding" bindingConfiguration="FastApiSoap"
contract="SmsServices.FastApiSoap" name="FastApiSoap" />
<endpoint address="http://fastsms.codec.com.tr/FastApi.asmx"
binding="customBinding" bindingConfiguration="FastApiSoap12"
contract="SmsServices.FastApiSoap" name="FastApiSoap12" />
</client>
</system.serviceModel>
I found the solition. it was a bug, you can find fix on https://support.microsoft.com/en-us/help/2801679/ssl-tls-communication-problems-after-you-install-kb-931125
We have a use case where we don't want to expose our cloud service to public and accessible only through our internal network. Is there a way to de associate the Public IP and access the cloud service through Internal IP. I already added CloudService to our VN but still i can access the CloudService through Public IP.
<NetworkConfiguration>
<VirtualNetworkSite name="xxxxVN" />
<AddressAssignments>
<InstanceAddress roleName="WorkerRole7">
<Subnets>
<Subnet name="default" />
</Subnets>
</InstanceAddress>
<InstanceAddress roleName="WebRole7">
<Subnets>
<Subnet name="default" />
</Subnets>
</InstanceAddress>
</AddressAssignments>
</NetworkConfiguration>
CSDEF:
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="AzureCloudService7" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2015-04.2.6">
<WebRole name="WebRole7" vmsize="Small">
<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" />
</Bindings>
</Site>
</Sites>
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" />
</ConfigurationSettings>
<Endpoints>
<InternalEndpoint name="Endpoint1" protocol="http" port="80" />
</Endpoints>
<Imports>
<Import moduleName="RemoteAccess" />
</Imports>
</WebRole>
<WorkerRole name="WorkerRole7" vmsize="Small">
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" />
</ConfigurationSettings>
<Imports>
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
</Imports>
</WorkerRole>
</ServiceDefinition>>
when i removed Inputendpoint it is asking for binding, so i have given it as Internalendpoint and tried deploying it still am able to access the cloudservice with VIP.
The only ports available via the public load balancer (ie. the VIP) are the ones defined as InputEndpoints in your CSDEF file. So just remove those input endpoints and you will remove the ability to communicate to that VM from the public IP.
Is it possible in Azure to have multiple hostHeader on a single Binding or is it mandatory to create one Binding for each hostheader ?
Example :
<Sites>
...
<Site name="sample.com" physicalDirectory="..\sample.com">
<Bindings>
<Binding name="ep_sample" endpointName="Endpoint1" hostHeader="www.sample1.com,www.sample2.com,www.sample3.com" />
</Bindings>
</Sites>
Or do I have to create each binding entry for single hostHeader (knowing that the site path is the same)?
I believe it has to be done like this:
<Sites>
...
<Site name="sample.com" physicalDirectory="..\sample.com">
<Bindings>
<Binding name="ep_sample1" endpointName="Endpoint1" hostHeader="www.sample1.com" />
<Binding name="ep_sample2" endpointName="Endpoint1" hostHeader="www.sample2.com" />
</Bindings>
</Sites>
I have set up my hostheader in the service definintion file as follows:
<Site name="Example" physicalDirectory="..\example.WebUx">
<Bindings>
<Binding name="Example" endpointName="HttpIn" hostHeader="www.example.com" />
</Bindings>
</Site>
When I enter www.example.com it goes to the correct web site in my role. However when I enter just example.com without the www then it goes to the default web. I tried the following and it didn't help:
<Site name="Example" physicalDirectory="..\Example.WebUx">
<Bindings>
<Binding name="Example" endpointName="HttpIn" hostHeader="www.example.com" />
<Binding name="Example" endpointName="HttpIn" hostHeader="example.com" />
</Bindings>
</Site>
I tried the following and it came up with an error message "Error 1 Found duplicate site elements defined with same virtual path 'Example/' for role Default.WebUx
<Site name="Example" physicalDirectory="..\Example.WebUx">
<Bindings>
<Binding name="Example" endpointName="HttpIn" hostHeader="www.example.com" />
</Bindings>
</Site>
<Site name="Example" physicalDirectory="..\Example.WebUx">
<Bindings>
<Binding name="Example" endpointName="HttpIn" hostHeader="example.com" />
</Bindings>
</Site>
I tried just the following and it didn't work. When implemented this way both the www.example.com and example.com went to the default web.
<Site name="Example" physicalDirectory="..\Example.WebUx">
<Bindings>
<Binding name="Example" endpointName="HttpIn" hostHeader="example.com" />
</Bindings>
</Site>
I'm running out of ideas :-( Does anyone have experience of setting up the hostHeader so that it can accept both the www and non-www versions of my web sites.
Thanks
Here's some links that I also checked. Unfortunately they don't seem to help
Link 1
Link 2
I don't think you will get a domain to work with the Azure DNS.
I may be a bit out of date, but I believe the way to get Azure DNS to work is through CNAME - and CNAME works on subdomains, not on domains
looks like your binding name attribute is the same.
<Site name="Xxx" physicalDirectory="..\Xxx.WebUx">
<Bindings>
<Binding name="Xxx" endpointName="HttpIn" hostHeader="www.xxx.com" />
<Binding name="THE_NEXT_NAME" endpointName="HttpIn" hostHeader="xxx.com" />
</Bindings>
</Site>
For a top-level domain, you have to add an A record pointing to the Virtual IP of your hosted service. This is the same for all your web role instances. However, this is pretty volatile, as your VIP will change if you delete your deployment.
I have not testing top-level domains with multiple sites in a web role, so not sure if you will still run into host header issues beyond this solution. But the above will work for a web role hosting a single site.