Im getting following error from WCF service while downloading metadata -
Error: Cannot obtain Metadata from http://localhost:57656/Service.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling
metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: http://localhost:57656/Service.svc Metadata contains a reference that cannot be resolved: 'http://localhost:57656/Service.svc'.
Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost:57656/Service.svc. The client and service bindings may be mismatched. The remote server returned an error: (415) Unsupported Media Type.HTTP GET Error URI:
http://localhost:57656/Service.svc There was an error downloading 'http://localhost:57656/Service.svc'. The request failed with the error message:--<HTML><HEAD><STYLE type="text/css">#content{ FONT-SIZE: 0.7em; PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP:
0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP:
-5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP: 0px; PADDING-LEFT: 15px; FONT-WEIGHT:
normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE><TITLE>Service</TITLE></HEAD><BODY><DIV id="content"><P
class="heading1">Service</P><BR/><P class="intro">The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the
<serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.</P></DIV></BODY></HTML>--.
Earlier this was working fine somehow I have added few DataMembers to the DataContract and service is throwing above error.
Is there any limitation to add DataMember because my DataContract contains lot of DataMembers.
Please let me know if you are aware about the DataMember limitation in WCF service.
I have exposed few ReadOnly properties which was throwing above error. I just commented all ReadOnly proerties from DataContract and code is working fine now.
Looks like; we cannot expose ReadOnly DataMembers from WCF service... lesson for me :)
pawarpravinb
Member
53 Points
88 Posts
DataMember limitation in WCF service
Dec 03, 2012 02:15 PM|LINK
Hi,
Im getting following error from WCF service while downloading metadata -
Error: Cannot obtain Metadata from http://localhost:57656/Service.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: http://localhost:57656/Service.svc Metadata contains a reference that cannot be resolved: 'http://localhost:57656/Service.svc'. Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost:57656/Service.svc. The client and service bindings may be mismatched. The remote server returned an error: (415) Unsupported Media Type.HTTP GET Error URI: http://localhost:57656/Service.svc There was an error downloading 'http://localhost:57656/Service.svc'. The request failed with the error message:--<HTML><HEAD><STYLE type="text/css">#content{ FONT-SIZE: 0.7em; PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP: 0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE><TITLE>Service</TITLE></HEAD><BODY><DIV id="content"><P class="heading1">Service</P><BR/><P class="intro">The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.</P></DIV></BODY></HTML>--.
Earlier this was working fine somehow I have added few DataMembers to the DataContract and service is throwing above error.
Is there any limitation to add DataMember because my DataContract contains lot of DataMembers.
Please let me know if you are aware about the DataMember limitation in WCF service.
pawarpravinb
Member
53 Points
88 Posts
Re: DataMember limitation in WCF service
Dec 04, 2012 09:02 AM|LINK
I have exposed few ReadOnly properties which was throwing above error. I just commented all ReadOnly proerties from DataContract and code is working fine now.
Looks like; we cannot expose ReadOnly DataMembers from WCF service... lesson for me :)