BizTalk 2006, WCF (basicHttpBinding), Adding Web Reference will go in end less loop.

Posted at: 5/29/2007 at 7:33 PM by saravana

When I tried to add a "Web Reference" to a WCF service (basicHttpBinding), I encountered following behaviors

1. Either it will throw an exception showing "Failed to add Web Reference" and no more clue anywhere, OR

2. Message saying "This page is accessing information that is not under its control. This poses a security risk. Do you want to continue?" it wont wait for your reply, it will go on endless loop until you click "NO" (then you need to close some 50 or windows), OR

3. It will throw an exception message saying, "Could not generate BizTalk files. Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"

I attached following screen shots for reference:

(OR)

Tweaking the WCF config file with different setting didn't give me any luck. At last I figured out the issue is due to the namespace declaration for the WCF service. Just removing the namespace declaration and defaulting it to use "http://tempuri.org/" (which is not the best practice) solved the problem.

Before:

[ServiceContract(Name = "BackOfficeServices", Namespace = http://companyurl/Service/BackOffice)]

After:

[ServiceContract(Name = "BackOfficeServices"]

I can't really justify the reason, but I guess it will help someone.

Nandri!

Saravana

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: |  Categories: BizTalk General
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(1) | Comments RSS

Comments

Monday, May 26, 2008 12:18 PM
Samad Khan
Samad Khan
Hi Saravana,

That is odd as I haven't encountered that issue. My service contract attribute is declared on a sperate interface which the class implements.

I added the namespace to the configuration file rather than in code if that helps.

Regards,
Samad Khan

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading