Thursday, July 19, 2018

purging cloudflare cache with an api call in wep api and asp.net C#

Hi All,

Cloudflare's cache

To remove one or more files from Cloudflare's cache either by specifying URLs, faced challenges to integrated the cloud-flare API call. We've tried VS 2015 and framework 4.5.2. Exception through 'upgrade the version' and tried higher version VS 2017 and framework 4.6.1 and its works fine.

Cloudflare Request:


curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/purge_cache" \
     -H "X-Auth-Email: user@example.com" \
     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
     -H "Content-Type: application/json" \
     --data '{"files":["http://www.example.com/css/styles.css",{"url":"http://www.example.com/cat_picture.jpg","headers":{"Origin":"cloudflare.com","CF-IPCountry":"US","CF-Device-Type":"desktop"}}]}'


Cloudflare Response

{
  "success": true,
  "errors": [],
  "messages": [],
  "result": {
    "id": "9a7806061c88ada191ed06f989cc3dac"
  }
}


Here, Existing application running .net framework 4.5 (immediate need to convert 4.6.1 ), if we change to 4.6.1 version. Required to verify full application and takes 3 to 4 months. Meanstime we think and created web api and call the url in existing application. 

4.5(traditional asp.net)--->4.6.1(web api)---> Cloudflare Purge (Restful API)

Happy coding:)

Saturday, May 5, 2018

IIS,Memory leak,output cache,set the memory limit, recycling


Recenly faced iis related memory leakage, To investigate its happen application level or system level.

Application level

i. Check DB - costly query and DB performance

ii. outputcache

iii. third-party dll and excel macro relate application used


System level

i. To reduce number application pool (each application pool allocating memory, so allocate static site are to defaultapppool)

ii. check system configuration (RAM and C drive space)

I referred below links,


IIS - Output cache: https://serverfault.com/questions/557920/iis-memory-management-thresholds-with-potential-leaks


Memory: https://forums.iis.net/t/1230103.aspx?Windows+Server+2012+IIS+8+0+IIS+Worker+Process+Consumes+more+memory


Recycling: http://www.bursky.net/index.php/2013/03/managing-iis-server-memory-usage/


https://stackoverflow.com/questions/16162524/how-to-increase-memory-and-cache-size-for-application-pool-in-iis-7-efficiently

https://serverfault.com/questions/598672/app-pool-doesnt-respect-memory-limits

Monday, February 19, 2018

Slow performance Wordpress,MySQL on Windows Server with IIS fastcgi

Hi,

Faced performance problem with an internal WordPress site.

I changed the settings below and my speed improvement went from +1650ms to 450ms.

The default is set to localhost.

/** MySQL hostname */
define('DB_HOST', 'localhost');
Change this to 127.0.0.1

/** MySQL hostname */
define('DB_HOST', '127.0.0.1');


Sunday, February 18, 2018

full stack developer

My interesting topic , daily leaning new things.

What is a Full-Stack Developer?

Developer specialized in everything from front-end to back-end; to a developer who has a general knowledge in all steps from concept to finished product.

Full-stack developer to have specialized knowledge in all stages of software development.

Stages,

1.Server, network, and hosting environment
2.Relational and non-relational databases
3.How to interact with APIs and the external world
4.User interface and user experience
5.Quality assurance
6.Security concerns throughout the program
7.Understanding customer and business needs

ssrs, reports session time out

Hi, I've faced ssrs report - Session timeout issue. Searched and fixed the issue.

Go to administrator account (most important) and

i.choose site setting-->general

ii. choose do not timeout (radio button)

iii. click ok

iv. restart SQL server reporting services

mysql grant privileges

mysql> CREATE USER 'user_name'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON database_name.* TO 'user_name'@'localhost' WITH GRANT OPTION;
mysql> CREATE USER 'user_name'@'%' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON database_name.* TO 'user_name'@'%' WITH GRANT OPTION;

Tuesday, January 30, 2018

Site traffic source and medium

Hi,

Today learn google analytic, traffic source and medium.

Source / Medium. 

Source: the origin of your traffic, such as a search engine (like, google,bing,yahoo) or a domain (irctc.co.in). 

Medium: the general category of the source, (for example, organic search (organic), cost-per-click paid search (cpc), web referral (referral), email campaign). 

Monday, January 29, 2018

Solved Mix match content issue

Hi,

Daily I've received new experience, today fixed mix and match content in blog.

Searched and found WordPress plugin.

Installed activities Really secure SSL plugin and resolved the issue.

Note. If anyone using cloudflare SSL certificate and use cloudflare plugin.

Have a good day!

Friday, January 26, 2018

Wednesday, January 17, 2018

WordPress in IIS

Hi,
Yes, Possible WordPress, PHP, MySQL in IIS and windows environment.
I've difference experience to the implementation of the blog in IIS.
Please follow points,