« first day (3296 days earlier)      last day (1667 days later) » 

10:01 PM
Any suggestions with picking ua parser?
 
user10864482
to parse what?
 
user10864482
ua as in user-agent or is it a typo?
 
Yes
As user agent
I dont have tools to build fancy apps therefore I think this might be good solution to split frontend i 2 websites
Mobile / desktop
 
user10864482
@Raimonds you can check github.com/ua-parser/uap-csharp but personally I wouldn't rely on ua to make any decision
 
user10864482
as far as I know, these day mobile / desktop are pretty just a question of css
 
10:05 PM
Googling suggests lib that is basically list of regex strings, but no from examples it looks like it wont give me device type straight away just OS and actual name of device
This website has both mobile and desktop as 1 file
And html components are basically show hide by queries
And it is performance bottleneck at this point
I personally dont want to rely on ua
 
user10864482
@Raimonds oh I see
 
If not mobile then desktop
This would be my approach
And put result in session I guess since regex is expensive
 
user10864482
I found something that might be more appropriate; detectmobilebrowsers.com
 
user10864482
it's a bit nasty looking but here
 
user10864482
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Text.RegularExpressions" %>
<%
    string u = Request.ServerVariables["HTTP_USER_AGENT"];
    Regex b = new Regex(@"(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino", RegexOptions.IgnoreCase | RegexOptions.Multiline);
 
user10864482
10:12 PM
they even have a IIS solution, seem to be worth it
 
Worth looking into, in my case I will just serve different stylesheet or point it to different folder
From what I can see in F12 tools using chrome it takes "forever" to simply calculate how things look and by lighthouse report main thread is doing too much work.
Thanks for link
 
so annoying. sometimes i get this exception on my signalR server: pastebin.com/UTEGsucr the problem is that several tasks are running and they are doing different requests. because i don't see a stacktrace i'm completely lost :( what can i do to locate the issue?
 
user10864482
@qd0r if you don't mind pasting again in paste.ofcode.org . I can't access pastebin, that's why
 
okay :)
i mean it's obvious that the hub lost the connection. but to get closer to the source of the issue it would be helpful at least to know the method which caused the exception. i have everything try/catched but it's not going in the catch block. it's crazy :)
 
user10864482
10:30 PM
@qd0r event viewer might be a place to look, specifically under application
 
user10864482
event viewer can be found under control panel > administrative tool > event viewer
 
hmm the problem is that it's running on production and hard to reproduce it in debug. unfortunately i dont have a real testing environment for this service :(
basically it's only reproducable on the release build. when i run it local i don't see it. but of course then only me is requesting the service and not many users at the same time :o
 

« first day (3296 days earlier)      last day (1667 days later) »