我有一個aspx文件和配置文件中被認可......導入參考不運行時
<%@ Page Language="C#" Debug="true"%>
<%
....
%>
<?xml version="1.0"?>
<configuration>
<appSettings>
....
</appSettings>
<system.web>
<compilation debug="false" strict="false" explicit="true" />
<pages>
<namespaces>
<clear/>
....
<add namespace="OnTimeApi"/>
<add namespace="Newtonsoft.Json"/>
</namespaces>
</pages>
</system.web>
</configuration>
我就把這兩個文件中的空白VS解決方案,同時一個App_Data /文件夾,其中有OnTimeApi.dll和Newtonsoft.Json.dll。在VS中,它會識別這兩個dll文件,因爲語法正確突出顯示。當我運行使用IIS它,但是,它提供了以下錯誤:
Compiler Error Message: CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
源錯誤:
Line 33: <add namespace="System.Collections.Generic"/>
Line 34: <add namespace="OnTimeApi"/>
Line 35: <add namespace="Newtonsoft.Json"/>
Line 36: </namespaces>
Line 37: </pages>
Source File: c:\inetpub\ontimeconnector\Web.config Line: 35