Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "ioannes"

After upgrade everything works, probably some old refrence caused this issue.

Question

Hi,

I am implamanting SignalR Hub. I am injecting IAbpSession as you described in documentation. Problem is that its not injected, only nullinstance is retrieved. On the other hand Logger works as expected. I am using abp version 0.8.4.

public class PrintDigitalHub : Hub, ITransientDependency
    {
        public ILogger Logger { get; set; }

        public IAbpSession AbpSession { get; set; }

        private readonly IOnlineClientManager _onlineClientManager;

        public PrintDigitalHub(IOnlineClientManager onlineClientManager, IIocResolver iocResolver)
        {
            _onlineClientManager = onlineClientManager;
            Logger = NullLogger.Instance;
            AbpSession = NullAbpSession.Instance;
        }

        public async override Task OnConnected()
        {
            await base.OnConnected();

            var client = new OnlineClient(
                Context.ConnectionId,
                GetIpAddressOfClient(),
                AbpSession.TenantId,
                AbpSession.UserId
                );

            Logger.Debug("A client is connected: " + client);

            _onlineClientManager.Add(client);
        }

Thanks for your help.

Question

Hi Halil,

What is the best way of deserializing String returned from SettingManager in ApplicationService.

I have a multidimensional setting just like this "[[1, 2],[3, 4,],[5, 6],[7, 8]]"

Currently I am using NewtonsoftJson.

var z = JsonConvert.DeserializeObject<Double[][]>(await SettingManager.GetSettingValueAsync("MaxDigitalSheetCounts"));

Is it possible to extend SettingManager to return Array from String?

Thank you Ivan

Thanks for advice! I will use your workaround.

Hello,

In my ApplicationService I need to deserialize list of objects send from client to concrete classes which inherits abstract class Module.

public ModulesDto
{
public List<Module> {...}
}

public abstract class Module
{...}

public class Module1: Module
{...}

public class Module2: Module
{...}

but I got null.

Is there a way to do it? I found interesting article, and even more interesting comment bellow, how to implement it.

var settings = new JsonSerializerSettings {TypeNameHandling = TypeNameHandling.Auto};

<a class="postlink" href="http://www.tomdupont.net/2014/04/deserialize-abstract-classes-with.html">http://www.tomdupont.net/2014/04/deseri ... -with.html</a>

Thanks. :)

Answer

Thanks @Otgontugs Miimaa I understand it better now. I had to make a mistake, cause when I published "SampleProject1.Web", other modules didn't publish along with it. I'll try it again and write what was the problem.

Answer

I couldn't find answer on google, so If someone knows how can I use Web Deploy on Visual Studio, to Deploy entire Solution, not just Web Project? thanks

Showing 1 to 7 of 7 entries