Base solution for your next web application

Activities of "wingers"

perfect thanks

one final question relating to the login page. How do I change the background image?

I assume I could replace login.png and login-dark.png in *.Web.Mvc\wwwroot\metronic\assets\media\svg\illustrations

But also assumed I could edit path in *.Web.Mvc\Views\TenantRegistration_Layout.cshtml, but this method doesn't work?

Perfect, thank you very much

Okay thanks, rearrange my code and now have it working.

One final question - when logging out how can I have it redirect back to my startup page rather than going back to /Account/Login

Thank you for your response.

So I have added my new page and its controller as documented in previous reply - called Startup.

I have now edited the correct HomeController.cs as below, but when running I get error as below about not being logged on, but the whole point is I don't want to have to be logged on to see this first page

using System.Threading.Tasks;
using Abp.Runtime.Session;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using PCADemo.Identity;
using PCADemo.Web.Controllers;

namespace PCADemo.Web.Controllers
{
    public class HomeController : PCADemoControllerBase
    {
        private readonly SignInManager _signInManager;

        public HomeController(SignInManager signInManager)
        {
            _signInManager = signInManager;
        }

        public async Task<IActionResult> Index(string redirect = "", bool forceNewRegistration = false)
        {
            if (forceNewRegistration)
            {
                await _signInManager.SignOutAsync();
            }

            if (redirect == "TenantRegistration")
            {
                return RedirectToAction("SelectEdition", "TenantRegistration");
            }

            return AbpSession.UserId.HasValue ?
                RedirectToAction("Index", "Home", new { area = "App" }) :
                RedirectToAction("Index", "Startup", new { area = "App" }); // You can specify it on the application opening page
        }

        public IActionResult WelcomePage()
        {
            return View();
        }


    }
}



Thanks for reply.

My project is MVC.

I created a new controller (.Web.Mvc\Areas\App\Controllers\StartupController.cs) and a new page (.Web.Mvc\Areas\App\Views\Startup\Index.cshtml), but can't see to work out how to change the HomeController to load that new page first correctly as currently HomeController has [AbpMvcAuthorize] and code to check various criteria as to what page to load, even removing the [AbpMvcAuthorize] and setting it to just my page didn't work for me as initially got error. Comments please?

Hi

New to ASP.NET Zero so apologies if a basic / stupid question.

Currently when I run project it goes to the login page (if use not already logged in), I instead want it to go to a "welcome" page which shows information about my site and where I would then have a login button for users to login and go to the main site using the Zero layout etc.

So main page wouldn't have sidebar or anything it would just have custom Bootstrap CSS to show logo, site information and a login button etc.

I know there is a .Web.Public project, but a) this is outdated and b) I was hoping to do it in a simpler way than having a separate public project just for one initial page.

Hope this make senes, if not please ask what needs to be clarified.

Thank you all

Showing 1 to 7 of 7 entries