首页 新闻 搜索 专区 学院

本地编译通过,放在IIS上就会出问题,求高手

0
悬赏园豆:100 [已关闭问题] 关闭于 2011-05-09 11:27

Server Error in '/' Application.

The call is ambiguous between the following methods or properties: 'System.IO.TextWriter.Write(string, params object[])' and 'System.IO.TextWriter.Write(char[])'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The call is ambiguous between the following methods or properties: 'System.IO.TextWriter.Write(string, params object[])' and 'System.IO.TextWriter.Write(char[])'

Source Error: 

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.


Stack Trace: 

[RuntimeBinderException: The call is ambiguous between the following methods or properties: 'System.IO.TextWriter.Write(string, params object[])' and 'System.IO.TextWriter.Write(char[])']   CallSite.Target(Closure , CallSite , HtmlTextWriter , Object ) +195   ASP.views_shared_filelist_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) +2288   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8   System.Web.UI.Control.Render(HtmlTextWriter writer) +10   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8   System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +55   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060
愤怒的小刀的主页 愤怒的小刀 | 初学一级 | 园豆:200
提问于:2011-05-09 10:15
< >
分享
所有回答(2)
0

System.IO.TextWriter.Write(string, params object[])和System.IO.TextWriter.Write(char[])的调用不明确。

从参数上判断,如果直接编码调用是不会出现这个错误的,唯一可能出错的问题在于你使用了Reflection调用方法,可以通过

在Reflection调用时显示指定Write的两个版本中的一个来解决该冲突。

Launcher | 园豆:45045 (高人七级) | 2011-05-09 10:30
0

是否是服务器站点权限的问题呢

Astar | 园豆:40805 (高人七级) | 2011-05-09 10:41
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册