Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2007

Tip: Looking for answers? Try searching our database.

Calling wsHttpBinding service under IIS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mpaine - 29 Jun 2007 05:36 GMT
Hello,

I am attempting to call a single WCF wsHttpBinding service under IIS from
two seperate Web Sites on the same server.  Unfortunately, it appears that
only one can communicate to the WCF service at a time returning
"WSHttpBinding_IMyService Error: The communication object,
System.ServiceModel.Channels.ServiceChannel, cannot be used for communication
because it is in the Faulted state."  I suspect that it is because IIS is, by
default, using the same IP address for both Web Sites while being a client
calling the service, even though this server has multiple IP addresses,
because I can call the server from two different Web Sites if they are on
different computers.

Is there a way to explicitly set the client IP address to use within the
web.config file (under <system.serviceModel> section)?

Much thanks,
Michael

Signature

msdn premium subscriber

Steven Cheng[MSFT] - 02 Jul 2007 03:50 GMT
Hello Michael,

From your description, you're encountering some connection issue when try
consuming a IIS hosted WCF wshttpbinding service from two asp.net WEB
applications on the same server in IIS, correct?

As for this problem, I would suggest you try further tracking down the
issue scenario since I also haven't met the same problem before(running all
the WCF client service on the same machine and all hosted in LOCAL IIS).
You can test the following cases:

** a very simple WCF service (maybe hello world one) and test the same
behavior

** try using other binding like basicHttpbinding or netTCPBinding to see
whether the same problem occur.

In addition, how do you currently specify your WCF service's base address,
are you using "localhost" or your machine's DNS or Netbios name? If you're
using "localhost", I suggest you try changing it to the DNS/netbios name to
see whether it helps.

If you get any other finding, please also feel free to let me know and I
can help you perform some local tests.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================
   

This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 02 Jul 2007 13:59 GMT
Hi Michael,

I've just performed some further research and here is the new result I got:

I tested the scenario on my local machine(windows Vista/IIS7/VS2005+WCF
extension), the test steps are as below:

** create the WCF service and hosted it in IIS default site(wshttpbinding)

** create a class library project which add service referene against the
WCF service so as to generate the proxy

**create two separate ASP.NET web sites in the same solution and both of
them are hosted in localhost (iis default site)

** reference the class library project(in step2) and use the generated
proxy to call the WCF service in both the two ASP.NET applications

It seems both of the two ASP.NET application can call the wcf method and
get the result correctly.  Therefore, I'm wondering the problem should be a
bit more specific either to the application service code or the host
environment. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 05 Jul 2007 02:36 GMT
Hi Michael,

How are you doing? Have you got any progress on this issue? If there is
anything else we can help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
Shweta Patel - 12 Jul 2007 14:29 GMT
Hi Steven,

I have created a WCF service and exposed it though a svc file. When I
call this service with a ASP.Net client (Add Service Reference) , there
is no problem. When I call this service as it was a Web Service (Add Web
Reference) I get an exception "Operation has timed out".

Can you please help me?

Thanks & Regards
Shweta

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.