Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 解析服务此请求所需的资源时出错。?_C#_Asp.net_.net_Asp.net Mvc 4_Asp.net Web Api - Fatal编程技术网

C# 解析服务此请求所需的资源时出错。?

C# 解析服务此请求所需的资源时出错。?,c#,asp.net,.net,asp.net-mvc-4,asp.net-web-api,C#,Asp.net,.net,Asp.net Mvc 4,Asp.net Web Api,我有global.asax文件 <%@ Application Codebehind="Global.asax.cs" Inherits="MSOL.ERP.Services.WebApiApplication" Language="C#" %> 分析器错误消息:无法加载类型 “MSOL.ERP.Services.webapicapplication” 源文件:/global.asax行:1 我应该怎么做才能摆脱它呢?i rmoved Inherits=“MSOL.ERP.Se

我有global.asax文件

  <%@ Application Codebehind="Global.asax.cs" Inherits="MSOL.ERP.Services.WebApiApplication" Language="C#" %>
分析器错误消息:无法加载类型 “MSOL.ERP.Services.webapicapplication”

源文件:/global.asax行:1


我应该怎么做才能摆脱它呢?

i rmoved Inherits=“MSOL.ERP.Services.WebApiApplication”和问题解决方案您的
asax
文件(
MSOL.ERP.Services
)中的名称空间和代码隐藏(
ERPServices
)中的名称空间有什么区别?这就是你的问题。i rmoved继承了=“MSOL.ERP.Services.webapicapplication”并解决了问题您的
asax
文件(
MSOL.ERP.Services
)中的名称空间与您的代码隐藏(
ERPServices
)中的名称空间有何不同?这就是你的问题。i rmoved继承了=“MSOL.ERP.Services.webapicapplication”并解决了问题您的
asax
文件(
MSOL.ERP.Services
)中的名称空间与您的代码隐藏(
ERPServices
)中的名称空间有何不同?那是你的问题。
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Web;
 using System.Web.Http;
 using System.Web.Routing;


namespace ERPServices
 {
      public class WebApiApplication : System.Web.HttpApplication
       {
             protected void Application_Start()
                   {
                        GlobalConfiguration.Configure(WebApiConfig.Register);
                }
     }
 }