在门户上设置Windows Azure Redis连接字符串(Set Windows Azure Redis connection string on the portal)
在redis helper方法中,我维护了2个Redis连接字符串。一个用于
local
,另一个用于Azure redis server
。每次我需要发布时,我必须手动更改它。我的应用程序是ASP。 net MVC(SPA)应用程序。问:那么在Azure门户上或在我发布时,是否有任何地方可以设置已发布的
Redis connection string
?public class RedisConnectorHelper { private static readonly Lazy<ConnectionMultiplexer> LazyConnection = new Lazy<ConnectionMultiplexer>(() => ConnectionMultiplexer.Connect("localhost,ConnectTimeout=10000"));//local host //private static readonly Lazy<ConnectionMultiplexer> LazyConnection = // new Lazy<ConnectionMultiplexer>(() => ConnectionMultiplexer.Connect("Myredis.redis.cache.windows.net:6380,password=mypassword,ssl=True,abortConnect=False"));//production }
更新:
我在
web.config.release
文件中设置了该文件,如下所示。<connectionStrings> <add name="Abp.Redis.Cache" connectionString="Myredis.redis.cache.windows.net:6380,password=mypassword=,ssl=True,abortConnect=False" /> </connectionStrings>
但似乎没有把它拿起来。 你能告诉我为什么吗?
On redis helper method where I have maintained 2 Redis connection strings.One is for the
local
and the other is for theAzure redis server
.Each and every time when I need to publish, I have to change it manually.My app is ASP.net MVC (SPA) app.Q : So is there any place to set published
Redis connection string
on the Azure portal or when I do the publish ?public class RedisConnectorHelper { private static readonly Lazy<ConnectionMultiplexer> LazyConnection = new Lazy<ConnectionMultiplexer>(() => ConnectionMultiplexer.Connect("localhost,ConnectTimeout=10000"));//local host //private static readonly Lazy<ConnectionMultiplexer> LazyConnection = // new Lazy<ConnectionMultiplexer>(() => ConnectionMultiplexer.Connect("Myredis.redis.cache.windows.net:6380,password=mypassword,ssl=True,abortConnect=False"));//production }
Update :
I have set that on the
web.config.release
file as shown below.<connectionStrings> <add name="Abp.Redis.Cache" connectionString="Myredis.redis.cache.windows.net:6380,password=mypassword=,ssl=True,abortConnect=False" /> </connectionStrings>
But it seems not picked it up. Could you tell me why ?
原文:https://stackoverflow.com/questions/37275265
最满意答案
好吧我明白了。 Beyond Compare实际上有可下载的插件,可让您在2个excel文件之间比较VBA。 :)
http://www.scootersoftware.com/support.php?zz=kb_moreformats_alt
Ok I figured it out. Beyond Compare actually has downloadable plug-ins to let you compare VBA between 2 excel files. :)
http://www.scootersoftware.com/support.php?zz=kb_moreformats_alt
相关问答
更多-
在调用过程中出现On Error Resume Next是最可能的原因。 如果被调用的过程引发错误,则执行将在调用过程的下一行继续执行。 An On Error Resume Next in the calling procedure is the most likely cause of this. If the called procedure raises an error, execution resumes at the next line of the calling procedure.
-
Excel中的visual basic(visual basic in Excel)[2023-05-19]
您对suffix1和suffix2的声明缺少DIM命令: Dim suffix1 As String Dim suffix2 As String 此外,在使用LEN测试Number_To_Words中的长度之前,您需要将单元格中的值转换为字符串。 尝试将测试更改为: Select Case Len(CStr(number)) 另外,检查后缀2中拼写为“syrian”的拼写。 编辑 您可以使用以下稍微更简洁的替代方案替换您的TheOnes功能: Function TheOnes(number As Int ... -
更改: Globals.Sheet1.VLookup(ComboBox1, Range("D1:D210"), 2, False) 要: Application.WorksheetFunction.VLookup(ComboBox1, Sheet1.Range("D1:D210"), 1, False) 说明: 您正在VBA中使用VB.NET对象模型。 你的vLookup范围只有1列,但你告诉它要查看1列中的第二列。 Change: Globals.Sheet1.VLookup(ComboBox1, Ran ...
-
在另一个工作簿的VBA代码中访问变量的一种方法是创建将这些值返回给您的函数。 然后从您的其他应用程序调用这些功能。 例如,让它成为Excel文件中带有宏的模块中的代码: Option Explicit Private strText As String ' Say you have a routine that manipulates strText (or not, even!) Public Sub doSomethingToSTRTEXT() strText = "Hello World! ...
-
当您打开excel文件时,VBA窗口未打开,因此您的用户无法看到您的代码,除非他们打开它。 所以我真的不明白你为什么会遇到这个问题。 无论如何,您可以运行此代码来关闭它: ThisWorkbook.VBProject.VBE.MainWindow.Visible = False 您可以在此处找到其他一些解决方案: http://www.mrexcel.com/forum/excel-questions/28529-close-visual-basic-editor-window.html 根据您的安全设置 ...
-
两个包含Visual Basic代码的Excel文件的代码比较(Code Compare for Two Excel Files that contain Visual Basic Code [closed])[2023-04-28]
好吧我明白了。 Beyond Compare实际上有可下载的插件,可让您在2个excel文件之间比较VBA。 :) http://www.scootersoftware.com/support.php?zz=kb_moreformats_alt Ok I figured it out. Beyond Compare actually has downloadable plug-ins to let you compare VBA between 2 excel files. :) http://www.sc ... -
为了允许UI线程在迭代代理时刷新并显示信息,您需要使用单独的线程来完成工作。 您可以使用.NET控件Backgroundworker来执行此操作。 使用此控件,您可以启动一个线程来完成这项工作,并且该线程可以使用Brackgroundworker的事件通知UI线程操作状态,然后UI线程可以相应地更新UI。 在这里,您可以找到一些如何使用backgroundworker的示例。 这个的基本样本可能是这样的: Imports System.ComponentModel Public Class Form1 ...
-
我假设您将2个值存储为字符串。 在这种情况下,您可以执行以下操作: Dim hex1 As String hex1 = "53FDBC" Dim hex2 As String hex2 = "00FFFF" Dim bin1 As String bin1 = CLng("&H" & hex1) Dim bin2 As String bin2 = CLng("&H" & hex2) Dim result As String result = Hex$(bin1 And bin2) 结果现在包含“FD ...
-
您可以将预期/实际的Excel工作表转换为文本格式,例如CSV吗? 如果是这样,您可以使用批准测试 。 这允许您将文本文件作为“预期”测试结果。 当测试失败时,它可以显示测试的实际结果,与预期结果区别开来。 截至审批测试的评论截图。 Thanks to Mangist for guidance on this. Ive written the following to compare two excel files: public bool compareFiles(string filePath1, st ...
-
尝试使用适用于当前Excel实例的此解决方案: On Error Resume Next Dim tmpWB As Workbook Set tmpWB = Workbooks("Acc_FR044_SAP.xls") On Error GoTo 0 If tmpWB Is Nothing Then WbOpen = False Else tmpWB .Close SaveChanges:=False End If Try with this solution which wor ...