Add Service Reference to WCF Service failed in visual studioHow do I “Add Existing Item” an entire directory structure in Visual Studio?Should I add the Visual Studio .suo and .user files to source control?How do I add an existing directory tree to a project in Visual Studio?Using Git with Visual Studio.gitignore for Visual Studio Projects and SolutionsWCF IIS svcutil errorDifference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?Powershell: Error consuming WCF services with MTOM message encodingCan you force Visual Studio to always run as an Administrator in Windows 8?How to solve System.ServiceModel.ServerTooBusyException in WCF?
Cobb-Douglas production function with expenditures rather than units
Responding to Plague Engineer
Why don't the open notes matter in guitar chords?
Is it double speak?
How would a family travel from Indiana to Texas in 1911?
How many years before enough atoms of your body are replaced to survive the sudden disappearance of the original body’s atoms?
How to help new students accept function notation
Is this cheap "air conditioner" able to cool a room?
Is the Folding Boat truly seaworthy?
Can chords be inferred from melody alone?
What city skyline is this picture of?
Is a switch from R to Python worth it?
How to halve redstone signal strength?
Secure my password from unsafe servers
What is an air conditioner compressor hard start kit and how does it work?
If someone else uploads my GPL'd code to Github without my permission, do they not put it at risk of being stolen by Microsoft?
"How do you solve a problem like Maria?"
Where to pee in London?
Is it true that control+alt+delete only became a thing because IBM would not build Bill Gates a computer with a task manager button?
Unexpected route on a flight from USA to Europe
Why should I "believe in" weak solutions to PDEs?
Can ads on a page read my password?
Our group keeps dying during the Lost Mine of Phandelver campaign. What are we doing wrong?
Deadlock Priority High Chosen as deadlock victim
Add Service Reference to WCF Service failed in visual studio
How do I “Add Existing Item” an entire directory structure in Visual Studio?Should I add the Visual Studio .suo and .user files to source control?How do I add an existing directory tree to a project in Visual Studio?Using Git with Visual Studio.gitignore for Visual Studio Projects and SolutionsWCF IIS svcutil errorDifference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?Powershell: Error consuming WCF services with MTOM message encodingCan you force Visual Studio to always run as an Administrator in Windows 8?How to solve System.ServiceModel.ServerTooBusyException in WCF?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have simplest WCF service (visual studio template one), which is working fine with http but fails with https. below is little detail.
Here is how it looks like in IIS.
Here is web.config
<system.serviceModel>
<services>
<service name="WcfService1.Service1">
<endpoint address="" binding="wsHttpBinding" contract="WcfService1.IService1" />
<!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>-->
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" 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="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
Here is browser when I ping it from ip
here is browser when I ping it from domain name.
All good at this point. however when I tried to add a service reference in visual studio, it failed with https but successful with http.
this is ip one (http)
this is domain name one (https)
detailed error message is
The question I have here is why visual studio's cant get hold of https://tar.tennis.com.au/testwcf/service1.svc and is ok with http://10.21.100.129/testwcf/service1.svc ?
surely one is http and other is https but then why browser had no issues with it?
visual-studio wcf https
add a comment |
I have simplest WCF service (visual studio template one), which is working fine with http but fails with https. below is little detail.
Here is how it looks like in IIS.
Here is web.config
<system.serviceModel>
<services>
<service name="WcfService1.Service1">
<endpoint address="" binding="wsHttpBinding" contract="WcfService1.IService1" />
<!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>-->
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" 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="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
Here is browser when I ping it from ip
here is browser when I ping it from domain name.
All good at this point. however when I tried to add a service reference in visual studio, it failed with https but successful with http.
this is ip one (http)
this is domain name one (https)
detailed error message is
The question I have here is why visual studio's cant get hold of https://tar.tennis.com.au/testwcf/service1.svc and is ok with http://10.21.100.129/testwcf/service1.svc ?
surely one is http and other is https but then why browser had no issues with it?
visual-studio wcf https
add a comment |
I have simplest WCF service (visual studio template one), which is working fine with http but fails with https. below is little detail.
Here is how it looks like in IIS.
Here is web.config
<system.serviceModel>
<services>
<service name="WcfService1.Service1">
<endpoint address="" binding="wsHttpBinding" contract="WcfService1.IService1" />
<!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>-->
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" 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="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
Here is browser when I ping it from ip
here is browser when I ping it from domain name.
All good at this point. however when I tried to add a service reference in visual studio, it failed with https but successful with http.
this is ip one (http)
this is domain name one (https)
detailed error message is
The question I have here is why visual studio's cant get hold of https://tar.tennis.com.au/testwcf/service1.svc and is ok with http://10.21.100.129/testwcf/service1.svc ?
surely one is http and other is https but then why browser had no issues with it?
visual-studio wcf https
I have simplest WCF service (visual studio template one), which is working fine with http but fails with https. below is little detail.
Here is how it looks like in IIS.
Here is web.config
<system.serviceModel>
<services>
<service name="WcfService1.Service1">
<endpoint address="" binding="wsHttpBinding" contract="WcfService1.IService1" />
<!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>-->
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" 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="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
Here is browser when I ping it from ip
here is browser when I ping it from domain name.
All good at this point. however when I tried to add a service reference in visual studio, it failed with https but successful with http.
this is ip one (http)
this is domain name one (https)
detailed error message is
The question I have here is why visual studio's cant get hold of https://tar.tennis.com.au/testwcf/service1.svc and is ok with http://10.21.100.129/testwcf/service1.svc ?
surely one is http and other is https but then why browser had no issues with it?
visual-studio wcf https
visual-studio wcf https
asked Mar 27 at 5:15
ahsantahsant
5342 gold badges10 silver badges22 bronze badges
5342 gold badges10 silver badges22 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
We need to add additional service endpoint for the support of https binding.
There are two ways to configure this, please refer to my example.
1. simplified configuration
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpBinding" scheme="http" />
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
2. add the https service endpoint which uses the transport security.
<system.serviceModel>
<services >
<service name="WcfService1.Service1">
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1"></endpoint>
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1" bindingConfiguration="https"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="https">
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Feel free to let me know if there is anything I can help with.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55370224%2fadd-service-reference-to-wcf-service-failed-in-visual-studio%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
We need to add additional service endpoint for the support of https binding.
There are two ways to configure this, please refer to my example.
1. simplified configuration
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpBinding" scheme="http" />
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
2. add the https service endpoint which uses the transport security.
<system.serviceModel>
<services >
<service name="WcfService1.Service1">
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1"></endpoint>
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1" bindingConfiguration="https"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="https">
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Feel free to let me know if there is anything I can help with.
add a comment |
We need to add additional service endpoint for the support of https binding.
There are two ways to configure this, please refer to my example.
1. simplified configuration
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpBinding" scheme="http" />
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
2. add the https service endpoint which uses the transport security.
<system.serviceModel>
<services >
<service name="WcfService1.Service1">
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1"></endpoint>
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1" bindingConfiguration="https"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="https">
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Feel free to let me know if there is anything I can help with.
add a comment |
We need to add additional service endpoint for the support of https binding.
There are two ways to configure this, please refer to my example.
1. simplified configuration
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpBinding" scheme="http" />
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
2. add the https service endpoint which uses the transport security.
<system.serviceModel>
<services >
<service name="WcfService1.Service1">
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1"></endpoint>
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1" bindingConfiguration="https"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="https">
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Feel free to let me know if there is anything I can help with.
We need to add additional service endpoint for the support of https binding.
There are two ways to configure this, please refer to my example.
1. simplified configuration
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpBinding" scheme="http" />
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
2. add the https service endpoint which uses the transport security.
<system.serviceModel>
<services >
<service name="WcfService1.Service1">
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1"></endpoint>
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1" bindingConfiguration="https"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="https">
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Feel free to let me know if there is anything I can help with.
answered Mar 27 at 9:08
Abraham QianAbraham Qian
1,9331 gold badge2 silver badges12 bronze badges
1,9331 gold badge2 silver badges12 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55370224%2fadd-service-reference-to-wcf-service-failed-in-visual-studio%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown