Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 如何将Azure存储用于elmah日志而不是SQL Server数据库中的elmah日志_Asp.net Mvc_Azure Storage_Elmah.mvc - Fatal编程技术网

Asp.net mvc 如何将Azure存储用于elmah日志而不是SQL Server数据库中的elmah日志

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

目前在我的项目中,我正在SQL Server的一个单独的表中使用
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" />

我已经测试了我的登录表存储的屏幕截图,供您参考:

更多信息供您参考: