VS 2015 .net UI界面报错总结

一、提示錯誤

解決方法:

右击解决方案点击properties Window Ctrl+W ,P

将Mnaged Pipeline Mode 从Integrated更改为Classic

 二、提示錯誤

解决方法:

重启SQL Server (MSSQLSERVER) 与SQL Server Agent(MSSQLSERVER)服务。

三、提示錯誤

1.当前使用者无法被加载出来

2.CS报错IS认证失败

 

3.提出警示Align过时

 

解决方法:

点选总文件方案,将Anonymous Authentication设为Disabled

                             将WindowsAuthentication设为Enabled

四、提示錯誤

C#出现System.TypeInitiaLizationException类型初始值设定项引发异常

描述:提示在DAL.SQLHepler出现该异常。

解决:1.connectionString写在AppConfig里面,但是在引用的时候写错name。注意ConnectionStrings["xxxx"]內容的不同。

   2.如果connectionString中无,将要新增。

AppConfig是: 
   <connectionStrings>
   <add name= "connString" connectionString= "Server=.;DataBase=SMDB;uid=sa;pwd=********"/>
   </connectionStrings>

引用的时候:

private static readonly string connString=ConfigurationManager.ConnectionStrings["connectionString"] .ToString();

--私有的 静态的

正确应该是:

private static readonly string connString = ConfigurationManager.ConnectionStrings[ "connString" ].ToString();

五、提示錯誤

Severity Code Description Project File Line Suppression State
Message  Validation (XHTML 1.0 Transitional): Attribute 'width' is considered outdated. A newer construct is recommended. GSMana D:workvsweb4GSManaModulesDoorSQueryDevAuthMainByG.aspx 57 

翻译:多码描述项目文件线抑制状态信息验证(XHTML1.0 Transitional):属性“width”被认为已过时。建议使用较新的结构

解决办法:

 <td width="49%"> 改为 <td style="49px">

六、提示錯誤

Severity Code Description Project File Line Suppression State
Message  Validation (ASP.Net): Attribute 'onmouseover' is not a valid attribute of element 'Button'. 

翻译:多码描述项目文件线抑制状态,消息验证(ASP.NET属性不是元素按钮的有效属性)

 <asp:Button ID="btnCloseShowDevGrpDev" onmouseover="this.className='btn_mouseover'"
                        onmouseout="this.className='btn_mouseout'" CssClass="btn_mouseout" runat="server"
                        Text="關閉" OnClick="btnCloseShowDevGrpDev_Click"></asp:Button>

七、提示错误  描述未将对象引用设置到对象实例 

解决办法:在<configuration> 下添加<add key="QueryRecMaxDay" value="31"/>

 八、按钮控件在电脑端可使用,Ipad端不可

解决办法:button放置table标签下

原文地址:https://www.cnblogs.com/ximi07/p/10857403.html