Net err cert authority invalid
Author: m | 2025-04-24
Ini akan memperbaiki masalah NET Err Cert Authority Tidak Valid NET Err Cert Common Name Invalid. Solusi 4. Impor SSL Sertifikat Tepercaya . Untuk Memperbaiki - Err_Cert_Authority_Invalid. Kelola Sertifikat. Pertama, periksa
Ошибка NET ERR CERT AUTHORITY INVALID - Onoutbukax.ru
META 구문 수행 시 송신자 메타 파일 또는 Restart SN 파일이 유효하지 않을 경우 반환하는 에러 메시지를 개선합니다.module : rp-oraAdapterCategory : Usability재현 빈도 : Always설명 : ALTER REPLICATION replication_name BUILD OFFLINE META 구문 수행 시 송신자 메타 파일 또는 Restart SN 파일이 유효하지 않을 경우 반환하는 에러 메시지를 개선합니다.송신자 메타 파일(replication_name_META_NEW.bin, replication_name_META_OLD.bin)이 모두 유효하지 않으면 ERR-611B3 : Invalid sender meta files. (Replication name: replication_name,File name: replication_name_META_NEW.bin, replication_name_META_OLD.bin ) 에러를, Restart SN 파일이 모두 유효하지 않을 경우 ERR-611B4 : Invalid Restart SN files. (Replication name: replication_name, File name: replication_name_SN_NEW.bin, replication_name_SN_OLD.bin ) 에러를 반환하도록 수정하였습니다.재현 방법재현 절차수행 결과송신자 메타 파일이 모두 유효하지 않을 때ERR-611B3 : There is no valid meta file.Restart SN 파일이 모두 유효하지 않을 때ERR-611B4 : There is no valid sn file.예상 결과송신자 메타 파일이 모두 유효하지 않을 때ERR-611B3 : Invalid sender meta files. (Replication name: replication_name, File name: replication_name_META_NEW.bin, replication_name_META_OLD.bin )Restart SN 파일이 모두 유효하지 않을 때ERR-611B4 : Invalid Restart SN files. (Replication name: replication_name, File name: replication_name_SN_NEW.bin, replication_name_SN_OLD.bin )Workaround변경사항Performance viewPropertyCompile OptionError Code에러 메시지가 추가되었습니다., File name: META_NEW.bin, META_OLD.bin ) # *Cause:# - Sender meta files do not exist or are invalid.# *Action:# - 'BUILD OFFLINE META' failed. Verify the altibase_rp.log.">0x611B3 ( 397747) rpERR_ABORT_ERR_NO_VALID_METAFILE Invalid sender meta files. (Replication name: , File name: META_NEW.bin, META_OLD.bin ) # *Cause:# - Sender meta files do not exist or are invalid.# *Action:# - 'BUILD OFFLINE META' failed. Verify the altibase_rp.log., File name: SN_NEW.bin, SN_OLD.bin ) # *Cause:# - Restart SN files do not exist or are invalid.# *Action:# - 'BUILD OFFLINE META' failed. Verify the altibase_rp.log.">0x611B4 ( 397748) rpERR_ABORT_ERR_NO_VALID_SNFILE Invalid Restart SN files. (Replication name: , File name: SN_NEW.bin, SN_OLD.bin ) # *Cause:# - Restart SN files do not exist or are invalid.# *Action:# - 'BUILD OFFLINE META' failed. Verify the altibase_rp.log.BUG-49718 비활성화 상태의 인덱스에 인덱스 통계 정보를 설정할 때 예외 처리를 추가합니다.module : smCategory : Fatal재현 빈도 : Always설명 : 비활성화 상태의 인덱스에 인덱스 통계 정보를 설정(SET_INDEX_STATS)하면 Altibase 서버가 비정상 종료하는 현상을 수정합니다. 비활성화 상태의 인덱스 경우 인덱스 통계 정보 설정을 수행해도 무시하도록 예외 처리를 추가합니다.재현 방법재현 절차DROP TABLE T1;CREATE TABLE T1 (I1 INTEGER);ALTER TABLE T1 ALL INDEX DISABLE;CREATE INDEX T1_IDX ON T1(I1);EXEC SET_INDEX_STATS('SYS', 'T1_IDX', NULL, NULL, 30, NULL, NULL, NULL, TRUE);수행 결과[ERR-91015 : Communication failure.]예상 결과Workaround변경사항Performance viewPropertyCompile OptionError CodeBUG-49722 SQL 반영 모드 및 오프라인 이중화에서 이중화 대상 테이블 간 PRIMARY KEY가 다른 경우 예외 처리를 추가합니다.module : rpCategory : Functional Error재현 빈도 : Always설명 : 이중화 대상 테이블 간 PRIMARY KEY가 다름에도 성공하는 다음 2가지 상황에 예외 처리를 추가합니다.SQL 반영 모드(REPLICATION_SQL_APPLY_ENABLE = 1)에서 이중화를 시작한 경우Adapter에서 BUILD OFFLINE META를 수행한 경우이 버그 반영 후에는 아래와 같은 에러 메시지가 발생합니다.SQL 반영 모드에서 이중화 시작한 경우 예이중화 송신자 측이중화 시작 시[ERR-6100D : [Sender] Failed to handshake with the peer server (The index
NET ERR CERT COMMON NAME INVALID
"ErrorResponse[USERNOTFOUND]", "description": " \nPossible errors:\n- `USERNOTFOUND`: user not found", "type": "object", "properties": { "state": { "type": "string", "enum": [ "err" ] }, "code": { "type": "string", "enum": [ "USERNOTFOUND" ] }, "msg": { "type": "string", "enum": [ "user not found" ] } } } ] } } } }, "numbers-info-response": { "description": "The resulting phone number\n \nPossible errors:\n- `INVALIDNUMBER`: invalid number", "content": { "application\/json": { "schema": { "oneOf": [ { "$ref": "#\/components\/schemas\/NumberObject" }, { "title": "ErrorResponse[INVALIDNUMBER]", "description": " \nPossible errors:\n- `INVALIDNUMBER`: invalid number", "type": "object", "properties": { "state": { "type": "string", "enum": [ "err" ] }, "code": { "type": "string", "enum": [ "INVALIDNUMBER" ] }, "msg": { "type": "string", "enum": [ "invalid number" ] } } } ] } } } }, "numbers-getContacts-response": { "description": "Contains objects in a listing form.\n \nPossible errors:\n- `NUMBERNOTFOUND`: number not found", "content": { "application\/json": { "schema": { "oneOf": [ { "$ref": "#\/components\/schemas\/ListingResult-ContactObject" }, { "title": "ErrorResponse[NUMBERNOTFOUND]", "description": " \nPossible errors:\n- `NUMBERNOTFOUND`: number not found", "type": "object", "properties": { "state": { "type": "string", "enum": [ "err" ] }, "code": { "type": "string", "enum": [ "NUMBERNOTFOUND" ] }, "msg": { "type": "string", "enum": [ "number not found" ] } } } ] } } } }, "sources-add-response": { "description": "The resulting source\n \nPossible errors:\n- `INSUFFICIENT_DATA`: insufficient data\n- `SOURCENOTFOUND`: source not found", "content": { "application\/json": { "schema": { "oneOf": [ { "$ref": "#\/components\/schemas\/SourceObject" }, { "title": "ErrorResponse[INSUFFICIENT_DATA|SOURCENOTFOUND]", "description": " \nPossible errors:\n- `INSUFFICIENT_DATA`: insufficient data\n- `SOURCENOTFOUND`: source not found", "type": "object", "properties": { "state": { "type": "string", "enum": [ "err" ] }, "code": { "type": "string", "enum": [ "INSUFFICIENT_DATA", "SOURCENOTFOUND" ] }, "msg": { "type": "string", "enum": [ "insufficient data", "source not found" ] } } } ] } } } }, "sources-get-response": { "description": "The resulting user\n \nPossible errors:\n- `SOURCENOTFOUND`: source not found", "content": { "application\/json": { "schema": { "oneOf": [ { "$ref": "#\/components\/schemas\/SourceObject" }, { "title": "ErrorResponse[SOURCENOTFOUND]", "description": " \nPossible errors:\n- `SOURCENOTFOUND`: source not found", "type": "object", "properties": { "state": { "type": "string", "enum": [ "err" ] }, "code": { "type": "string", "enum": [ "SOURCENOTFOUND" ] }, "msg": { "type": "string", "enum": [ "source not found"NET ERR CERT DATE INVALID: как исправить
:= ioutil.ReadAll(res.Body) st.Expect(t, string(resBody)[:13], `{"bar":"foo"}`) // Verify that we don't have pending mocks st.Expect(t, gock.IsDone(), true)}Mocking a custom http.Client and http.RoundTripperpackage testimport ( "io/ioutil" "net/http" "testing" "github.com/nbio/st" "github.com/h2non/gock")func TestClient(t *testing.T) { defer gock.Off() gock.New(" Reply(200). BodyString("foo foo") req, err := http.NewRequest("GET", " nil) client := &http.Client{Transport: &http.Transport{}} gock.InterceptClient(client) res, err := client.Do(req) st.Expect(t, err, nil) st.Expect(t, res.StatusCode, 200) body, _ := ioutil.ReadAll(res.Body) st.Expect(t, string(body), "foo foo") // Verify that we don't have pending mocks st.Expect(t, gock.IsDone(), true)}Enable real networkingpackage mainimport ( "fmt" "io/ioutil" "net/http" "github.com/h2non/gock")func main() { defer gock.Off() defer gock.DisableNetworking() gock.EnableNetworking() gock.New(" Get("/get"). Reply(201). SetHeader("Server", "gock") res, err := http.Get(" if err != nil { fmt.Errorf("Error: %s", err) } // The response status comes from the mock fmt.Printf("Status: %d\n", res.StatusCode) // The server header comes from mock as well fmt.Printf("Server header: %s\n", res.Header.Get("Server")) // Response body is the original body, _ := ioutil.ReadAll(res.Body) fmt.Printf("Body: %s", string(body))}Debug intercepted http requestspackage mainimport ( "bytes" "net/http" "github.com/h2non/gock")func main() { defer gock.Off() gock.Observe(gock.DumpRequest) gock.New(" Post("/bar"). MatchType("json"). JSON(map[string]string{"foo": "bar"}). Reply(200) body := bytes.NewBuffer([]byte(`{"foo":"bar"}`)) http.Post(" "application/json", body)}Hacking it!You can easily hack gock defining custom matcher functions with own matching rules.See add matcher functions and custom matching layer examples for further details.LicenseMIT - Tomas Aparicio. Ini akan memperbaiki masalah NET Err Cert Authority Tidak Valid NET Err Cert Common Name Invalid. Solusi 4. Impor SSL Sertifikat Tepercaya . Untuk Memperbaiki - Err_Cert_Authority_Invalid. Kelola Sertifikat. Pertama, periksa Исправить ошибку NET ERR CERT AUTHORITY INVALID, когда невозможно установить безопасное соединение в браузере Chrome, Edge иERR CERT COMMON NAME INVALID ?
= new WebSocketPair(); pair[1].accept(); pair[1].send(JSON.stringify({ error: err.stack })); pair[1].close(1011, "Uncaught exception during session setup"); return new Response(null, { status: 101, webSocket: pair[0] }); } else { return new Response(err.stack, { status: 500 }); } }}var src_default = { async fetch(request, env) { return await handleErrors(request, async () => { return handleWebSockets(request, env); }); }};async function handleWebSockets(request, env) { let id = env.group.idFromName("A"); let roomObject = env.group.get(id); let newUrl = new URL(request.url); return roomObject.fetch(newUrl, request);}var SessionGroup = class { constructor(state, env) { this.state = state; this.env = env; this.sessions = []; } async fetch(request) { return await handleErrors(request, async () => { const url = new URL(request.url); const user = url.searchParams.get("user"); if (request.headers.get("Upgrade") != "websocket") { return new Response("expected websocket", { status: 400 }); } let pair = new WebSocketPair(); await this.handleSession(pair[1], user); return new Response(null, { status: 101, webSocket: pair[0] }); }); } async handleSession(webSocket, name) { webSocket.accept(); let session = { webSocket, name }; this.sessions.push(session); webSocket.addEventListener("message", async (msg) => { try { if (session.quit) { webSocket.close(1011, "WebSocket broken."); return; } const payload = JSON.parse(msg.data); console.log(payload.protocol); switch (payload.protocol) { case "one-to-one": this.sendTo(msg.data, payload.endpoint, name); break; case "one-to-self": this.sendTo(msg.data, name, name); break; default: let alert = "Invalid protocol, valid protocol include: 'one-to-one', 'one-to-self', 'one-to-all'"; webSocket.send(alert); } } catch (err) { console.log(err); let alert = "Invalid protocol, valid protocol include: 'one-to-one', 'one-to-self', 'one-to-all'"; webSocket.send(alert); } }); let closeOrErrorHandler = (evt) => { session.quit = true; this.sessions = this.sessions.filter((member) => member !== session); }; webSocket.addEventListener("close", closeOrErrorHandler); webSocket.addEventListener("error", closeOrErrorHandler); } sendTo(message, receiver, sender) { if (receiver === "") { this.sessions.map((session) => { if (session.name) { try { session.webSocket.send(message); } catch (err) { console.log(err); } } }); } else { let sent = false; this.sessions.map((session) => { if (session.name === receiver) { try { session.webSocket.send(message); sent = true; } catch (err) { console.log(err); } }NET ERROR INVALID CERT AUTHORITY PROBLEM
Few possibilities exist for obtaining a certificate:Windows Server provides a Certificates snap-in that you can use to request a certificate from a trusted certificate authority.If you want to generate a certificate locally for testing purposes, you can run the following PowerShell script.Run the script as an administrator.Replace the placeholders with values that are appropriate for your environment.# Create a self-signed certificate in the local store.$newCertificate = New-SelfSignedCertificate -CertStoreLocation cert:\LocalMachine\My -DnsName -FriendlyName ""# Convert the report server password to a secure string.$secureStringPassword = ConvertTo-SecureString "" -AsPlainText -Force# Set up a temporary folder if one doesn't exist.$folderPath = "C:\Temp"if (-not (Test-Path -Path $folderPath)) { New-Item -Path $folderPath -ItemType Directory}# Set up a variable for the path of a certificate file.$certificateFilePath = $folderPath, "\certificate-export.pfx" -join ""# Set up a variable for the path of the certificate's store location.$certificateStoreLocation = "cert:\LocalMachine\My", $newCertificate.Thumbprint -join ""# Export the certificate to the file.Export-PFXCertificate -Cert $certificateStoreLocation -File $certificateFilePath -Password $secureStringPassword# Import the certificate from the file to the trusted root to avoid problems with the certificate not being trusted. Import-PfxCertificate -FilePath $certificateFilePath cert:\LocalMachine\Root -Password $secureStringPasswordThe certificate is now available for use in Report Server Configuration Manager.If you run IIS and SSRS together on the same computer, you can use the IIS Manager console application to request and install a certificate:In IIS Manager, create and package a certificate request (.crt) file for subsequent processing by a trusted certificate authority. For more information, see Request a Server Certificate.After the certificate authority sends you the certificate (.cer) file, use IIS ManagementFix Error NET::ERR CERT DATE INVALID - YouTube
Practicedisabling gock once you are done with your HTTP testing logic.A Go idiomatic approach for doing this can be using it in a defer statement, such as:func TestGock (t *testing.T) { defer gock.Off() // ... my test code goes here}Intercept an http.Client just onceYou don't need to intercept multiple times the same http.Client instance.Just call gock.InterceptClient(client) once, typically at the beginning of your test scenarios.Restore an http.Client after interceptionNOTE: this is not required is you are using http.DefaultClient or http.DefaultTransport.As a good testing pattern, you should call gock.RestoreClient(client) after running your test scenario, typically as after clean up hook.You can also use a defer statement for doing it, as you do with gock.Off(), such as:func TestGock (t *testing.T) { defer gock.Off() defer gock.RestoreClient(client) // ... my test code goes here}ExamplesSee examples directory for more featured use cases.Simple mocking via testspackage testimport ( "io/ioutil" "net/http" "testing" "github.com/nbio/st" "github.com/h2non/gock")func TestSimple(t *testing.T) { defer gock.Off() gock.New(" Get("/bar"). Reply(200). JSON(map[string]string{"foo": "bar"}) res, err := http.Get(" st.Expect(t, err, nil) st.Expect(t, res.StatusCode, 200) body, _ := ioutil.ReadAll(res.Body) st.Expect(t, string(body)[:13], `{"foo":"bar"}`) // Verify that we don't have pending mocks st.Expect(t, gock.IsDone(), true)}Request headers matchingpackage testimport ( "io/ioutil" "net/http" "testing" "github.com/nbio/st" "github.com/h2non/gock")func TestMatchHeaders(t *testing.T) { defer gock.Off() gock.New(" MatchHeader("Authorization", "^foo bar$"). MatchHeader("API", "1.[0-9]+"). HeaderPresent("Accept"). Reply(200). BodyString("foo foo") req, err := http.NewRequest("GET", " nil) req.Header.Set("Authorization", "foo bar") req.Header.Set("API", "1.0") req.Header.Set("Accept", "text/plain") res, err := (&http.Client{}).Do(req) st.Expect(t, err, nil) st.Expect(t, res.StatusCode, 200) body, _ := ioutil.ReadAll(res.Body) st.Expect(t, string(body), "foo foo") // Verify that we don't have pending mocks st.Expect(t, gock.IsDone(), true)}Request param matchingpackage testimport ( "io/ioutil" "net/http" "testing" "github.com/nbio/st" "github.com/h2non/gock")func TestMatchParams(t *testing.T) { defer gock.Off() gock.New(" MatchParam("page", "1"). MatchParam("per_page", "10"). Reply(200). BodyString("foo foo") req, err := http.NewRequest("GET", " nil) res, err := (&http.Client{}).Do(req) st.Expect(t, err, nil) st.Expect(t, res.StatusCode, 200) body, _ := ioutil.ReadAll(res.Body) st.Expect(t, string(body), "foo foo") // Verify that we don't have pending mocks st.Expect(t, gock.IsDone(), true)}JSON body matching and responsepackage testimport ( "bytes" "io/ioutil" "net/http" "testing" "github.com/nbio/st" "github.com/h2non/gock")func TestMockSimple(t *testing.T) { defer gock.Off() gock.New(" Post("/bar"). MatchType("json"). JSON(map[string]string{"foo": "bar"}). Reply(201). JSON(map[string]string{"bar": "foo"}) body := bytes.NewBuffer([]byte(`{"foo":"bar"}`)) res, err := http.Post(" "application/json", body) st.Expect(t, err, nil) st.Expect(t, res.StatusCode, 201) resBody, _. Ini akan memperbaiki masalah NET Err Cert Authority Tidak Valid NET Err Cert Common Name Invalid. Solusi 4. Impor SSL Sertifikat Tepercaya . Untuk Memperbaiki - Err_Cert_Authority_Invalid. Kelola Sertifikat. Pertama, periksa Исправить ошибку NET ERR CERT AUTHORITY INVALID, когда невозможно установить безопасное соединение в браузере Chrome, Edge иComments
META 구문 수행 시 송신자 메타 파일 또는 Restart SN 파일이 유효하지 않을 경우 반환하는 에러 메시지를 개선합니다.module : rp-oraAdapterCategory : Usability재현 빈도 : Always설명 : ALTER REPLICATION replication_name BUILD OFFLINE META 구문 수행 시 송신자 메타 파일 또는 Restart SN 파일이 유효하지 않을 경우 반환하는 에러 메시지를 개선합니다.송신자 메타 파일(replication_name_META_NEW.bin, replication_name_META_OLD.bin)이 모두 유효하지 않으면 ERR-611B3 : Invalid sender meta files. (Replication name: replication_name,File name: replication_name_META_NEW.bin, replication_name_META_OLD.bin ) 에러를, Restart SN 파일이 모두 유효하지 않을 경우 ERR-611B4 : Invalid Restart SN files. (Replication name: replication_name, File name: replication_name_SN_NEW.bin, replication_name_SN_OLD.bin ) 에러를 반환하도록 수정하였습니다.재현 방법재현 절차수행 결과송신자 메타 파일이 모두 유효하지 않을 때ERR-611B3 : There is no valid meta file.Restart SN 파일이 모두 유효하지 않을 때ERR-611B4 : There is no valid sn file.예상 결과송신자 메타 파일이 모두 유효하지 않을 때ERR-611B3 : Invalid sender meta files. (Replication name: replication_name, File name: replication_name_META_NEW.bin, replication_name_META_OLD.bin )Restart SN 파일이 모두 유효하지 않을 때ERR-611B4 : Invalid Restart SN files. (Replication name: replication_name, File name: replication_name_SN_NEW.bin, replication_name_SN_OLD.bin )Workaround변경사항Performance viewPropertyCompile OptionError Code에러 메시지가 추가되었습니다., File name: META_NEW.bin, META_OLD.bin ) # *Cause:# - Sender meta files do not exist or are invalid.# *Action:# - 'BUILD OFFLINE META' failed. Verify the altibase_rp.log.">0x611B3 ( 397747) rpERR_ABORT_ERR_NO_VALID_METAFILE Invalid sender meta files. (Replication name: , File name: META_NEW.bin, META_OLD.bin ) # *Cause:# - Sender meta files do not exist or are invalid.# *Action:# - 'BUILD OFFLINE META' failed. Verify the altibase_rp.log., File name: SN_NEW.bin, SN_OLD.bin ) # *Cause:# - Restart SN files do not exist or are invalid.# *Action:# - 'BUILD OFFLINE META' failed. Verify the altibase_rp.log.">0x611B4 ( 397748) rpERR_ABORT_ERR_NO_VALID_SNFILE Invalid Restart SN files. (Replication name: , File name: SN_NEW.bin, SN_OLD.bin ) # *Cause:# - Restart SN files do not exist or are invalid.# *Action:# - 'BUILD OFFLINE META' failed. Verify the altibase_rp.log.BUG-49718 비활성화 상태의 인덱스에 인덱스 통계 정보를 설정할 때 예외 처리를 추가합니다.module : smCategory : Fatal재현 빈도 : Always설명 : 비활성화 상태의 인덱스에 인덱스 통계 정보를 설정(SET_INDEX_STATS)하면 Altibase 서버가 비정상 종료하는 현상을 수정합니다. 비활성화 상태의 인덱스 경우 인덱스 통계 정보 설정을 수행해도 무시하도록 예외 처리를 추가합니다.재현 방법재현 절차DROP TABLE T1;CREATE TABLE T1 (I1 INTEGER);ALTER TABLE T1 ALL INDEX DISABLE;CREATE INDEX T1_IDX ON T1(I1);EXEC SET_INDEX_STATS('SYS', 'T1_IDX', NULL, NULL, 30, NULL, NULL, NULL, TRUE);수행 결과[ERR-91015 : Communication failure.]예상 결과Workaround변경사항Performance viewPropertyCompile OptionError CodeBUG-49722 SQL 반영 모드 및 오프라인 이중화에서 이중화 대상 테이블 간 PRIMARY KEY가 다른 경우 예외 처리를 추가합니다.module : rpCategory : Functional Error재현 빈도 : Always설명 : 이중화 대상 테이블 간 PRIMARY KEY가 다름에도 성공하는 다음 2가지 상황에 예외 처리를 추가합니다.SQL 반영 모드(REPLICATION_SQL_APPLY_ENABLE = 1)에서 이중화를 시작한 경우Adapter에서 BUILD OFFLINE META를 수행한 경우이 버그 반영 후에는 아래와 같은 에러 메시지가 발생합니다.SQL 반영 모드에서 이중화 시작한 경우 예이중화 송신자 측이중화 시작 시[ERR-6100D : [Sender] Failed to handshake with the peer server (The index
2025-04-06"ErrorResponse[USERNOTFOUND]", "description": " \nPossible errors:\n- `USERNOTFOUND`: user not found", "type": "object", "properties": { "state": { "type": "string", "enum": [ "err" ] }, "code": { "type": "string", "enum": [ "USERNOTFOUND" ] }, "msg": { "type": "string", "enum": [ "user not found" ] } } } ] } } } }, "numbers-info-response": { "description": "The resulting phone number\n \nPossible errors:\n- `INVALIDNUMBER`: invalid number", "content": { "application\/json": { "schema": { "oneOf": [ { "$ref": "#\/components\/schemas\/NumberObject" }, { "title": "ErrorResponse[INVALIDNUMBER]", "description": " \nPossible errors:\n- `INVALIDNUMBER`: invalid number", "type": "object", "properties": { "state": { "type": "string", "enum": [ "err" ] }, "code": { "type": "string", "enum": [ "INVALIDNUMBER" ] }, "msg": { "type": "string", "enum": [ "invalid number" ] } } } ] } } } }, "numbers-getContacts-response": { "description": "Contains objects in a listing form.\n \nPossible errors:\n- `NUMBERNOTFOUND`: number not found", "content": { "application\/json": { "schema": { "oneOf": [ { "$ref": "#\/components\/schemas\/ListingResult-ContactObject" }, { "title": "ErrorResponse[NUMBERNOTFOUND]", "description": " \nPossible errors:\n- `NUMBERNOTFOUND`: number not found", "type": "object", "properties": { "state": { "type": "string", "enum": [ "err" ] }, "code": { "type": "string", "enum": [ "NUMBERNOTFOUND" ] }, "msg": { "type": "string", "enum": [ "number not found" ] } } } ] } } } }, "sources-add-response": { "description": "The resulting source\n \nPossible errors:\n- `INSUFFICIENT_DATA`: insufficient data\n- `SOURCENOTFOUND`: source not found", "content": { "application\/json": { "schema": { "oneOf": [ { "$ref": "#\/components\/schemas\/SourceObject" }, { "title": "ErrorResponse[INSUFFICIENT_DATA|SOURCENOTFOUND]", "description": " \nPossible errors:\n- `INSUFFICIENT_DATA`: insufficient data\n- `SOURCENOTFOUND`: source not found", "type": "object", "properties": { "state": { "type": "string", "enum": [ "err" ] }, "code": { "type": "string", "enum": [ "INSUFFICIENT_DATA", "SOURCENOTFOUND" ] }, "msg": { "type": "string", "enum": [ "insufficient data", "source not found" ] } } } ] } } } }, "sources-get-response": { "description": "The resulting user\n \nPossible errors:\n- `SOURCENOTFOUND`: source not found", "content": { "application\/json": { "schema": { "oneOf": [ { "$ref": "#\/components\/schemas\/SourceObject" }, { "title": "ErrorResponse[SOURCENOTFOUND]", "description": " \nPossible errors:\n- `SOURCENOTFOUND`: source not found", "type": "object", "properties": { "state": { "type": "string", "enum": [ "err" ] }, "code": { "type": "string", "enum": [ "SOURCENOTFOUND" ] }, "msg": { "type": "string", "enum": [ "source not found"
2025-04-05= new WebSocketPair(); pair[1].accept(); pair[1].send(JSON.stringify({ error: err.stack })); pair[1].close(1011, "Uncaught exception during session setup"); return new Response(null, { status: 101, webSocket: pair[0] }); } else { return new Response(err.stack, { status: 500 }); } }}var src_default = { async fetch(request, env) { return await handleErrors(request, async () => { return handleWebSockets(request, env); }); }};async function handleWebSockets(request, env) { let id = env.group.idFromName("A"); let roomObject = env.group.get(id); let newUrl = new URL(request.url); return roomObject.fetch(newUrl, request);}var SessionGroup = class { constructor(state, env) { this.state = state; this.env = env; this.sessions = []; } async fetch(request) { return await handleErrors(request, async () => { const url = new URL(request.url); const user = url.searchParams.get("user"); if (request.headers.get("Upgrade") != "websocket") { return new Response("expected websocket", { status: 400 }); } let pair = new WebSocketPair(); await this.handleSession(pair[1], user); return new Response(null, { status: 101, webSocket: pair[0] }); }); } async handleSession(webSocket, name) { webSocket.accept(); let session = { webSocket, name }; this.sessions.push(session); webSocket.addEventListener("message", async (msg) => { try { if (session.quit) { webSocket.close(1011, "WebSocket broken."); return; } const payload = JSON.parse(msg.data); console.log(payload.protocol); switch (payload.protocol) { case "one-to-one": this.sendTo(msg.data, payload.endpoint, name); break; case "one-to-self": this.sendTo(msg.data, name, name); break; default: let alert = "Invalid protocol, valid protocol include: 'one-to-one', 'one-to-self', 'one-to-all'"; webSocket.send(alert); } } catch (err) { console.log(err); let alert = "Invalid protocol, valid protocol include: 'one-to-one', 'one-to-self', 'one-to-all'"; webSocket.send(alert); } }); let closeOrErrorHandler = (evt) => { session.quit = true; this.sessions = this.sessions.filter((member) => member !== session); }; webSocket.addEventListener("close", closeOrErrorHandler); webSocket.addEventListener("error", closeOrErrorHandler); } sendTo(message, receiver, sender) { if (receiver === "") { this.sessions.map((session) => { if (session.name) { try { session.webSocket.send(message); } catch (err) { console.log(err); } } }); } else { let sent = false; this.sessions.map((session) => { if (session.name === receiver) { try { session.webSocket.send(message); sent = true; } catch (err) { console.log(err); } }
2025-04-14Few possibilities exist for obtaining a certificate:Windows Server provides a Certificates snap-in that you can use to request a certificate from a trusted certificate authority.If you want to generate a certificate locally for testing purposes, you can run the following PowerShell script.Run the script as an administrator.Replace the placeholders with values that are appropriate for your environment.# Create a self-signed certificate in the local store.$newCertificate = New-SelfSignedCertificate -CertStoreLocation cert:\LocalMachine\My -DnsName -FriendlyName ""# Convert the report server password to a secure string.$secureStringPassword = ConvertTo-SecureString "" -AsPlainText -Force# Set up a temporary folder if one doesn't exist.$folderPath = "C:\Temp"if (-not (Test-Path -Path $folderPath)) { New-Item -Path $folderPath -ItemType Directory}# Set up a variable for the path of a certificate file.$certificateFilePath = $folderPath, "\certificate-export.pfx" -join ""# Set up a variable for the path of the certificate's store location.$certificateStoreLocation = "cert:\LocalMachine\My", $newCertificate.Thumbprint -join ""# Export the certificate to the file.Export-PFXCertificate -Cert $certificateStoreLocation -File $certificateFilePath -Password $secureStringPassword# Import the certificate from the file to the trusted root to avoid problems with the certificate not being trusted. Import-PfxCertificate -FilePath $certificateFilePath cert:\LocalMachine\Root -Password $secureStringPasswordThe certificate is now available for use in Report Server Configuration Manager.If you run IIS and SSRS together on the same computer, you can use the IIS Manager console application to request and install a certificate:In IIS Manager, create and package a certificate request (.crt) file for subsequent processing by a trusted certificate authority. For more information, see Request a Server Certificate.After the certificate authority sends you the certificate (.cer) file, use IIS Management
2025-04-23Checks // release the connection after queries are executed ps.unprepare(err => { // ... error checks }) })})IMPORTANT: Remember that each prepared statement means one reserved connection from the pool. Don't forget to unprepare a prepared statement when you've finished your queries!You can execute multiple queries against the same prepared statement but you must unprepare the statement when you have finished using it otherwise you will cause the connection pool to run out of available connections.TIP: You can also create prepared statements in transactions (new sql.PreparedStatement(transaction)), but keep in mind you can't execute other requests in the transaction until you call unprepare.input (name, type)Add an input parameter to the prepared statement.Argumentsname - Name of the input parameter without @ char.type - SQL data type of input parameter.Exampleps.input('input_parameter', sql.Int)ps.input('input_parameter', sql.VarChar(50))Errors (synchronous)EARGS (PreparedStatementError) - Invalid number of arguments.EINJECT (PreparedStatementError) - SQL injection warning.output (name, type)Add an output parameter to the prepared statement.Argumentsname - Name of the output parameter without @ char.type - SQL data type of output parameter.Exampleps.output('output_parameter', sql.Int)ps.output('output_parameter', sql.VarChar(50))Errors (synchronous)EARGS (PreparedStatementError) - Invalid number of arguments.EINJECT (PreparedStatementError) - SQL injection warning.prepare (statement, [callback])Prepare a statement.Argumentsstatement - T-SQL statement to prepare.callback(err) - A callback which is called after preparation has completed, or an error has occurred. Optional. If omitted, returns Promise.Example { // ... error checks})">const ps = new sql.PreparedStatement()ps.prepare('select @param as value', err => { // ... error checks})ErrorsENOTOPEN (ConnectionError) - Connection not yet open.EALREADYPREPARED (PreparedStatementError) - Statement is already prepared.ENOTBEGUN (TransactionError) - Transaction has not begun.execute (values, [callback])Execute a prepared statement.Argumentsvalues - An object whose names correspond to the names of parameters that were added to the prepared statement before it was prepared.callback(err) - A callback which is called after execution has completed, or an error has occurred. Optional. If omitted, returns Promise.Example { // ... error checks ps.execute({param: 12345}, (err, result) => { // ... error checks console.log(result.recordset[0].value) // return 12345 console.log(result.rowsAffected) // Returns number of affected rows in case of INSERT, UPDATE or DELETE statement. ps.unprepare(err => { // ... error checks }) })})">const ps = new sql.PreparedStatement()ps.input('param', sql.Int)ps.prepare('select @param as value', err => { // ... error checks ps.execute({param: 12345}, (err, result) => { // ... error checks console.log(result.recordset[0].value) // return 12345 console.log(result.rowsAffected) // Returns number of affected rows in case of INSERT, UPDATE or DELETE statement. ps.unprepare(err => { // ... error checks }) })})You can also stream executed request. { // ... error checks ps.stream = true const request = ps.execute({param: 12345}) request.on('recordset', columns => { // Emitted once for each recordset in a query }) request.on('row', row => { // Emitted for each row in a recordset }) request.on('error', err => { // May be emitted multiple times }) request.on('done', result => { // Always emitted as the last one console.log(result.rowsAffected) // Returns number of affected rows in case of INSERT, UPDATE or DELETE statement. ps.unprepare(err => { // ... error checks }) })})">const ps = new sql.PreparedStatement()ps.input('param', sql.Int)ps.prepare('select @param as value', err => { // ... error checks ps.stream = true const request
2025-04-13