简体   繁体   English

为什么代码将异常从环境iis抛出到另一个环境

[英]why does code throw exception from an environnement iis to another

i deploy asp mvc web application in my local iis does work correctly, but when i moved to another iis start throwing exception not thrown before, i do not know whether there's nmatching in configuration. 我在本地iis中部署了asp mvc Web应用程序,但确实可以正常工作,但是当我移至另一个iis时,开始抛出之前未引发的异常,因此我不知道配置中是否存在nmatching。

  DateTime date_deb = DateTime.ParseExact(_date_deb, "dd/MM/yyyy", null);
  DateTime date_fin = DateTime.ParseExact(_date_fin, "dd/MM/yyyy", null);

[FormatException: String was not recognized as a valid DateTime.] System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, [FormatException:字符串未被识别为有效的DateTime。] System.DateTimeParse.ParseExact(String s,字符串格式,DateTimeFormatInfo dtfi,
DateTimeStyles style) +3200706 System.DateTime.ParseExact(String s, String format, IFormatProvider provider) +31 DateTimeStyles样式)+3200706 System.DateTime.ParseExact(字符串s,字符串格式,IFormatProvider提供程序)+31

//other exception here //其他例外

IList<object[]> bilansMois = session.CreateSQLQuery(sql).List<object[]>();
 bilansMois[0].Count() != 0

[ArgumentOutOfRangeException: Index was out of range. [ArgumentOutOfRangeException:索引超出范围。 Must be non-negative and less than the size of the collection. 必须为非负数并且小于集合的大小。 Parameter name: index] System.ThrowHelper.ThrowArgumentOutOfRangeException() +72 System.Collections.Generic.List`1.get_Item(Int32 index) +9593284 参数名称:index] System.ThrowHelper.ThrowArgumentOutOfRangeException()+72 System.Collections.Generic.List`1.get_Item(Int32 index)+9593284

服务器设置为什么位置?,似乎您以错误的格式传递了日期时间以使IIS能够识别

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM