Thursday, December 9, 2021
Okta cors issue talking to okta api from okta-vue.js
Wednesday, May 5, 2021
Spn random crashes whilerunning, halts with no exception
spn runs and halts with an error but not an exception , current theory is rapid nhibernate updates in a loop, rewriting to ado updates appears to have fixed it.
Nhibernate was never designed for rapid bulk updating or inserting, so if you do it too often too fast it pukes and hard crashes the app (no exception)
Tuesday, March 2, 2021
Friday, February 26, 2021
Sometimes you just need to reboot a Windows desktop over RDP...
Sometimes you just need to reboot a Windows desktop over RDP...
RDP Tips
CTRL+ALT+PAUSE: Switches your Remote Desktop client between full-screen and windowed mode.
CTRL+ALT+BREAK: Force the Remote Desktop into full-screen mode.
CTRL+ALT+MINUS: Takes a screenshot of the active Remote Desktop window.
CTRL+ALT+PLUS: Takes a screenshot of the entire Remote Desktop.
CTRL+ALT+END: Reboots the remote computer.
Press CTRL+ALT+END, then click on the Power icon seen at bottom-right. These are the choices you may see, in Windows 10.I
have noticed that with Windows 10 over RDP, typing CTRL+ALT+END will
bring up the usual choice of options you get when typing CTRL+ALT+DEL.
Tuesday, February 9, 2021
Dapper+DappersSImpleCrud+Sybase(AseClient).net core errors.
Dapper+DappersSimpleCrud+Sybase(AseClient)
.net core errors.
Error is something like "Connection in a broken state" , there is an int64 getting passed in, or in the EO/CV/VM, convert them all to int32... inputs first, that's usually the one.
Tuesday, February 2, 2021
.Net core 3.1 Webapi Errors and Their Causes
Unable to resolve service for type 'SpProofOfConceptAPI.Dal.IEvaluationFormPartialDAL' while attempting to activate 'SpProofOfConceptAPI.Services.EvalDetailScores.EvalDetailScoresUpdateHandler'."}
You forgot to declare this type SpProofOfConceptAPI.Dal.IEvaluationFormPartialDAL for IOC in the startup
Solution (and for the BLL cause you usually forget both)
services.AddScoped<IEvaluationFormPartialDAL, EvaluationFormPartialDAL>();
services.AddScoped<IEvaluationFormPartialBLL, EvaluationFormPartialBLL>();
Monday, January 4, 2021
A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
When I get this error in .Net Core web api DAL call, here are things I've found that were the cause.
It's a generic message meaning "something went wrong communicating"
1. Convert the input args from int64 to int32, because Sybase sucks at int64s.
2. If you forget to put the @ in front of the argument name in the struct.(Even though on SO they say the @s don't belong)(I tested a working call removing the @ and it worked fine, so this may be spurious)
3. Your timeout could be to short, try adding 'Connection Timeout = 600;' if you are using ASE (Sybase)
4. Try changing all int64s to int32s in the return object
5. Try hard coding the variable into the SQL to see if that works (then you know it's something to do with the parameters.
6. re write not using dapper to see if that gives you insight
using ( IDbConnection db = new AseConnection( aseSqlConnectionString ) )
{
db.Open( );
using ( IDbCommand command = db.CreateCommand( ) )
{
command.CommandText = sql;
var parameter = command.CreateParameter();
parameter.ParameterName = "@enrtypeid";
parameter.Value = EnrTypeId;
command.Parameters.Add(parameter); ;
using (var reader = command.ExecuteReader())
{
// Get the results.
while (reader.Read())
{
var col1= reader.GetString(0);
var col2= reader.GetString(1);
// Do something with the data...
}
}
db.Close( );
}
}