Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Fix installer host:port parsing and blank admin under Visual Studio (#856)

Krzysztof Pajak6aae605daf62
diff --git a/src/Modules/Grand.Module.Installer/Controllers/InstallController.cs b/src/Modules/Grand.Module.Installer/Controllers/InstallController.cs
index b06dc9c8b..426181562 100644
--- a/src/Modules/Grand.Module.Installer/Controllers/InstallController.cs
+++ b/src/Modules/Grand.Module.Installer/Controllers/InstallController.cs
@@ -139,12 +139,16 @@ public class InstallController : Controller
if (string.IsNullOrEmpty(model.MongoDBDatabaseName))
ModelState.AddModelError("",
locService.GetResource(model.SelectedLanguage, "DatabaseNameRequired"));
- if (string.IsNullOrEmpty(model.MongoDBServerName))
+ if (string.IsNullOrEmpty(model.MongoDBServerName) ||
+ !MongoServerAddress.TryParse(model.MongoDBServerName.Trim(), out var serverAddress))
+ {
ModelState.AddModelError("",
locService.GetResource(model.SelectedLanguage, "MongoDBServerNameRequired"));
+ return connectionString;
+ }
var builder = new MongoUrlBuilder {
- Server = new MongoServerAddress(model.MongoDBServerName),
+ Server = serverAddress,
Username = model.MongoDBUsername,
Password = model.MongoDBPassword,
DatabaseName = model.MongoDBDatabaseName
diff --git a/src/Web/Grand.Web/Properties/launchSettings.json b/src/Web/Grand.Web/Properties/launchSettings.json
index 53e1ffea3..87d91cfb9 100644
--- a/src/Web/Grand.Web/Properties/launchSettings.json
+++ b/src/Web/Grand.Web/Properties/launchSettings.json
@@ -1,4 +1,4 @@
-{
+mo{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
@@ -12,7 +12,8 @@
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "Performance__UseResponseCompression": "false"
}
},
"Kestrel": {
@@ -20,7 +21,8 @@
"launchBrowser": true,
"launchUrl": "https://localhost:5001",
"environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "Performance__UseResponseCompression": "false"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
},