Apologies in advance for the wall of text below, but I wanted to be sure to include anything in the log that might be useful....
I have an ASP.Net MVC application whose primary interface is a single-page application using SignalR. We are having occasional problems with things suddenly "not working" for users--the underlying reason is that they are no longer authenticated. I have an MVC request every minute to keep the session alive, and SignalR also has its own keep-alive every 5 minutes. It doesn't seem to be related to a specific time interval, because most of the time, users have the application open all day without problems. I have included an annotated sample of the IIS log on the web server below. The authentication token and session values have been shortened for readability. Notice that the authentication token is renewed several times without any problem. Then, all of the sudden, the browser no longer sends the authentication token.
+------------+----------+-----------+------------------------------+-------------+-------------------------------------+-----------+------------------------------------------------------------------------------------------------+
| date | time | cs-method | cs-uri-stem | cs-username | cs(Cookie) | sc-status | comment |
+------------+----------+-----------+------------------------------+-------------+-------------------------------------+-----------+------------------------------------------------------------------------------------------------+
| 2015-11-04 | 10:54:30 | GET | / | - | - | 302 | user requesting page for the first time; redirect to login page |
| 2015-11-04 | 10:54:30 | GET | /Account/Login | - | - | 200 | login page GET |
| 2015-11-04 | 10:54:46 | POST | /Account/Login | - | | 302 | login page POST; authenticate and redirect to content page |
| 2015-11-04 | 10:54:46 | GET | / | user123 | .VWRID=AAAA | 302 | content page GET; user is logged in |
| 2015-11-04 | 10:54:46 | GET | /Account/SelectConfiguration | user123 | .VWRID=AAAA | 200 | user doing stuff; no problem |
| 2015-11-04 | … | … | … | user123 | .VWRID=AAAA;+ASP.NET_SessionId=ses1 | 200 | user doing stuff; no problem |
| 2015-11-04 | 10:54:50 | GET | /signalr/negotiate | user123 | .VWRID=AAAA;+ASP.NET_SessionId=ses1 | 200 | SignalR connection |
| 2015-11-04 | 10:54:50 | GET | /signalr/start | user123 | .VWRID=AAAA;+ASP.NET_SessionId=ses1 | 200 | |
| 2015-11-04 | 10:54:50 | POST | /signalr/send | user123 | .VWRID=AAAA;+ASP.NET_SessionId=ses1 | 200 | |
| 2015-11-04 | 10:55:50 | POST | /Home/CheckVersion | user123 | .VWRID=AAAA;+ASP.NET_SessionId=ses1 | 200 | keepalive for ASP.Net session; once/min |
| 2015-11-04 | … | … | … | user123 | .VWRID=AAAA;+ASP.NET_SessionId=ses1 | 200 | user doing stuff; no problem |
| 2015-11-04 | 10:59:50 | GET | /signalr/ping | user123 | .VWRID=AAAA;+ASP.NET_SessionId=ses1 | 200 | SignalR keepalive; once/5 min |
| 2015-11-04 | 11:00:50 | … | … | user123 | .VWRID=AAAA;+ASP.NET_SessionId=ses1 | 200 | |
| 2015-11-04 | 11:08:50 | POST | /Home/CheckVersion | user123 | .VWRID=AAAA;+ASP.NET_SessionId=ses1 | 200 | |
| 2015-11-04 | 11:09:50 | POST | /Home/CheckVersion | user123 | .VWRID=AAAA;+ASP.NET_SessionId=ses1 | 200 | renewed ASP.net token sent to client (?) |
| 2015-11-04 | 11:09:50 | GET | /signalr/ping | user123 | .VWRID=BBBB;+ASP.NET_SessionId=ses1 | 200 | new ASP.net token sent to server |
| 2015-11-04 | 11:10:50 | POST | /Home/CheckVersion | user123 | .VWRID=BBBB;+ASP.NET_SessionId=ses1 | 200 | |
| 2015-11-04 | 11:11:50 | POST | /Home/CheckVersion | user123 | .VWRID=BBBB;+ASP.NET_SessionId=ses1 | 200 | |
| 2015-11-04 | … | … | … | user123 | .VWRID=BBBB;+ASP.NET_SessionId=ses1 | 200 | user doing stuff; no problem |
| 2015-11-04 | 11:24:32 | POST | /signalr/send | user123 | .VWRID=BBBB;+ASP.NET_SessionId=ses1 | 200 | |
| 2015-11-04 | 11:24:50 | POST | /Home/CheckVersion | user123 | .VWRID=BBBB;+ASP.NET_SessionId=ses1 | 200 | renewed ASP.net token sent to client (?) |
| 2015-11-04 | 11:24:50 | GET | /signalr/ping | user123 | .VWRID=CCCC;+ASP.NET_SessionId=ses1 | 200 | new ASP.net token sent to server |
| 2015-11-04 | 11:25:50 | POST | /Home/CheckVersion | user123 | .VWRID=CCCC;+ASP.NET_SessionId=ses1 | 200 | |
| 2015-11-04 | … | … | … | user123 | .VWRID=CCCC;+ASP.NET_SessionId=ses1 | 200 | user doing stuff; no problem |
| 2015-11-04 | … | … | … | user123 | .VWRID=CCCC;+ASP.NET_SessionId=ses1 | 200 | same pattern continues, until… |
| 2015-11-04 | 11:58:50 | POST | /Home/CheckVersion | user123 | .VWRID=EEEE;+ASP.NET_SessionId=ses1 | 200 | |
| 2015-11-04 | 11:59:50 | POST | /Home/CheckVersion | user123 | .VWRID=EEEE;+ASP.NET_SessionId=ses1 | 200 | |
| 2015-11-04 | 11:59:50 | GET | /signalr/ping | user123 | .VWRID=EEEE;+ASP.NET_SessionId=ses1 | 200 | |
| 2015-11-04 | 12:00:50 | POST | /Home/CheckVersion | - | - | 302 | NO AUTHENTICATION COOKIE! |
| 2015-11-04 | 12:00:50 | GET | /Account/Login | - | - | 200 | JSON request "redirected" but user never notified |
| 2015-11-04 | 12:01:50 | POST | /Home/CheckVersion | - | | 302 | |
| 2015-11-04 | 12:01:50 | GET | /Account/Login | - | | 200 | |
| 2015-11-04 | … | POST | /Home/CheckVersion | - | | 302 | same pattern… |
| 2015-11-04 | … | GET | /Account/Login | - | | 200 | |
| 2015-11-04 | 12:04:49 | GET | /signalr/ping | - | | 200 | signalr keepalive returns HTTP 200 (?)… |
| 2015-11-04 | 12:05:50 | POST | /Home/CheckVersion | - | | 302 | |
| 2015-11-04 | 12:05:50 | GET | /Account/Login | - | | 200 | |
| 2015-11-04 | … | POST | /Home/CheckVersion | - | | 302 | |
| 2015-11-04 | … | GET | /Account/Login | - | | 200 | |
| 2015-11-04 | 12:16:43 | POST | /signalr/send | - | | 403 | … but signalr requests fail because they need to be authenticated |
| 2015-11-04 | … | POST | /signalr/send | - | | 403 | |
| 2015-11-04 | 12:43:23 | POST | /signalr/abort | - | | 403 | at some point signalr aborts |
| 2015-11-04 | 12:43:23 | GET | /signalr/connect | user123 | .VWRID=AAAA;+ASP.NET_SessionId=ses1 | 200 | and reconnects with the ORIGINAL authentication token (?) |
| 2015-11-04 | 12:43:23 | GET | / | - | | 302 | User realizes there is a problem and refreshed the page, forcing the login process to initiate |
| 2015-11-04 | 12:43:23 | GET | /Account/Login | - | | 200 | |
| 2015-11-04 | 12:43:35 | POST | /Account/Login | - | | 302 | |
| 2015-11-04 | 12:43:35 | GET | / | user123 | .VWRID=FFFF | 302 | and we're good again… |
| 2015-11-04 | 12:43:36 | GET | /Account/SelectConfiguration | user123 | .VWRID=FFFF | 200 | |
| 2015-11-04 | … | … | … | user123 | .VWRID=FFFF;+ASP.NET_SessionId=ses2 | 200 | |
| 2015-11-04 | 15:43:02 | POST | /Home/CheckVersion | user123 | .VWRID=GGGG;+ASP.NET_SessionId=ses2 | 200 | still going strong nearly 2 hours later. |
+------------+----------+-----------+------------------------------+-------------+-------------------------------------+-----------+------------------------------------------------------------------------------------------------+
The relevant part of the web.config:
<system.web>
<authentication mode="Forms">
<forms name=".VWRID" loginUrl="~/Account/Login" timeout="30" slidingExpiration="true" protection="All" requireSSL="true" />
</authentication>
</system.web>
Does anyone have any ideas what might be going on here and how to resolve?
[UPDATE]
In looking at the logs, this only seems to be impacting users on IE 10. The SignalR transport mechanism being used there is foreverFrame. I am wondering if this is a SignalR bug with that transport. I am going to downgrade those client to use long polling and see if the problem goes away.
We removed the foreverFrame option for the SignalR transport and the problem went away. Seems to be a bug in SignalR.
Related
I have two seperate tables, one consists of records and other which is master table of Group combinations.
Records table:
| Mobile | DC | Dept
+--------+----+------
| 123456 | 01 | car
| 098765 | 05 | home
| 123456 | 02 | taxi
| 098765 | 00 | rent
Group Master:
| Dept | Group-Dept
+------+-----------
| car | Vehicle
| taxi | Vehicle
| home | house
| rent | house
Expected output:
| Mobile | DC | Dept | DC-Count | DC-Group
+--------+----+------+----------+----------
| 123456 | 01 | car | 3 | Vehicle
| 098765 | 05 | home | 5 | house
| 123456 | 02 | taxi | 3 | Vehicle
| 098765 | 00 | rent | 5 | house
Please help.
I have one Google Sheet that contains ID-values, together with corresponding Names and Attack power. In another sheet, I want to combine Names and Attack power in the same cell using the ID as a reference - separated with row breaks.
Sheet1
Sheet1 looks like this:
| GROUP ID | NAME | ATTACK POWER |
|---------:|:----------|--------------:|
| 101 | guile | 333 |
|----------|-----------|---------------|
| 101 | blanka | 50 |
|----------|-----------|---------------|
| 101 | sagat | 500 |
|----------|-----------|---------------|
| 207 | ruy | 450 |
|----------|-----------|---------------|
| 207 | vega | 150 |
Sheet2
Right now, I have created the following ArrayFormula that sort of does what I want.
In NAME-column:
=ArrayFormula(TEXTJOIN(CHAR(10);1;REPT(Sheet1!B:C;1*(Sheet1!A:A=A2))))
Which returns the following result:
| GROUP ID | NAME |
|---------:|:--------------------------|
| 101 | guile |
| | 333 |
| | blanka |
| | 50 |
| | sagat |
| | 500 |
|----------|---------------------------|
| 101 | ruy |
| | 450 |
| | vega |
| | 150 |
|----------|---------------------------|
The problem is that I can't figure out how to get Name and Attack Power on the same line.
Tried combining with CONCATENATE: =CONCATENATE(ArrayFormula(TEXTJOIN(CHAR(10);1;REPT(Sheet1!B:B;1*(Sheet1!A:A=A2))));" (";ArrayFormula(TEXTJOIN(CHAR(10);1;REPT(Sheet1!C:C;1*(Sheet1!A:A=A2))));")") - but it's not quite right:
| GROUP ID | NAME |
|---------:|:--------------------------|
| 101 | guile |
| | blanka |
| | sagat (333 |
| | 50 |
| | 500) |
|----------|---------------------------|
| 101 | ruy |
| | vega (450 |
| | 150) |
|----------|---------------------------|
I would instead the sheet to look like this:
| GROUP ID | NAME |
|---------:|:--------------------------|
| 101 | guile (333) |
| | blanka (50) |
| | sagat (500) |
|----------|---------------------------|
| 101 | ruy (450) |
| | vega (150) |
|----------|---------------------------|
Is this possible?
=ARRAYFORMULA(TEXTJOIN(CHAR(10), 1,
REPT(Sheet1!B:B&" ("&Sheet1!C:C&")", 1*(Sheet1!A:A=A4))))
I am running freeradius from the same computer that I am running "radtest" from.
I can get get an "accept" message with user password coming from either "users" file or mysql , and can get client "secret" from clients.conf file, but can't figure out how to get freeradius to look at mysql for the client "secret".
Do I have to somehow disable or override the entry in "cients.conf"?
Here's a summary of file entries, mysql, and test results:
/etc/freeradius/3.0/clients.conf #client localhost with secret testing123
/etc/freeradius/3.0/users #testing Cleartext-Password := "testpwd"
/etc/freeradius/3.0/mods-available/sql #read_clients = yes (/etc/freeradius/3.0/sites- enabled/sql points here)
SELECT * FROM radgroupreply LIMIT 10;
| id | groupname | attribute | op | value |
| 1 | dynamic | Framed-Compression | := | Van-Jacobsen-TCP-IP |
| 2 | dynamic | Framed-Protocol | := | PPP |
| 3 | dynamic | Service-Type | := | Framed-User |
| 4 | dynamic | Framed-MTU | := | 1500 |
| 5 | 2048-1024 | Motorola-Canopy-ULBR | = | 1024 |
| 6 | 2048-1024 | Motorola-Canopy-ULBL | = | 500000 |
mysql> SELECT * FROM radusergroup LIMIT 10;
| username | groupname | priority |
| fredf | dnamic | 2 |
| 0a-00-3e-89-35-32 | 2048-1024 | 2 |
mysql> SELECT * FROM radcheck LIMIT 10;
| id | username | attribute | op | value |
| 3 | fredf | Cleartext-Password | := | wilma |
| 6 | 0a-00-3e-89-35-32 | Cleartext-Password | := | passwordsql |
mysql> SELECT * FROM radreply LIMIT 10;
| id | username | attribute | op | value |
| 1 | fredf | Motorola-Canopy-UserLevel | = | 3 |
| 2 | testuser | Motorola-Canopy-UserLevel | = | 3 |
mysql> SELECT * FROM nas LIMIT 10;
| id | nasname | shortname | type | ports | secret | server | community | description |
| 1 | 10.10.2.2 | Griz450NW | 1 | 1812 | naspass | localhost | ISReader | Griz450NW |
radtest testing testpwd 127.0.0.1 0 testing123 #works
Received Access-Accept Id 107 from 127.0.0.1:1812 to 0.0.0.0:0 length 20
radtest fredf wilma 127.0.0.1 0 testing123 #works
Received Access-Accept Id 242 from 127.0.0.1:1812 to 0.0.0.0:0 length 32
Motorola-WiMAX-Home-BTS = 0x00000003
radtest 0a-00-3e-89-35-32 passwordsql 127.0.0.1 0 testing123 #works
Received Access-Accept Id 27 from 127.0.0.1:1812 to 0.0.0.0:0 length 44
Motorola-Canopy-ULBR = 1024
Motorola-Canopy-ULBL = 500000
radtest 0a-00-3e-89-35-32 passwordsql 127.0.0.1 0 naspass #doesn't work
Radius -X output: Dropping packet without response because of error: Received packet from 127.0.0.1 with invalid Message-Authenticator! (Shared secret is incorrect.)
The NAS table entry worked once I changed the "nasname" to "127.0.0.1" and disabled the client in clients.conf (I just changed "ipaddr" from "127.0.0.1" to "127.0.0.2").
While meddling with an experimental Dreamfactory 2.1 installation, the user service was accidentally disabled through the admin console. The message when trying to log in is
Service user is deactivated
How to get around this problem? Is there a configuration file or something that I need to edit to get this back on? After a bit of probing I saw this in the table called "service" in MySQL db(bitnami_dreamfactory).
+-------------------------+-----------+
| name | is_active |
+-------------------------+-----------+
| system | 1 |
| api_docs | 1 |
| files | 0 |
| db | 0 |
| email | 0 |
| user | 0 |
| mysql | 0 |
| mongodb | 1 |
| scr-insert | 1 |
| testdb | 1 |
| test-mlabs | 1 |
+-------------------------+-----------+
Can I just go ahead an issue an update statement to set 0 to 1, for 'user' service?
Thanks,
M&M
Yes, and then clear the application cache using 'php artisan cache:clear'.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
grails stats gives various code statistics for a given Grails project.
Typical output can look like something along the lines of:
+----------------------+-------+-------+
| Name | Files | LOC |
+----------------------+-------+-------+
| Controllers | 4 | 183 |
| Domain Classes | 8 | 264 |
| Jobs | 1 | 10 |
| Services | 4 | 297 |
| Tag Libraries | 2 | 63 |
| Unit Tests | 17 | 204 |
+----------------------+-------+-------+
| Totals | 36 | 1021 |
+----------------------+-------+-------+
I'm curious about the typical division of code between the various artifacts in Grails projects (such as the ratio LOC(controllers) / LOC(services), etc.).
Please share the grails stats output of your largest Grails project to contribute your statistics to this question.
My current project:
+----------------------+-------+-------+
| Name | Files | LOC |
+----------------------+-------+-------+
| Controllers | 67 | 7665 |
| Domain Classes | 101 | 3736 |
| Jobs | 3 | 45 |
| Services | 61 | 6158 |
| Tag Libraries | 34 | 2357 |
| Groovy Helpers | 54 | 3356 |
| Java Helpers | 1 | 65 |
| Unit Tests | 227 | 24224 |
| Integration Tests | 70 | 10908 |
| Scripts | 2 | 77 |
+----------------------+-------+-------+
| Totals | 620 | 58591 |
+----------------------+-------+-------+
The large number in "Java Helpers" originates mostly from a wsdl2java stub generation.
+----------------------+-------+-------+
| Name | Files | LOC |
+----------------------+-------+-------+
| Controllers | 13 | 1085 |
| Domain Classes | 17 | 802 |
| Services | 19 | 1918 |
| Tag Libraries | 2 | 182 |
| Groovy Helpers | 39 | 1586 |
| Java Helpers | 521 | 42232 |
| Unit Tests | 45 | 5294 |
| Integration Tests | 9 | 836 |
| Scripts | 2 | 22 |
+----------------------+-------+-------+
| Totals | 667 | 53957 |
+----------------------+-------+-------+
+----------------------+-------+-------+
| Name | Files | LOC |
+----------------------+-------+-------+
| Controllers | 40 | 3912 |
| Domain Classes | 42 | 2109 |
| Jobs | 5 | 127 |
| Services | 18 | 2352 |
| Tag Libraries | 12 | 355 |
| Groovy Helpers | 158 | 5249 |
| Java Helpers | 4 | 207 |
| Unit Tests | 54 | 3258 |
| Integration Tests | 22 | 1790 |
| Scripts | 7 | 150 |
+----------------------+-------+-------+
| Totals | 362 | 19509 |
+----------------------+-------+-------+
A pity it doesn't have more stats like average/min/max LOC per class, test coverage, etc ;)
+----------------------+-------+-------+
| Name | Files | LOC |
+----------------------+-------+-------+
| Controllers | 17 | 1961 |
| Domain Classes | 14 | 843 |
| Jobs | 4 | 109 |
| Services | 5 | 831 |
| Tag Libraries | 2 | 789 |
| Groovy Helpers | 38 | 948 |
| Java Helpers | 5 | 445 |
| Unit Tests | 1 | 12 |
| Integration Tests | 1 | 33 |
| Scripts | 1 | 11 |
+----------------------+-------+-------+
| Totals | 88 | 5982 |
+----------------------+-------+-------+
Small app (about 25 stories)