Lets Have a fun with Technology.

BTemplates.com

Follow by Email

Thursday, June 22, 2017

Generate Guid In Angular 2 Application (type Script)


Generate Guid In Angular 2 Application (type Script)


Hello,

Below is code block to generate GUID in angular 2 application.


 function newguidgen() {  
  function id() {  
   return Math.floor((1 + Math.random()) * 0x10000)  
    .toString(16)  
    .substring(1);  
  }  
  return id() + id() + '-' + id() + '-' + id() + '-' +  
   id() + '-' + id() + id() + id();  
 }  

Tuesday, January 24, 2017

Could not load file or assembly 'system.web.http' or one of its dependencies. The located seembly's manifest definition does not match the assemblr reference (Exception from HRESULT : 0x80121040)


Hello,

Sometime we receive below error message.

Could not load file or assembly 'system.web.http' or one of its dependencies. The located seembly's manifest definition does not match the assemblr reference (Exception from HRESULT : 0x80121040)



Solution :-
It will be fix with reinstall of Package.
Run below command in Package manager.


Update-Package Microsoft.AspNet.WebApi -reinstall

Thursday, January 19, 2017

Error in Upgrade of Node.JS


Hello,

Below is command use to upgrade node.js.

npm install npm@latest -g  (Upgrade node.js)

Sometime we get the error in upgrade like



In most of cased the problem with Proxy setting.

To check proxy try to access below url.

https://registry.npmjs.org/

if it works then your proxy is fine else some problem with proxy.


After resetting my proxy it's work fine.



Hope this will helpful..

Enjoy!!!