支付宝
微信
扫描二维码打赏
更多详情(暂无)

.net错误集合

问题:

HTTP 错误 500.0 - Internal Server Error

调用 LoadLibraryEx 失败,在 ISAPI 筛选器 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll" 上

解决方案:

 

问题:

数据库的事务日志已满。若要查明无法重用日志中的空间的原因,请参阅sys.databases中的log_reuse_wait_desc列

 

 

 

 

 解决办法

园子脸面的这篇文章很详细    数据库 'MessageManage' 的事务日志已满。若要查明无法重用日志中的空间的原因,请参阅 sys.databases 中的 log_reuse_wait_desc 列。

 

问题:

传入的表格格式数据流(TDS)远程过程调用(RPC)协议流不正确。此 RPC 请求中提供了过多的参数。最多应为 2100

 
这边是因为传入的参数个数大于2100,这边会报错,修改成SQL的语句就不会报错

 

 

问题:

数据库问题
在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接) (Microsoft SQL Server,错误: 53)

有关帮助信息,请单击: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476

解决方案:https://jingyan.baidu.com/article/aa6a2c14f5171f0d4d19c45f.html,若果实在不行的话只能打开安装SQL的程序进行修复之后,在查看问题

 

 

请求被中止: 未能创建 SSL/TLS 安全通道

这个问题一般是因为接口加了SSL证书导致的,我们需要给我们的请求加上指定 Schannel 安全包支持的安全协议,

枚举

/// <summary>指定 Schannel 安全包支持的安全协议。</summary>
[System.Flags]
public enum SecurityProtocolType
{
/// <summary>指定的系统默认安全协议所定义Schannel。</summary>
SystemDefault = 0,
/// <summary>指定安全套接字层 (SSL) 3.0 安全协议。</summary>
Ssl3 = 48,
/// <summary>指定传输层安全 (TLS) 1.0 安全协议。</summary>
Tls = 192,
/// <summary>指定传输层安全 (TLS) 1.1 安全协议。</summary>
Tls11 = 768,
/// <summary>指定传输层安全 (TLS) 1.2 安全协议。</summary>
Tls12 = 3072,
Tls13 = 12288,
}

 

老版本VS是不支持这些的,所以加入以下代码

    ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 | (SecurityProtocolType)768 | (SecurityProtocolType)3072;

 

 

错误 未能找到类型或命名空间名称 (是否缺少 using 指令或程序集引用?)

明明引用了,结果却提示未引用, 这时就有可能是两个程序集的目标框架类型不一致导致的(在程序集属性面板里改下目标框架即可)。

 

错误  在从服务器接收结果时发生传输级错误。 (provider: Shared Memory Provider, error: 0 - 句柄无效。)

方法1.
SQL Server 配置管理--SQL Server 网络配置--MSSQLSERVER 的协议--启用Named Pipes

2.连接字符串
<connectionStrings>
<add name="MainLink" connectionString="Data Source=.;Initial Catalog=Logo;Persist Security Info=True;User ID=sa;Password=123456;Integrated Security=True"/>
</connectionStrings>

错误  WEB网站访问不了,域名或者ip都不行的话,有时候有用有时候会访问不了

直接设置DNS服务器,重新修改DNS  如何设置DNS服务器

 

App_code里面的类无法引用

在App_code文件夹里面,选中文件=》属性=》内容改为编译

 

 

HttpRequest请求401错误  HTTP/1.0 401 Authorization Required

 设置header的授权属性,如:

request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(new ASCIIEncoding().GetBytes("ed39763f-d707-42bd-a7a1-a1d33d8288fc:zDAv3WVSLxV8Q")));

 

HttpRequest请求406错误

 设置ContentType ,Accept 属性,如:

request.ContentType = "application/json";
request.Accept = "*/*";
注意设置Request的这两个属性

 

 

SqlServer2008R2还原数据库失败,因为结果数据库的累积大小超出10240MB许可限制值

