Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Connection string is not recognized when publishing to Microsoft Azure

$
0
0

I've got the following appsetings.json file:

{"ConnectionStrings": {"DefaultConnection": "Server=JUNGLE\\SQL2014DEV;Database=Bonus;Trusted_Connection=True;MultipleActiveResultSets=true","BonusContext": "Server=JUNGLE\\SQL2014DEV;Database=Bonus;Trusted_Connection=True;MultipleActiveResultSets=true"
  },"Logging": {"IncludeScopes": false,"LogLevel": {"Default": "Debug","System": "Information","Microsoft": "Information"
    }
  }
}

However, an error occurs:

Error An error occurred during publish.

An error occurred while generating the publish appsettings file. System.ArgumentException: Unrecognized escape sequence. (40): {
"BonusContext" : "Server=JUNGLE\SQL2014DEV;Database=Bonus;Trusted_Connection=True;MultipleActiveResultSets=true"
}
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.AppendCharToBuilder(Nullable`1 c, StringBuilder sb)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeString()
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)
at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
at Microsoft.PowerShell.Commands.JsonObject.ConvertFromJson(String input, ErrorRecord& error)
at Microsoft.PowerShell.Commands.ConvertFromJsonCommand.ConvertFromJsonHelper(String input)
at Microsoft.PowerShell.Commands.ConvertFromJsonCommand.EndProcessing()
at System.Management.Automation.Cmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete() System.Object[] BonusApp 0


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>