Tuesday, July 12, 2016

Closure Compiler Javascript

- Nice tool for JavaScript optimization.

https://developers.google.com/closure/compiler/



Tool:

http://closure-compiler.appspot.com/home

https://jscrambler.com/en/


http://stackoverflow.com/questions/194397/how-can-i-obfuscate-protect-javascript

Wednesday, July 6, 2016

How to efficiently deal with Nuget packages version conflict in large solution.



  • Maintain a common Folder will be used as the package source and all projects should use that common source as nuget package source.

  • On the build server or developer machine the only source for the nuget packages will be this package source. We'll disable the other nuget sources on the server.
  • So if by mistake anyone add the nuget package from nuget.org, it will be caught during build as build server won't find that version package on the build server.

  • You can also manage the package at solution level. This will give you option to view the nuget version for the each of the project in the solution and then you can update them all at once to the latest version.


  • You can set local repository from the nuget package window in visual studio.



View Currently executing Requests in IIS

Go to InetMgr, go to the worker processes, double click the one you want to monitor.

or you can run following command to have more control

%windir%\system32\inetsrv\appcmd list requests /elapsed:10000
This will show all request which are execugint for more than 10 seconds. 
If you see the new requests are queuing and existing request keep taking more time then you are having a hang. Better to take the dump of the worker process using Debug Diag in such case and then analyze it for the root cause of the hang.

View Currently executing Requests in IIS

Go to InetMgr, go to the worker processes, double click the one you want to monitor.

or you can run following command to have more control

%windir%\system32\inetsrv\appcmd list requests /elapsed:10000
This will show all request which are execugint for more than 10 seconds. 
If you see the new requests are queuing and existing request keep taking more time then you are having a hang. Better to take the dump of the worker process using Debug Diag in such case and then analyze it for the root cause of the hang.

Wednesday, June 22, 2016

Azure Web Site Deployment Slots

All you need to know about Deployment Slot
https://azure.microsoft.com/en-us/documentation/articles/web-sites-staged-publishing/

And in order to prevent the access of your staging site to only white listed ips use following URL Rewrite rule.

<rule name="Block unauthorized traffic to staging sites" stopProcessing="true">
<match url=".*" />
<conditions>
<!-- Enter your staging site host name here as the pattern-->
<add input="{HTTP_HOST}" pattern="^ruslany\-staging\." />
<!-- Enter your white listed IP addresses -->
<add input="{REMOTE_ADDR}" pattern="123\.123\.123\.1" negate="true"/>
<!-- Add the white listed IP addresses with a new condition as seen below -->
<!-- <add input="{REMOTE_ADDR}" pattern="123\.123\.123\.2" negate="true"/> -->
</conditions>
<action type="CustomResponse" statusCode="403" statusReason="Forbidden"
statusDescription="Site is not accessible" />
</rule>




Wednesday, June 1, 2016

Could not load type ‘System.ServiceModel.Activation.HttpModule

http://www.codeproject.com/Articles/613812/Solve-IIS-8-Error-Could-not-load-type-System-Servi

IE keep prompting for the password while browsing site on SSL on the same machine

It will keep prompting you from the browser if you browse any site hosted with live certificate and browsed on the same machine as iis server.