Hi guys,
I have one asp.net(c#) application and a asp.net enabled wcf service hosted in same port as two virtual directories. i have configured form authentication for both asp.net and asp.net enabled wcf service. When i am calling method in WCF Service from asp.net without forms authentication everything working fine. when i enable the forms authentication in wcf service . i get the following error with the contents of login page due to the unauthenticated service call.
i have pasted the some part of response below

"The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were"

   
 

</pre></td></tr></tbody></table><br><br>i have tried the solution i get from net by adding current authentication cookie using following code but i get the same issue. <br><br>   <table bgcolor="#F6F6F6" width="100%" cellpadding="3" style="border:dashed 1px gray;"><tbody><tr><td><pre><code> </code>HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty();<br>httpRequestProperty.Headers.Add(HttpRequestHeader.Cookie, FormsAuthentication.GetAuthCookie(User.Identity.Name, false).Value);<br>ServiceReference1.Service1Client serviceClient = new ServiceReference1.Service1Client();<br>using (OperationContextScope scope = new OperationContextScope(serviceClient.InnerChannel))<br>{<br>OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty;<br>string s = serviceClient.GetData(2);<br>}<br></pre></td></tr></tbody></table><br>I look forward for your reply. Tired of searching for the solution...<br><br>thanks in advance.</div></article><template id="P:4"></template><section class="comments" id="replies"><header class="comments-head"><span class="comments-badge" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M3 3h10a2 2 0 0 1 2 2v4.5a2 2 0 0 1-2 2H7.5L4 14.5V11.5H3a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"></path></svg></span><div><h2 class="comments-title">Replies</h2><p class="comments-sub">Know the answer? Post it — somebody with the same question will find it here.</p></div></header><div class="comment-signin"><span class="comment-signin-badge" aria-hidden="true"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6"><path d="M11.5 3.5h3.2a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1h-3.2" stroke-linecap="round"></path><path d="M4.5 10h7" stroke-linecap="round"></path><path d="M8.8 7.2 11.6 10l-2.8 2.8" stroke-linecap="round" stroke-linejoin="round"></path></svg></span><div class="comment-signin-body"><p class="comment-signin-title">Sign in to <!-- -->answer this question</p><p class="comment-signin-text">It is the same account you read, post and publish with — and you will come straight back to this page.</p></div><div class="comment-signin-actions"><a class="btn primary-btn comment-signin-btn" href="/login?returnurl=%2Fforums%2Fforms-authentication-with-wcf-service-and-asp-net-in-two-virtual-directory-in-same-port">Sign in</a><a class="comment-signin-alt" href="/register?returnurl=%2Fforums%2Fforms-authentication-with-wcf-service-and-asp-net-in-two-virtual-directory-in-same-port">Create an account</a></div></div></section></div></div><script>$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("S:2","P:2")</script><script>self.__next_f.push([1,"55:[\"$\",\"$L50\",null,{\"markup\":\"\u003cdiv id=\\\"ezoic-pub-ad-placeholder-144\\\"\u003e\u003c/div\u003e\",\"scripts\":[{\"attrs\":{},\"text\":\"\\n ezstandalone.cmd.push(function () {\\n ezstandalone.showAds(144);\\n });\\n\"}],\"ezoicPlaceholder\":144,\"className\":\"discussion-ad\"}]\n"])</script><div hidden id="S:4"><div class="discussion-ad ad-unfilled"><div id="ezoic-pub-ad-placeholder-144"></div></div></div><script>$RS("S:4","P:4")</script><script>$RC("B:1","S:1")</script></body></html>