本文介绍了将服务引用添加到项目获取错误时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试将服务引用添加到项目中时,我创建了Web服务,当时我收到以下错误
i have created web services when i am trying to add service refrence into project that time i am getting following error
The HTML document does not contain Web service discovery information. Metadata contains a reference that cannot be resolved: 'localhost/SecureDox/Scribe/SxFlowWebServices.asmx'. The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+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: ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="www.w3/1999/xhtml"> <head><title> SecureDox </title><link href="../Assets/Styles/login.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> /* HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed Uncompressed source: github/aFarkas/html5shiv */ (function (l, f) { function m() { var a = e.elements; return "string" == typeof a ? a.split(" ") : a } function i(a) { var b = n[a[o]]; b || (b = {}, h++, a[o] = h, n[h] = b); return b } function p(a, b, c) { b || (b = f); if (g) return b.createElement(a); c || (c = i(b)); b = c.cache[a] ? c.cache[a].cloneNode() : r.test(a) ? (c.cache[a] = c.createElem(a)).cloneNode() : c.createElem(a); return b.canHaveChildren && !s.test(a) ? c.frag.appendChild(b) : b } function t(a, b) { if (!b.ca'. If the service is defined in the current solution, try building the solution and adding the service reference again.推荐答案
在Web.config文件的标题中。 请务必以: $开头b $ b 似乎响应正在尝试匹配你的编码写在你的App / webb中。 请检查你的项目是否超过ISO-8859-1编码或UTF-8 或 检查WSDL是否显示此编码 折叠|复制代码 http:// localhost:60789 / AppService.asmx? WSDL [ ^ ] 其他方式可能是Web服务App ..未正确配置 In the header of Web.config file. Be sure that begin with: It Appear that the response is trying to match with your encoding wrote in your App/webb. please review if your project is over ISO-8859-1 encoding or UTF-8 Or check if the WSDL show you this encoding Collapse | Copy Code localhost:60789/AppService.asmx?WSDL[^] Other way could be that the Web service App.. is not Configured Properly
更多推荐
将服务引用添加到项目获取错误时
发布评论