簡體   English   中英

NET的OData端點

[英]OData Endpoint with .NET

我正在嘗試為數據庫中的表值函數創建odata端點。 我對代碼有把握,但是在運行應用程序時出現錯誤

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Could not load type 'ODataService.WebApiApplication'.

Source Error: 


Line 1:  <%@ Application Codebehind="Global.asax.cs" Inherits="ODataService.WebApiApplication" Language="C#" %>

Source File: /global.asax    Line: 1 

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248

我已經驗證了匯編路徑和我的代碼,但是這個錯誤我無法理解,我在其中停留了3個小時。 一樣的東西。

在web.config中檢查程序集綁定。 您可能需要這樣的東西(或者您可能必須刪除一個)。 確保所有綁定都指向bin文件夾中現有的程序集。

  <dependentAssembly>
    <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
  </dependentAssembly>

另外,更新NuGet軟件包以確保所有最新的程序集均已下載並解決。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM