Base solution for your next web application

Activities of "hugol"

In the following guide: [https://aspnetzero.com/Documents/Developing-Step-By-Step-MPA#adding-a-new-page])

It's suggested to use the "Update-Database" method. For people using Multi Tenancy, multi databases (1 database per tenant), shouldn't we use the Migrator instead to apply the changes to all the tenant databases?

Thanks HugoL

Question

Hi,

I've created everything in my local environment without a problem and now I'm trying to replicate this scenario in a live environment using Winhost (despite the fact that this is just a test).

So the steps that I did till now are:

  1. Created the Databases and the users using the Winhost Cpanel
  2. Created the directory for the new Web app and the proper DNS
  3. Used the Migrator tool to create the Host DB
  4. Published the Web Project (My webconfig.release has the proper configurations)

Now so far so good, everything is working properly. I can log in to the host and update the settings (emails are being sent) etc.

The problem is I can't create a tenant. For example if I try to create a tenant with the following parameters I get an error:

Tenancy Name: SomeExample Tenant: SomeExample Ltd Use Host Database: No

Data Source=?? Now this is the first question/problem, WinHost connections strings are like this: "Data Source=tcp:[servernumber].winhost.com;Initial Catalog=DB_[customeraccountnumber][databasename];User ID=DB[customeraccountnumber]_[databasename]_user;Password=password;Integrated Security=False;"

1st Question:<ins>What should I type in the Data Source box?</ins>

2nd Question:<ins>When creating a tenant does ABP tries to create the tenant database and apply the migrations or do we need to run the Migrator for the tenants?</ins>

Thanks in advance for further help, HugoL

tcp:s12.winhost.com;Initial Catalog=DB_wpropterhlmt;User ID=DB_80397_user;Password=*****;Integrated Security=False;

Hi,

Quick suggestion: Shouldn't the field [Abp.Net.Mail.Smtp.Password] at AbpSettings table be Hashed?

Should I post this kind of suggestion here or on Github?

Thanks HugoL

Yes I did. This isn't related with the ABP, it's an outlook.com "feature".

When you send an email from an outllok.com Alias it seems that it uses your Main Profile Name (even if you specify by code a Display Name), which in my humble opinion, defeats the purpose of having an alias.

Anyway, this is sorted.

Thank you very much once more for your help. 5* support. Keep up the good work.

Hello,

When using the feature to send the "Test" Email in the Host (i.e. <a class="postlink" href="http://localhost:6240/Mpa/HostSettings">http://localhost:6240/Mpa/HostSettings</a>), I've noticed that the email is sent but the "Display Name" and "Send from email" are being ignored.

This code is stored at HostSettingsAppService.cs and the method is:

    public async Task SendTestEmail(SendTestEmailInput input)
    {
        await _emailSender.SendAsync(
            input.EmailAddress,
            L("TestEmail_Subject"),
            L("TestEmail_Body")
        );
    }

The variable "_emailSender" is defined in the ABP dlls (IEmailSender).

When the email arrives at my inbox the Display name and the "from" email is being ignored.

I don't know if the problem is related to the ABP framework or the fact that I'm using Outlook.com Alias. I think the latter is the problem but I'm not sure.

Anyone around that have experienced a similar situation or know how to sort this situation?

Any help would be most welcomed. Thanks.

<cite>moustafa: </cite> Actually i have the same problem with the same host provider winhost did you fix it ?

I think this is related to the fact that you probably have MVC site deployed to your main domain and you are trying to deploy a another MVC site to a subdomain. Or even if it's your main site.

If you add the following entry to the web.config you will be able to run the site (main domain or sub domain) <system.web> <trust level="Full"/>

You can play with "High" and "Medium" and see if you can sort out the problem.

Usually when you host it on a provider it's the other way around. I mean, they only allow "High" or "Medium" as the maximum security level.

I will run some other tests today and I will post the results here for future reference.

Thanks,

Hi there,

When I run or deploy/publish my website to my local servers everything works fine but when I publish the site to my Winhost account I get the following problem: Server Error in '/Test_PlaygroundPrj' Application. Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

In order to sort this I have to add the following entry to the web.config

<system.web>
    <trust level="Full"/>

Note: Any level below (High, Medium...) will throw the same error.

From MSDN: "FULL" Specifies unrestricted permissions. Grants the ASP.NET application permissions to access any resource that is subject to operating system security. All privileged operations are supported. [https://msdn.microsoft.com/en-us/library/tkscy493%28v=vs.85%29.aspx])

Any ideas? comments? feedback? Is this the correct approach to sort the problem. I can give you access to the server if you would like since this is just a playground account and project for testing purposes.

========== Full LOG ========== Server Error in '/Test_PlaygroundPrj' Application.

Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.TypeLoadException: Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

Source Error: [No relevant source lines]

Source File: f:\tempdir\v4.0.30319\test_playgroundprj\a65af6ea\76786a49\App_global.asax.k0nvxyo6.0.cs Line: 0

Stack Trace: [TypeLoadException: Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.] Castle.Windsor.WindsorContainer..ctor() +0 Abp.Dependency.IocManager..ctor() +44 Abp.Dependency.IocManager..cctor() +30

[TypeInitializationException: The type initializer for 'Abp.Dependency.IocManager' threw an exception.] Mood2Success.Test_PlaygroundPrj.Web.MvcApplication..ctor() +53 ASP.global_asax..ctor() in f:\tempdir\v4.0.30319\test_playgroundprj\a65af6ea\76786a49\App_global.asax.k0nvxyo6.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +113 System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +206 System.Activator.CreateInstance(Type type, Boolean nonPublic) +83 System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1065 System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +124 System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +20 System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +263 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9946024 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +90 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261

Answer

One last question that I made before,

Is it possible to have the horizontal scrollbar to be always on?

For example in this image there is no horizontal bar at the bottom and therefore the users don't realise that they can scroll to the right. [attachment=1:2gypcolo]grid.png[/attachment:2gypcolo]

the bar is only displayed when they are already scrolling, example: [attachment=0:2gypcolo]grid with bar while scrolling.png[/attachment:2gypcolo]

Would be nice if the bar could be always on.

Thank you

  1. Thank you for the fix

  2. You were right about the browser cache :)

  3. And thanks for the link to the topics. That's exactly what I was talking about. I will read them and do some testing in order to also create a "instructions manual" for the developers.

Showing 11 to 20 of 29 entries