MID Server Remote File Import

Filip Laznicka
Tera Guru

Hello,

I'm using OOTB MID Server Script Include called MIDServerRemoteFileImport to get a file from a MID Server and I'm getting this error in ECC queue result:

<results error="HTTP response 403 (script_include:MIDServerRemoteFileImport; line 24)" probe_time="12703" result_code="900000">

<result error="HTTP response 403 (script_include:MIDServerRemoteFileImport; line 24)">

<output>Evaluation error: HTTP response 403 (script_include:MIDServerRemoteFileImport; line 24)</output>

The code in the script include:

    getRemoteFileAndUploadToInstance: function() {

          var url = this._getInstanceConnectionURL();

          var conn = this._getURLConnection(url);

          var file = this._getFile();

          var response = this._writeFile(conn, file);

          if (response != 200)

                throw "HTTP response " + response;         /////LINE 24

          this.logMsg("HTTP response " + response, "debug");

         

          ms.log("Completed MID Server File Transfer");

          return response;

    },

It works on dev environment but it doesn't work on test or production.

Has anyone got a clue what is wrong?

Thanks

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Filip,



Are you using same mid server for Dev and Production?


Can you check you have access to that script include because error 403 means forbidden and comes if you don't have access to the page etc



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

13 REPLIES 13

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Filip,



Are you using same mid server for Dev and Production?


Can you check you have access to that script include because error 403 means forbidden and comes if you don't have access to the page etc



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Filip,



Any update on this?


Can you mark answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.



Regards


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,



yes, thank you. You were right. Problem was with access rights.


I had to change the user that MID Server uses to connect to the instance.



Regards,


Filip


Hi Filip.


Please can you share the steps to do the remove file import through midserver. I need to import data from external system.


Please share the info.


Thanks,


Naga