简体   繁体   English

添加服务失败。 服务元数据可能无法访问

[英]Failed to add a service. Service metadata may not be accessible

I am getting following error when i am running DataManagement.svc 运行DataManagement.svc时出现以下错误

Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.

Error: Cannot obtain Metadata from http://localhost/AppBuilder.WebService/DataManagement.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/AppBuilder.WebService/DataManagement.svc    Metadata contains a reference that cannot be resolved: 'http://localhost/AppBuilder.WebService/DataManagement.svc'.    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: '<html>    <head>        <title>Configuration Error</title>        <style>         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}          p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }         pre {font-family:"Lucida Console";font-size: .9em}         .marker {font-weight: bold; color: black;text-decoration: none;}         .version {color: gray;}         .error {margin-bottom: 10px;}         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }        </style>    </head>    <body bgcolor="white">            <span><H1>Server Error in '/AppBuilder.WebService' Application.<hr width=100% size=1 color=silver></H1>            <h2> <i>Conf'.    The remote server returned an error: (500) Internal Server Error.HTTP GET Error    URI: http://localhost/ClaySys.AppBuilder.WebService/DataManagement.svc    There was an error downloading 'http://localhost/AppBuilder.WebService/DataManagement.svc'.    The request failed with the error message:--<html>    <head>        <title>Configuration Error</title>        <style>         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}          p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }         pre {font-family:"Lucida Console";font-size: .9em}         .marker {font-weight: bold; color: black;text-decoration: none;}         .version {color: gray;}         .error {margin-bottom: 10px;}         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }        </style>    </head>    <body bgcolor="white">            <span><H1>Server Error in '/AppBuilder.WebService' Application.<hr width=100% size=1 color=silver></H1>            <h2> <i>Configuration Error</i> </h2></span>            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">            <b> Description: </b>An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.            <br><br>            <b> Parser Error Message: </b>Could not load file or assembly 'Oracle.Web, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.<br><br>            <b>Source Error:</b> <br><br>            <table width=100% bgcolor="#ffffcc">               <tr>                  <td>                      <code><pre>Line 173:    <healthMonitoring>Line 174:      <providers><font color=red>Line 175:        <add name="OracleWebEventProvider" type="Oracle.Web.Management.OracleWebEventProvider, Oracle.Web, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" buffer="true" bufferMode="OracleNotification" /></font>Line 176:      </providers>Line 177:    </healthMonitoring></pre></code>                  </td>               </tr>            </table>            <br>            <b> Source File: </b> C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config\machine.config<b> ÿÿ Line: </b> 175            <br><br>            <b>Assembly Load Trace:</b> The following information can be helpful to determine why the assembly 'Oracle.Web, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' could not be loaded.<br><br>            <table width=100% bgcolor="#ffffcc">               <tr>                  <td>                      <code><pre>WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].</pre></code>                  </td>               </tr>            </table>            <br>            <hr width=100% size=1 color=silver>            <b>Version Information:</b>ÿMicrosoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927            </font>    </body></html><!-- [FileNotFoundException]: Could not load file or assembly 'Oracle.Web, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.   at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)   at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)   at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)   at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)   at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)[ConfigurationErrorsException]: Could not load file or assembly 'Oracle.Web, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified. (C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config\machine.config line 175)   at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)   at System.Web.Configuration.HealthMonitoringSectionHelper.BasicSanityCheck()   at System.Web.Configuration.HealthMonitoringSectionHelper..ctor()   at System.Web.Configuration.HealthMonitoringSectionHelper.GetHelper()   at System.Web.Management.HealthMonitoringManager..ctor()   at System.Web.Management.HealthMonitoringManager.Manager()   at System.Web.Management.HealthMonitoringManager.get_Enabled()   at System.Web.Management.WebBaseEvent.RaiseSystemEventInternal(String message, Object source, Int32 eventCode, Int32 eventDetailCode, Exception exception, String nameToAuthenticate)   at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)[HttpException]: Could not load file or assembly 'Oracle.Web, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified. (C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config\machine.config line 175)   at System.Web.HttpRuntime.FirstRequestInit(HttpContext context)   at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)   at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)-->--.

My config contain 我的配置包含

 <service behaviorConfiguration="test" name="AppBuilder.WebService.DataManagement">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeBuffer" contract="AppBuilder.WebService.IDataManagement" />
  </service>

Any one can help me please? 有人可以帮我吗?

I guess you didn't enable metadata exchange, try add this: 我猜您没有启用元数据交换,请尝试添加以下内容:

<endpoint
     address="mex"
     binding="mexHttpBinding"
     contract="IMetadataExchange" />

Actually it is described in MSDN and there are samples too. 实际上,它在MSDN中进行了描述,并且也有示例。

Your config might look like this: 您的配置可能如下所示:

<service behaviorConfiguration="test" name="AppBuilder.WebService.DataManagement">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeBuffer" contract="AppBuilder.WebService.IDataManagement" />

    <endpoint
     address="mex"
     binding="mexHttpBinding"
     contract="IMetadataExchange" />
</service>

OR using behaviour: 或使用行为:

<behavior name="test">
    <serviceMetadata 
        httpGetEnabled="true" policyVersion="Policy15"/>
</behavior>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WCF:无法添加服务。 服务元数据可能无法访问 - WCF:Failed to add a service. Service metadata may not be accessible WcfTestClient:添加服务失败。 服务元数据可能无法访问 - WcfTestClient: Failed to add a service. Service metadata may not be accessible 添加服务失败。 服务元数据可能无法访问。 确保您的服务正在运行并公开元数据 - Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata 运行WCF服务获取错误添加服务失败。 服务元数据可能无法访问 - Run WCF service getting error Failed to add a service. Service metadata may not be accessible 获取&#39;无法添加服务。 服务元数据可能无法访问。 测试 WCF 项目时出错 - Getting 'Failed to add a service. Service metadata may not be accessible.' error when testing a WCF project WCF测试客户端:无法添加服务。可能无法访问服务元数据。确保您的服务正在运行并公开元数据 - WCF Test Client : Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata 添加服务失败。 服务元数据可能无法访问。 确保您的服务正在运行并公开元数据。 WCF错误 - Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata. WCF Error WCF:无法添加服务。 可能无法访问服务元数据。 确保您的服务正在运行并公开元数据 - WCF: Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata WCF无法添加服务。 可能无法访问服务元数据。 确保您的服务正在运行并公开元数据 - WCF Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata 服务元数据可能无法访问 - Service metadata may not be accessible
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM