Asp.net mvc 如何将Azure存储用于elmah日志而不是SQL Server数据库中的elmah日志
目前在我的项目中,我正在SQL Server的一个单独的表中使用Asp.net mvc 如何将Azure存储用于elmah日志而不是SQL Server数据库中的elmah日志,asp.net-mvc,azure-storage,elmah.mvc,Asp.net Mvc,Azure Storage,Elmah.mvc,目前在我的项目中,我正在SQL Server的一个单独的表中使用elmah记录异常。是否可以仅将这些elmah异常存储在Azure存储中,而不存储在SQL Server中?因为我不想在数据库中记录错误 //web.config <elmah> <security allowRemoteAccess="1" /> <errorLog type="Elmah.SqlErrorLog, Elmah" connecti
elmah
记录异常。是否可以仅将这些elmah异常存储在Azure存储中,而不存储在SQL Server中?因为我不想在数据库中记录错误
//web.config
<elmah>
<security allowRemoteAccess="1" />
<errorLog type="Elmah.SqlErrorLog, Elmah"
connectionStringName="DatabaseConnectionStringName" />
</elmah>
//web.config
目前在我的web.config
中,我在SQL Server中配置了elmah日志
将allowRemoteAccess设置为1,并将错误日志类型添加为Elmah.SqlErrorLog
。可以
有人帮忙吗
提前感谢。我们可以将elmah异常存储在Azure表存储中 我们需要使用这个包:
Elmah.AzureTableStorage
我们可以通过VS软件包管理器安装它:安装软件包Elmah.AzureTableStorage-Version 1.0.0
在web.config中,我们可以设置如下:
<errorLog type="Elmah.AzureTableStorage.AzureTableStorageErrorLog, Elmah.AzureTableStorage"
connectionStringName="ElmahAzureTableStorage" />
我已经测试了我的登录表存储的屏幕截图,供您参考:
更多信息供您参考: