Thursday, April 9, 2020

Coronavirus and Our Priorities – Amir Nasiruddin Sayani


First few cases of Coronavirus got reported in Wuhan, city of China in the month of December 2019. China started taking immediate actions and closed down markets, different places and even lockdown cities to avoid further spread of virus. While China was fighting the war alone, world was enjoying amenities.

Pakistan reported first two cases of Coronavirus in last week of February. First patient was from Karachi and other one was from Islamabad. Both patients had recently returned from Iran. Pakistan registered its first death on 18-20 march.

Sindh was the first province who started taking stern steps to spread the virus. While other provinces and federal state was in denial state. Sindh started actions and closed down educational institution, stopped transportation and social gatherings.

People were expecting more from federal government to act promptly but they were nowhere in the scene initially. They could have stopped and installed proper screening in Baluchistan where pilgrims from Iran was returning to their families. Similarly they failed to influence Tablighi Jamaat not to gather in Raiwind. We cannot decide should we have Friday prayers at home or in mosques when UAE and KSA have already urge people to pray at home.

Pakistan must have announced lockdown much earlier like China and other countries have done to avoid the spread the virus but our elite were waiting for the situation to be worsened like Italy and other countries. Why we should we wait for the situation to be worsened to lockdown and stop the spread of virus.

Pakistan’s prime minister is having press conference every day to teach its citizens that what is more important to them rather nation expects him to take realistic actions and give proper plans about food distribution, utility bills relief and provide other medical equipment but they are more focusing on non-serious issue like construction industry package and targeting opposition. World is changing drastically every day where spread of virus is increasing exponentially.

USA, Germany, Russia, UK and many other NGOs are working hard to get vaccine to save humanity and get over with this pandemic.

It is never too take to set our priorities to overcome this crises and save our country. If we failed to ask people to stay home then we won’t be able to face this crisis. We have worst medical facilities in the country. Countries who have best medical facilities are failed to face cries since they didn’t take virus that important.

Let’s sit together with all provinces to make a comprehensive and collective plan to face this crises in larger interest of country. Let’s set a side political differences for a while. We will get change again to do politics.

May God save our country and world from pandemic and restore our daily lives.

Tuesday, March 28, 2017

You receive error 401.1 when you browse a Web site that uses Integrated Authentication and is hosted on IIS 5.1 or a later version


While Setting Windows Authentication in IIS we need to make following changes:

Click on Authentication -> Windows Authentication -> Providers

Move NTLM to up and Negotiate to down





It will work with localhost and IP, but it will not work with host name / domain name so you need to make following changes.

While Setting domain name / host name in Host file in URL we need to make following changes:

There are two methods to work around this issue, use one of the following methods, as appropriate for your situation.

Method 1: Specify host names (Preferred method if NTLM authentication is desired)
To specify the host names that are mapped to the loopback address and can connect to Web sites on your computer, follow these steps:
1.    Set the DisableStrictNameChecking registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:

281308 Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name

2.    Click Start, click Run, type regedit, and then click OK.
3.    In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
4.    Right-click MSV1_0, point to New, and then click Multi-String Value.
5.    Type BackConnectionHostNames, and then press ENTER.
6.    Right-click BackConnectionHostNames, and then click Modify.
7.    In the Value data box, type the host name or the host names for the sites that are on the local computer, and then click OK.
8.    Quit Registry Editor, and then restart the IISAdmin service.
Method 2: Disable the loopback check (less-recommended method)
The second method is to disable the loopback check by setting the DisableLoopbackCheck registry key.

To set the DisableLoopbackCheck registry key, follow these steps:
1.    Set the DisableStrictNameChecking registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:

281308 Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name

2.    Click Start, click Run, type regedit, and then click OK.
3.    In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
4.    Right-click Lsa, point to New, and then click DWORD Value.
5.    Type DisableLoopbackCheck, and then press ENTER.
6.    Right-click DisableLoopbackCheck, and then click Modify.
7.    In the Value data box, type 1, and then click OK.
8.    Quit Registry Editor, and then restart your computer.

https://support.microsoft.com/en-us/help/896861/you-receive-error-401.1-when-you-browse-a-web-site-that-uses-integrated-authentication-and-is-hosted-on-iis-5.1-or-a-later-version

Sunday, November 27, 2016

Rejected-By-UrlScan 404 Errors || IIS and UrlScan – denying request

How Can I Disable URL Scan
  1. Go to the <Windows Folder>\system32\inetsrv\urlscan\
  2. Check the error first in the log folder
  3. Open UrlScan.ini file
  4. Set AllowDotInPath=1
  5. From Command Prompt (Start -> Run -> Cmd), type “iisreset”, to restart IIS

Saturday, November 12, 2016

Xamarin issue with designer in Visual Studio 2015

