Validate Windows Authentication

Below mentioned two lines of code will help you to validate windows user id from your NAV perspective. Cheers all!!, keep exploring the enormous possibilities with DotNet variable.

PrincipalContext@1002 : DotNet "'System.DirectoryServices.AccountManagement, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.DirectoryServices.AccountManagement.PrincipalContext";
ContextType@1001 : DotNet "'System.DirectoryServices.AccountManagement, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.DirectoryServices.AccountManagement.ContextType";

PrincipalContext := PrincipalContext.PrincipalContext(ContextType.Domain);
Valid := PrincipalContext.ValidateCredentials(vUserID,vPassword);

NAV 2016 Ready!!!

Good News!!!  NAV 2016 baby has been arrived.

Download here!

Header

System Requirements for Microsoft Dynamics NAV 2016

what excites me the most are the

  • New CAL editor with intellisense feature

intels3

  • Code Coverage is back to NAV

CodeCoverage

  • Posting Preview feature

pp

  • NAV app for smartphone literally The Universal app

itunes

  • Lots and Lots of enhancements to webclient, like change company

Change comp

Kill Sessions – Life saving script

Some of you have come across hard times when database keep not responding when doing SQL server restart, while alter database settings, while changing Single/Multi user settings…. etc

This script can be used to find blocking sessions.

Once blocking session is identified, analyse carefully and KILL the particular session id.

This small script saved my life many times,so its here for you… Cheers!!

select
 l.resource_type,
 l.request_mode,
 l.request_status,
 l.request_session_id,
 r.command,
 r.status,
 r.blocking_session_id,
 r.wait_type,
 r.wait_time,
 r.wait_resource,
 request_sql_text = st.text,
 s.program_name,
 most_recent_sql_text = stc.text
 from sys.dm_tran_locks l
 left join sys.dm_exec_requests r
 on l.request_session_id = r.session_id
 left join sys.dm_exec_sessions s
 on l.request_session_id = s.session_id
 left join sys.dm_exec_connections c
 on s.session_id = c.session_id
 outer apply sys.dm_exec_sql_text(r.sql_handle) st
 outer apply sys.dm_exec_sql_text(c.most_recent_sql_handle) stc
 where l.resource_database_id = db_id('DatabaseName')
 order by request_session_id;