473,654 Members | 3,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 behaviorConfigu ration="JobServ iceConfig" name="MyTest.Jo bService">
<endpoint address="" binding="basicH ttpBinding" contract="MyTes t.JobService"/>
</service>
I have a class library that will act as my client. For now, my class library is named JobServiceClien t 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="basicH ttpBinding" bindingConfigur ation="BasicHtt pBinding_JobSer vice"

contract="JobSe rviceClient.Job Proxy.JobServic e" name="BasicHttp Binding_JobServ ice" />

</client>

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

public XmlElement GetJobTypeList( )

{

XmlElement jobTypeList = null;

using (JobProxy.JobSe rviceClient jobServiceClien t = new JobProxy.JobSer viceClient())

{

jobTypeList = jobServiceClien t.GetJobTypeLis t();

}

return jobTypeList;

}
I have a unit test in JobServiceClien t 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.GetJ obTypeList();

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 5808
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********@hot mail.comwrote in message news:Og******** ******@TK2MSFTN GP04.phx.gbl...
I have created a WCF Service hosted in IIS. In my web.config it has its endpoint configured like so:
<service behaviorConfigu ration="JobServ iceConfig" name="MyTest.Jo bService">
<endpoint address="" binding="basicH ttpBinding" contract="MyTes t.JobService"/>
</service>
I have a class library that will act as my client. For now, my class library is named JobServiceClien t 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="basicH ttpBinding" bindingConfigur ation="BasicHtt pBinding_JobSer vice"

contract="JobSe rviceClient.Job Proxy.JobServic e" name="BasicHttp Binding_JobServ ice" />

</client>

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

public XmlElement GetJobTypeList( )

{

XmlElement jobTypeList = null;

using (JobProxy.JobSe rviceClient jobServiceClien t = new JobProxy.JobSer viceClient())

{

jobTypeList = jobServiceClien t.GetJobTypeLis t();

}

return jobTypeList;

}
I have a unit test in JobServiceClien t 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.GetJ obTypeList();

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
1940
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 following. I have a WebService (it works) that fetches data, turns it into XML and returns it to a vb.net client. The "data" though represents property values for an object which the vb.net client has created and now has to load. Just about every...
2
2515
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, client is connecting without problems; but when servre is down and i start client, client connect to server! Few lines from code: client.Socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
4
6582
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. There is no consistency when it fails. Could anyone here shed some light on how to debug/resolve the issue. I guess IBM looked at the issue and were not able to pinpoint where the issue is. When the program hangs and when force the DB2...
2
5701
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 webbrowser controls on it. Besides that i'm using the firewall client for isa server 2004 and it seems that the browsers aren't able to pass thru it... if i disable the firewall the browsers work fine, if i don't, the 2 browsers just stay there...
8
2735
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 starts objects for all these 25 clients are created and when client connects it should be accepted and will not allow more than 25 clients to connect and when client diconnects that object can be allocated to another client who requests i am not...
7
9748
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 but didn't get success. I am getting same error if i am enetring blank user and password. What i am doing wrong ?
0
1781
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 have an ASP .NET website running on a IIS Server with Lotus note is running at the machine where server is running. One client sends the request to the server and correspondingly mail goes to the respective person as mentioned. I am using a...
3
4416
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 the other machine I get the error upon instantiating the service client. I add the reference by choosing Add Service Reference from the project menu, and pointing to the remote wsdl file. I can't seem to find what the difference between the two...
9
7262
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{ WebClient web = new WebClient(); string url = "http:/myaspserver/mydir/mykey_2008.pfx"; byte b = web.DownloadData(url);
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8707
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8482
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8593
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7306
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.