解决方案:
直接将epress版本升级到专业版就好

配置中心---》sql安装中心---》维护---》版本升级,选在开发版就好(没有开发版Developer的话百度一下输入开发板的序列号),然后一直下一步就好

然后查看版本号 SELECT @@VERSION是否是你需要的版本号即可

 

VS2017闪退

解决方案:

1、打开C:\Windows\Microsoft.NET.目录,在该目录下搜索所有"machine.config"文件。
根据系统不同,搜索出来的machine.config文件的数量也不同。一般会出现4个,分别在下面四个目录下

C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config

2、再将目录下的四个machine.config.default更名为machine.config。
重新运行Visual Studio的安装程序,闪退问题消失,就能正常安装了。

3、若更改后缀名出现无权限提示,可以右击文件打开属性,选择“安全”选修卡里的“高级”选项。

 

 

VS2017网站提示无法连接到已配置的开发web服务器的解决方法

1、更改属性-》生成-》目标框架,修改到4.5以上版本即可

2、版本都是对的话,可以尝试关闭防火墙试试

 

 

此上下文中不允许异步操作。启动异步操作的页必须将 Async 特性设置为 true,并且异步操作只能在 PreRenderComplete 事件之前的页上启动。

在<@Page>标签下面设置Async为true

 

 

错误消息  无法识别的配置节 system.serviceModel 解决方案

源文件 : C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Config

/machine.config 行 : 137

版本信息 : Microsoft .NET Framework 版本 :4.0.50727.3053; ASP.NET 版本 :4.0.50727.3053

 

出现这个错误可能是机器重启的时候,配置文件中.NETFRAMEWORK3.0部分的控制运行配置并没有加进去,所以造成配置文件出错,这时只需要添加配置就可以了

把它加载configSections之间就可以了

<sectionGroup name="system.serviceModel" type="System.ServiceModel.Configuration.ServiceModelSectionGroup, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="behaviors" type="System.ServiceModel.Configuration.BehaviorsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="bindings" type="System.ServiceModel.Configuration.BindingsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="client" type="System.ServiceModel.Configuration.ClientSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="comContracts" type="System.ServiceModel.Configuration.ComContractsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="commonBehaviors" type="System.ServiceModel.Configuration.CommonBehaviorsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
<section name="diagnostics" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="machineSettings" type="System.ServiceModel.Configuration.MachineSettingsSection, SMDiagnostics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
<section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</sectionGroup>
<sectionGroup name="system.serviceModel.activation" type="System.ServiceModel.Activation.Configuration.ServiceModelActivationSectionGroup, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="diagnostics" type="System.ServiceModel.Activation.Configuration.DiagnosticSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="net.pipe" type="System.ServiceModel.Activation.Configuration.NetPipeSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="net.tcp" type="System.ServiceModel.Activation.Configuration.NetTcpSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</sectionGroup>

 

 

微信公众号10003错误

首先看url有没有UrlEncode加密,
之后看看域名授权是否正确
之后还要看IP是否白名单

 

 

注册DLL

注册DLL(都是需要以管理员身份运行CMD)
1、regsvr32 注册
regsvr32 [dll的文正路径]
如:regsvr32 C:\jmail.dll
(如果不成功,试试直接把要注册的DLL放到C:\windows\System32文件夹下面,直接运行命令regsvr32 ***.dll)

如果出现如下这个错误的时候:请选用第二种注册方法
---------------------------
RegSvr32
---------------------------
模块“Interop.jmail.dll”已加载,但找不到入口点 DllRegisterServer。

请确保“Interop.jmail.dll”为有效的 DLL 或 OCX 文件,然后重试。
---------------------------
确定
---------------------------


2、regasm 注册

cd c:\Windows\Microsoft.NET\Framework\v2.0.50727
进人该文件下,可以dir查看该文件下的所有文件目录
然后regasm [dll的完全路径即可]

posted @ 2020-10-22 11:02  华临天下  阅读(338)  评论(0编辑  收藏  举报