VBdotnet2005
asked on
WCF - error "Could not find endpoint element with ..."
I need help on this error. So far I can find a solution.
"Could not find endpoint element with name 'BasicHttpBinding_IService 1' and contract 'ServiceReference1.IServic e1' in the ServiceModel client configuration section. This might be because no configuration file
was found for your application, or because no endpoint element matching this name could be found in the client element."
protected void Page_Load(object sender, EventArgs e)
{
try
{
Service1Client proxy = new Service1Client("BasicHttpB inding_ISe rvice1");
this.Label1.Text = " - Dept UserName : " + proxy.RetreiveUsername("ab c_dom\jdoe ");
}
catch (Exception ex)
{
}
}
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding_IEv alservice" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="St rongWildca rd"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65 536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="81 92" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="163 84" />
<security mode="None">
<transport clientCredentialType="None " proxyCredentialType="None"
realm="" />
<message clientCredentialType="User Name" algorithmSuite="Default" />
</security>
</binding>
<binding name="BasicHttpBinding_ISe rvice1" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="St rongWildca rd"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65 536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="81 92" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="163 84" />
<security mode="None">
<transport clientCredentialType="None " proxyCredentialType="None"
realm="" />
<message clientCredentialType="User Name" algorithmSuite="Default" />
</security>
</binding>
<binding name="BasicHttpBinding_ISe rvice11" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="St rongWildca rd"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65 536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="81 92" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="163 84" />
<security mode="None">
<transport clientCredentialType="None " proxyCredentialType="None"
realm="" />
<message clientCredentialType="User Name" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<netTcpBinding>
<binding name="NetTcpBinding_IEvals ervice" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTr ansactions "
hostNameComparisonMode="St rongWildca rd" listenBacklog="10"
maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
maxReceivedMessageSize="65 536">
<readerQuotas maxDepth="32" maxStringContentLength="81 92" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="163 84" />
<reliableSession ordered="true" inactivityTimeout="00:10:0 0"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Wind ows" protectionLevel="EncryptAn dSign" />
<message clientCredentialType="Wind ows" />
</security>
</binding>
</netTcpBinding>
<wsHttpBinding>
<binding name="WSHttpBinding_IEvalS ervice" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="St rongWildca rd"
maxBufferPoolSize="524288" maxReceivedMessageSize="65 536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="81 92" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="163 84" />
<reliableSession ordered="true" inactivityTimeout="00:10:0 0"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Wind ows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Wind ows" negotiateServiceCredential ="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:49355/eval.svc" binding="basicHttpBinding"
bindingConfiguration="Basi cHttpBindi ng_IServic e11" contract="ServiceReference 1.IService 1"
name="BasicHttpBinding_ISe rvice1" />
</client>
</system.serviceModel>
</configuration>
"Could not find endpoint element with name 'BasicHttpBinding_IService
was found for your application, or because no endpoint element matching this name could be found in the client element."
protected void Page_Load(object sender, EventArgs e)
{
try
{
Service1Client proxy = new Service1Client("BasicHttpB
this.Label1.Text = " - Dept UserName : " + proxy.RetreiveUsername("ab
}
catch (Exception ex)
{
}
}
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding_IEv
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
maxBufferSize="65536" maxBufferPoolSize="524288"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="81
maxBytesPerRead="4096" maxNameTableCharCount="163
<security mode="None">
<transport clientCredentialType="None
realm="" />
<message clientCredentialType="User
</security>
</binding>
<binding name="BasicHttpBinding_ISe
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
maxBufferSize="65536" maxBufferPoolSize="524288"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="81
maxBytesPerRead="4096" maxNameTableCharCount="163
<security mode="None">
<transport clientCredentialType="None
realm="" />
<message clientCredentialType="User
</security>
</binding>
<binding name="BasicHttpBinding_ISe
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
maxBufferSize="65536" maxBufferPoolSize="524288"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="81
maxBytesPerRead="4096" maxNameTableCharCount="163
<security mode="None">
<transport clientCredentialType="None
realm="" />
<message clientCredentialType="User
</security>
</binding>
</basicHttpBinding>
<netTcpBinding>
<binding name="NetTcpBinding_IEvals
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTr
hostNameComparisonMode="St
maxBufferPoolSize="524288"
maxReceivedMessageSize="65
<readerQuotas maxDepth="32" maxStringContentLength="81
maxBytesPerRead="4096" maxNameTableCharCount="163
<reliableSession ordered="true" inactivityTimeout="00:10:0
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Wind
<message clientCredentialType="Wind
</security>
</binding>
</netTcpBinding>
<wsHttpBinding>
<binding name="WSHttpBinding_IEvalS
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false"
maxBufferPoolSize="524288"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="81
maxBytesPerRead="4096" maxNameTableCharCount="163
<reliableSession ordered="true" inactivityTimeout="00:10:0
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Wind
realm="" />
<message clientCredentialType="Wind
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:49355/eval.svc" binding="basicHttpBinding"
bindingConfiguration="Basi
name="BasicHttpBinding_ISe
</client>
</system.serviceModel>
</configuration>
Hi,
<client>
<endpoint address="http://localhost:49355/eval.svc" binding="basicHttpBinding"
bindingConfiguration="Basi cHttpBindi ng_IServic e11" contract="ServiceReference 1.IService 1"
name="BasicHttpBinding_ISe rvice1" />
</client>
Is it your intention to use the bindingconfiguration _IService11 with Contract _IService1 ?
Also check the asmx file and make sure that this is pointing to the correct service...
Your services seem to be a bit all over the place. You may be better recreating the client config file.
Thanks,
Darren
<client>
<endpoint address="http://localhost:49355/eval.svc" binding="basicHttpBinding"
bindingConfiguration="Basi
name="BasicHttpBinding_ISe
</client>
Is it your intention to use the bindingconfiguration _IService11 with Contract _IService1 ?
Also check the asmx file and make sure that this is pointing to the correct service...
Your services seem to be a bit all over the place. You may be better recreating the client config file.
Thanks,
Darren
ASKER
When I used "Add Service Reference..", it automatically added this for me to my App config file.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ISe rvice1" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="St rongWildca rd"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65 536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="81 92" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="163 84" />
<security mode="None">
<transport clientCredentialType="None " proxyCredentialType="None"
realm="" />
<message clientCredentialType="User Name" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:49355/eval.svc" binding="basicHttpBinding"
bindingConfiguration="Basi cHttpBindi ng_IServic e1" contract="ServiceReference 1.IService 1"
name="BasicHttpBinding_ISe rvice1" />
</client>
</system.serviceModel>
</configuration>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ISe
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
maxBufferSize="65536" maxBufferPoolSize="524288"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="81
maxBytesPerRead="4096" maxNameTableCharCount="163
<security mode="None">
<transport clientCredentialType="None
realm="" />
<message clientCredentialType="User
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:49355/eval.svc" binding="basicHttpBinding"
bindingConfiguration="Basi
name="BasicHttpBinding_ISe
</client>
</system.serviceModel>
</configuration>
ASKER
I did just tried to recreate a new app config file.
ASKER
"Also check the asmx file and make sure that this is pointing to the correct service..."
asmx file? I don't understand
asmx file? I don't understand
Did that work?
.asmx files are the old web service files, and not the new WCF service files, so you can ignore that comment.
ASKER
I am still geting the same error.
ASKER
please see attachment.
ee.bmp
ee.bmp
ASKER
I hosted the service in in DevSharepoint IIS.
ASKER
same error
Could not find endpoint element with name 'BasicHttpBinding_IService 1' and contract 'ServiceReference1.IServic e1' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.
Could not find endpoint element with name 'BasicHttpBinding_IService
ASKER
please see attachment
ee.bmp
ee.bmp
ASKER
TheLearnedOne,
Any thoughts?
Any thoughts?
How many projects do you have in the solution? The configuration items for <system.ServiceModel> need to go in the entry project.
Hi, open the .svc file and see where it points to. Make sure it's pointing to the correct service.
Darren
Darren
ASKER
This is a very simple one. Please see an attachment. I hosted on my devserver.
ASKER
sorry, here is the file
ee.doc
ee.doc
Hi,
Right click the eval.svc and open and post up what's in that file.
Thanks
Darren
Right click the eval.svc and open and post up what's in that file.
Thanks
Darren
ASKER
Did you see my attachment? It is under Eval.svc
ASKER
That is all I have.
Hi again,
On the eval.svc file right click and select open markup and put that up as well
Darren
On the eval.svc file right click and select open markup and put that up as well
Darren
ASKER
The name of my WCF service is called "HostedWCFService1
<%@ ServiceHost Language="C#" Debug="true" Service="HostedWCFservice1 .eval" CodeBehind="eval.svc.cs" %>
<%@ ServiceHost Language="C#" Debug="true" Service="HostedWCFservice1
ASKER
Any thoughts?
Hi again,
In your web.config you seem to be missing
<services>
<service behaviorConfiguration="Hos tedWCFserv ice1.evalB ehavior"
name="HostedWCFservice1.ev al">
<endpoint address="" binding="basicHttpBinding" contract="HostedWCFservice 1.eval">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchang e" />
</service>
</services>
This should go inside the <system.serviceModel> tag.
In your web.config you seem to be missing
<services>
<service behaviorConfiguration="Hos
name="HostedWCFservice1.ev
<endpoint address="" binding="basicHttpBinding"
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchang
</service>
</services>
This should go inside the <system.serviceModel> tag.
ASKER
I followed your sample. I got this error when I tried to browse to .svc file.
"Metadata publishing for this service is currently disabled.
If you have access to the service, you can enable metadata publishing by completing the following steps to modify your web or application configuration file:
.."
Here is my webconfig file
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="Hos tedWCFServ ice1.evalB ehavior" name="HostedWCFService1.ev al" >
<endpoint address="" binding="basicHttpBinding" contract="HostedWCFservice 1.eval">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint contract="IMetadataExchang e" binding="mexHttpBinding" address="mex" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="HostedWCFService1.ev alBehavior ">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="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 includeExceptionDetailInFa ults="fals e"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnable d="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAll Requests=" true"/>
</system.webServer>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
"Metadata publishing for this service is currently disabled.
If you have access to the service, you can enable metadata publishing by completing the following steps to modify your web or application configuration file:
.."
Here is my webconfig file
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="Hos
<endpoint address="" binding="basicHttpBinding"
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint contract="IMetadataExchang
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="HostedWCFService1.ev
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="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 includeExceptionDetailInFa
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAll
</system.webServer>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
ASKER
ok. I got the error above post fixed. I tried your code and still received the same error.
Within the same server, no problem. When I tried it on a different server, then it errored.
Within the same server, no problem. When I tried it on a different server, then it errored.
ASKER
when I tried to browse to eval.sv
http://myserveripaddress:4567/eval.svc (from my computer to my server)
I can view the service no problem. Maybe I should add my serverip instead of "localhost:4567/eval.svc ?
http://myserveripaddress:4567/eval.svc (from my computer to my server)
I can view the service no problem. Maybe I should add my serverip instead of "localhost:4567/eval.svc ?
Hi,
Yes you will have to put your server name and directory where the svn file is located.
Darren
Yes you will have to put your server name and directory where the svn file is located.
Darren
Hi,
How are you getting on with this?
Darren
How are you getting on with this?
Darren
ASKER
Hi Darren,
Now, I am trying to consume it from another server. I got an error (in my attachment). I can browse to my service (from the server I am hosting). Need help.
Now, I am trying to consume it from another server. I got an error (in my attachment). I can browse to my service (from the server I am hosting). Need help.
ASKER
Please see attachment.
ee.doc
ee.doc
ASKER
I have VS2008 on the one I am consuming WCF.
ASKER
error
"The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFa ults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs."
"The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFa
ASKER
alright. I think I am getting close here. I followed this link. I can see the error now.
http://chanmingman.wordpress.com/2011/11/02/the-server-was-unable-to-process-the-request-due-to-an-internal-error-for-more-information-about-the-error-either-turn-on-includeexceptiondetailinfaults/
http://chanmingman.wordpress.com/2011/11/02/the-server-was-unable-to-process-the-request-due-to-an-internal-error-for-more-information-about-the-error-either-turn-on-includeexceptiondetailinfaults/
ASKER
Now it is Login failed for the user 'my_dom\spsvr01$'. My service log in sql and returns a value.
"spsvr01" is the name of my server, but it is not a login name or exist in sql as a user login. What options do I have for the login on SQL?
"spsvr01" is the name of my server, but it is not a login name or exist in sql as a user login. What options do I have for the login on SQL?
Hi,
At least you can now communicate with the service which is a good start.
You should be using some connection string to talk to the database so I'm not sure where this error is comming from.
What are you using to connect to the database?
Darren
At least you can now communicate with the service which is a good start.
You should be using some connection string to talk to the database so I'm not sure where this error is comming from.
What are you using to connect to the database?
Darren
ASKER
this is what I am using to connect to sql.
SqlConnection Sqlcon = new SqlConnection("Server=appd bsvr01;Max Pool Size=500;Database=WSS_Cont ent;Integr ated Security=SSPI;");
SqlConnection Sqlcon = new SqlConnection("Server=appd
ASKER
It is in my eval.scv.cs file.
ASKER
spsvr01 is my dev server.
ASKER
I am calling it from another box.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
this one helps.
http://learn.iis.net/page.aspx/624/application-pool-identities/
http://learn.iis.net/page.aspx/624/application-pool-identities/
ASKER
This is now resolved. Thank you very much.
Is that the client-side configuration, or the server-side configuration?
What are the service contract interface names for the web service?