473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

WCF - Client dll not working

I have created a WCF Service hosted in IIS. In my web.config it has its endpoint configured like so:
<service behaviorConfiguration="JobServiceConfig" name="MyTest.JobService">
<endpoint address="" binding="basicHttpBinding" contract="MyTest.JobService"/>
</service>
I have a class library that will act as my client. For now, my class library is named JobServiceClient It has a service reference to my service http://localhost:2269/MyTest/Service.svc

This project has a class that I will be using to act as a wrapper for the proxy, and with some of my logic in it.
In the app.config it has its end point configured like so:
<client

<endpoint address="http://localhost:2269/MyTest/Service.svc"

binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_JobService"

contract="JobServiceClient.JobProxy.JobService" name="BasicHttpBinding_JobService" />

</client>

This "wrapper" class is called JobService and has a method in it like:

public XmlElement GetJobTypeList()

{

XmlElement jobTypeList = null;

using (JobProxy.JobServiceClient jobServiceClient = new JobProxy.JobServiceClient())

{

jobTypeList = jobServiceClient.GetJobTypeList();

}

return jobTypeList;

}
I have a unit test in JobServiceClient that runs correctly and actually returns me a list of job types.
My problem is when I have another application (Web app) try to consume this DLL and get a list of jobs by doing this:
JobService jobService = new JobService();

XmlElement jobServiceList = jobService.GetJobTypeList();

I get an error that says "Could not find default endpoint element that references contract ..."

It seems like it is looking in my main app for the end point when it should be just using the GetJobTypeList method that encapsulates all of that for me.... any ideas on how I can get this to work correctly?

Oct 2 '07 #1
1 5799
Colleen,

In the new web application that uses the proxy wrapper dll, does it have the end point configured in the web.config file?

It could be as simple as that.

--
Andrian
"C Downey" <co********@hotmail.comwrote in message news:Og**************@TK2MSFTNGP04.phx.gbl...
I have created a WCF Service hosted in IIS. In my web.config it has its endpoint configured like so:
<service behaviorConfiguration="JobServiceConfig" name="MyTest.JobService">
<endpoint address="" binding="basicHttpBinding" contract="MyTest.JobService"/>
</service>
I have a class library that will act as my client. For now, my class library is named JobServiceClient It has a service reference to my service http://localhost:2269/MyTest/Service.svc

This project has a class that I will be using to act as a wrapper for the proxy, and with some of my logic in it.
In the app.config it has its end point configured like so:
<client

<endpoint address="http://localhost:2269/MyTest/Service.svc"

binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_JobService"

contract="JobServiceClient.JobProxy.JobService" name="BasicHttpBinding_JobService" />

</client>

This "wrapper" class is called JobService and has a method in it like:

public XmlElement GetJobTypeList()

{

XmlElement jobTypeList = null;

using (JobProxy.JobServiceClient jobServiceClient = new JobProxy.JobServiceClient())

{

jobTypeList = jobServiceClient.GetJobTypeList();

}

return jobTypeList;

}
I have a unit test in JobServiceClient that runs correctly and actually returns me a list of job types.
My problem is when I have another application (Web app) try to consume this DLL and get a list of jobs by doing this:
JobService jobService = new JobService();

XmlElement jobServiceList = jobService.GetJobTypeList();

I get an error that says "Could not find default endpoint element that references contract ..."

It seems like it is looking in my main app for the end point when it should be just using the GetJobTypeList method that encapsulates all of that for me.... any ideas on how I can get this to work correctly?

Oct 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Tom Leylan | last post by:
(I posted this in languages.vb also... I can't figure out where things go if you use a little of a lot of things) Hi all... I'm looking for an example (or a pointer to one) related to the...
2
by: news.microsoft.com | last post by:
Hi I write dll library which one of it component will be Net socket communication. Communication is working very good, but i've got problem when client is connecting. When server is started,...
4
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times....
2
by: Miguel | last post by:
Hi, I'm developing an application in C# with Windows Forms for my company that is similar to the MSN Messenger. This application uses a webservice for registering users, etc... and as 2...
8
by: Ankit Aneja | last post by:
i am doing here some some socket-client work in C# windows service it is working fine for multiple clients now i want to limit these multiple clients to 25 for example i want that when service...
7
by: Parv | last post by:
I am impersoanting a user to an other domain. But while doing so i am getting A required privilege is not held by the client exception. I have tried with aal possible usernames and passwords...
0
by: kohligagan2 | last post by:
Hi, I am working on a scenario . And scenario is I am trying to send an Email using my Lotus notes Client Id ( Lotus notes :- is used for messaging and sending mails work as a middleware) I...
3
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On...
9
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
I want to download pfx from my asp.net server, add the pfx to client's X509Store as a trusted publisher, Is it possible? my func in aspx is like this: void InstallCertification() { try{...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.