Google Analytics İzleme

02 Şubat 2018

Oracle - Oracle 11g r2 Database Client (11.2.0.1.0) Setup sürümü Windows 10 uyumluluk sorunu

Oracle'ın sitesinden indirilen Oracle 11g R2 (11.2.0.1.0) Client Setup sürümü Windows 10 tarafından desteklenmiyor. Aşağıdaki hata vermektedir.



Windows 10 desteğini Oracle 12.1 (12c Release 1) sürümü ve üstü vermektedir.


Oracle Database 11g Release 2 Client (11.2.0.1.0) Windows 32 Bit ve 64 Bit indirim adresi:
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.html

Oracle Database Client (12.1.0.2.0) Windows 32 Bit ve 64 Bit indirim adresi:
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-win64-download-2297732.html


Kaynaklar:
https://kb.iu.edu/d/aznp
https://kb.iu.edu/d/azoc
https://community.oracle.com/thread/3934645
https://community.oracle.com/thread/3721018
https://dba.stackexchange.com/questions/155498/is-oracle-11g-database-supported-in-windows-10
http://www.catgovind.com/oracle/oracle-how-to-install-oracle-11g-database-client-in-windows-10/
https://uncw.edu/itsd/documents/Oracle11gR2Installation.pdf
http://realfiction.net/2009/11/26/Use-32-and-64bit-Oracle-Client-in-parallel-on-Windows-7-64-bit-for-eg-NET-Apps/
https://stackoverflow.com/questions/33516389/using-oracle-client-32-bit-on-win-10-64-bit




ASP.Net Web API - Internet Explorer 11'de OPTIONS metodu çağrımı hatası

Internet Explorer 11'de AngularJs uygulamasında web api çağrımlarında, asıl metod çağrımı öncesi OPTIONS metodu ile sunucuya istek yapılır.
OPTIONS metodu ile dönen response header uygun olmazsa aşağıdaki gibi hata vermektedir.

"SEC7123: authorization istek başlığı Access-Control-Allow-Headers listesinde yoktu."
"SCRIPT7002: XMLHttpRequest: Ağ Hatası 0x80070005, Erişim engellendi."

Bu hatanın nedeni OPTIONS metodu ile gelen request header'a uygun olarak response header'da uygun değer olmamasıdır. Access-Control-Allow-Headers response header değerini * şeklinde yapmak da hatayı çözmemektedir. * değeri atamak, Google Chrome browser ile çalışıyor ancak Internet Explorer 11'de aynı hatayı vermektedir.

--

https://api.ishakkulekci.com/auth/token adresli api'ye OPTIONS metoduyla request yapılır. Gelen Giden request bilgileri aşağıdaki gibidir ancak Internet Explorer 11 yukarıda belirtilen hataları vermektedir. Google Chrome'dan sorun olmamaktadır.

Request Header Bilgileri:
Accept: */*
Accept-Encoding: gzip, deflate
Access-Control-Request-Headers: authorization, content-type, accept
Access-Control-Request-Method: POST
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 0
Host: api.b2becommerce.btpro.io
Origin: https://ishakkulekci.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Response Header Bilgileri:
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: *
Access-Control-Allow-Origin: *
Cache-Control: no-cache, no-store, must-revalidate
Connection: Keep-Alive
Content-Length: 0
Date: Thu, 01 Feb 2018 16:21:34 GMT
Expires: 0
Keep-Alive: timeout=5, max=100
Pragma: no-cache
Server: Microsoft-IIS/8.5

--

Hatanın Çözümü:

Access-Control-Allow-Headers response header değeri = Access-Control-Request-Headers request header değeri

şeklinde olmalıdır.

ASP.NET Web API'da çözüm:

public SimpleAuthorizationServerProvider()
{

OnMatchEndpoint = async context =>
            {
                if (context.OwinContext.Request.Method == "OPTIONS")
                {
                    await Task.Run(() =>
                    {
                        if (context.OwinContext.Response.Headers.ContainsKey("Access-Control-Allow-Methods"))
                        {
                            context.OwinContext.Response.Headers["Access-Control-Allow-Methods"] = "*";
                        }
                        else
                        {
                            context.OwinContext.Response.Headers.Add("Access-Control-Allow-Methods", new[] { "*" });
                        }

                        if (context.OwinContext.Response.Headers.ContainsKey("Access-Control-Allow-Headers"))
                        {
                            context.OwinContext.Response.Headers["Access-Control-Allow-Headers"] = context.OwinContext.Request.Headers["Access-Control-Request-Headers"];
                        }
                        else
                        {                         
                            context.OwinContext.Response.Headers.Add("Access-Control-Allow-Headers", new[] { context.OwinContext.Request.Headers["Access-Control-Request-Headers"] });
                        }

                        if (context.OwinContext.Response.Headers.ContainsKey("Access-Control-Allow-Origin"))
                        {
                            context.OwinContext.Response.Headers["Access-Control-Allow-Origin"] = "*";
                        }
                        else
                        {
                            context.OwinContext.Response.Headers.Add("Access-Control-Allow-Origin", new[] { "*" });
                        }
                     
                        context.OwinContext.Response.StatusCode = 200;

                        context.RequestCompleted();
                    });
                }
            };

...
...


Kaynaklar:
--
Pay special attention to the Access-Control-Allow-Headers response header. The value of this header should be the same headers in the Access-Control-Request-Headers request header, and it can not be '*'.
--
https://www.codeproject.com/questions/1060149/how-to-deal-with-preflight-response-in-cors