I have Visual Studio 2015 Update 3, Xamarin 4.2.0.703, Android 7.0 SDK Platform (API 24), Android SDK Tools 25.2.2, Android SDK Build-tools 24.0.3 .
To fix the issue you have to download Android 6.0 SDK Platform (API 23).

Wednesday, December 30, 2015

Hijri Date to Gregorian Date or Vice Versa Sql Server

Hijri Date to Gregorian Date or Vice Versa Sql Server:

SELECT

GETDATE() [Today Date],

CONVERT(VARCHAR(11),GETDATE(),131) [Hijri Date],

CONVERT(datetime, CONVERT(VARCHAR(11),GETDATE(),131), 131) [Gregorian Date]




Monday, January 27, 2014

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine


The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine




To resolve this issue open the project in Visual Studio then:
 
1. From the solution explorer right-click your project then click Properties
2. Click the Build tab
3. Change Platform target from: Any CPU to x86
4. Re-build your solution

Monday, July 29, 2013

How to: Send Data Using the WebRequest Class

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {

//The remote server returned an error: (417) Expectation Failed.
System.Net.ServicePointManager.Expect100Continue = false;

            // Create a request using a URL that can receive a post.
            WebRequest request = WebRequest.Create("http://www.contoso.com/PostAccepter.aspx ");
            // Set the Method property of the request to POST.
            request.Method = "POST";
            // Create POST data and convert it to a byte array.
            string postData = "This is a test that posts this string to a Web server.";
            byte[] byteArray = Encoding.UTF8.GetBytes(postData);
            // Set the ContentType property of the WebRequest.
            request.ContentType = "application/x-www-form-urlencoded";
            // Set the ContentLength property of the WebRequest.
            request.ContentLength = byteArray.Length;
            // Get the request stream.
            Stream dataStream = request.GetRequestStream();
            // Write the data to the request stream.
            dataStream.Write(byteArray, 0, byteArray.Length);
            // Close the Stream object.
            dataStream.Close();
            // Get the response.
            WebResponse response = request.GetResponse();
            // Display the status.
            Console.WriteLine(((HttpWebResponse)response).StatusDescription);
            // Get the stream containing content returned by the server.
            dataStream = response.GetResponseStream();
            // Open the stream using a StreamReader for easy access.
            StreamReader reader = new StreamReader(dataStream);
            // Read the content.
            string responseFromServer = reader.ReadToEnd();
            // Display the content.
            Console.WriteLine(responseFromServer);
            // Clean up the streams.
            reader.Close();
            dataStream.Close();
            response.Close();
        }
    }
}


The remote server returned an error: (417) Expectation Failed.

Solution :::

System.Net.ServicePointManager.Expect100Continue = false; (at first line)

add above line above WebRequest.......

// Create a request using a URL that can receive a post. 
WebRequest request = WebRequest.Create("http://www.contoso.com/PostAccepter.aspx ");

Monday, January 21, 2013

Could not load file or assembly or one of its dependencies. Access is denied. The issue is random, but after it happens once, it continues

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files. 

Google told me that their might be permission issue against current user, then i found i have Current Identity: IIS APPPOOL in malfunctioning server where as rest of server have Current Identity: NT AUTHORITY\NETWORK SERVICE. then i changed Current Identity from IIS APPPOOL to NT AUTHORITY\NETWORK SERVICE. then found after recompiling(modification in web.config recompile the web application), i have found Temporary ASP.NET Files. which now malfunctioning server start creating temp file.

Other Labels:


System.IO.FileLoadException: Could not load file or assembly

Solution to "Could not load file or assembly or one of its dependencies. Access is denied"

Could not load file or assembly '******' or one of its dependencies. Access is denied.

C#: Could not load types from assembly

Monday, March 19, 2012

How to change port address in WampServer

WampServer Port Number Change




1. Open httpd.conf file (left click on right bottom on wamp server icon -> Apache -> httpd.conf)




2. Search (Find) -> Listen 80




3. change 80 with desired port number




4. restart wamp server




Have Fun :)

Sunday, March 4, 2012

Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list



IIS 7.5 error: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list


Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list






Execute this command:


Start -> All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio Command Prompt (2010)


NOW Paste this command


Solution: %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

Tuesday, January 18, 2011

iPhone 4

iPhone 4

Available on Verizon February 10.

Beginning February 10, the phone that changed everything will be available on both AT&T and Verizon Wireless in the United States. Qualified Verizon Wireless customers will also have the exclusive opportunity to pre-order iPhone 4 online on February 3, ahead of general availability.
Whichever network you choose, you’ll get FaceTime video calling, the high-resolution Retina display, a 5-megapixel camera, HD video recording, long battery life, and all the other great features of iPhone 4.
Source

Coronavirus and Our Priorities – Amir Nasiruddin Sayani

First few cases of Coronavirus got reported in Wuhan, city of China in the month of December 2019. China started taking immediate actions ...