ทดลองแก้ไข ว่าได้จะได้ผลหรือไม่
This commit is contained in:
@@ -15,6 +15,7 @@ using TodoAPI2.Models;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace TodoAPI2.Controllers
|
namespace TodoAPI2.Controllers
|
||||||
{
|
{
|
||||||
@@ -94,7 +95,8 @@ namespace TodoAPI2.Controllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||||
|
var httpclient = new WebClient();
|
||||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using TodoAPI2.Models;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace TodoAPI2.Controllers
|
namespace TodoAPI2.Controllers
|
||||||
{
|
{
|
||||||
@@ -93,7 +94,8 @@ namespace TodoAPI2.Controllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||||
|
var httpclient = new WebClient();
|
||||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using TodoAPI2.Models;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace TodoAPI2.Controllers
|
namespace TodoAPI2.Controllers
|
||||||
{
|
{
|
||||||
@@ -95,7 +96,8 @@ namespace TodoAPI2.Controllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||||
|
var httpclient = new WebClient();
|
||||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using TodoAPI2.Models;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace TodoAPI2.Controllers
|
namespace TodoAPI2.Controllers
|
||||||
{
|
{
|
||||||
@@ -94,7 +95,8 @@ namespace TodoAPI2.Controllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||||
|
var httpclient = new WebClient();
|
||||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using TodoAPI2.Models;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace TodoAPI2.Controllers
|
namespace TodoAPI2.Controllers
|
||||||
{
|
{
|
||||||
@@ -95,7 +96,8 @@ namespace TodoAPI2.Controllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||||
|
var httpclient = new WebClient();
|
||||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using TodoAPI2.Models;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace TodoAPI2.Controllers
|
namespace TodoAPI2.Controllers
|
||||||
{
|
{
|
||||||
@@ -95,7 +96,8 @@ namespace TodoAPI2.Controllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||||
|
var httpclient = new WebClient();
|
||||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using TodoAPI2.Models;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace TodoAPI2.Controllers
|
namespace TodoAPI2.Controllers
|
||||||
{
|
{
|
||||||
@@ -94,7 +95,8 @@ namespace TodoAPI2.Controllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||||
|
var httpclient = new WebClient();
|
||||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using TodoAPI2.Models;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace TodoAPI2.Controllers
|
namespace TodoAPI2.Controllers
|
||||||
{
|
{
|
||||||
@@ -95,7 +96,8 @@ namespace TodoAPI2.Controllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||||
|
var httpclient = new WebClient();
|
||||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using TodoAPI2.Models;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace TodoAPI2.Controllers
|
namespace TodoAPI2.Controllers
|
||||||
{
|
{
|
||||||
@@ -95,7 +96,8 @@ namespace TodoAPI2.Controllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||||
|
var httpclient = new WebClient();
|
||||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||||
|
|||||||
Reference in New Issue
Block a user