Results 1 to 20 of 20

Thread: Manifest file

  1. #1

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Manifest file

    Schmidt gratuitously gave me this code for creating a manifest file:

    Code:
    Option Explicit
    
    Private Declare Function CLSIDFromProgID Lib "ole32" (ByVal psProgID As Long, pClsID As Any) As Long
    Private Declare Function StringFromGUID2 Lib "ole32" (pClsID As Any, ByVal pStr As Long, ByVal sLen As Long) As Long
    
    Private Sub Form_Load()
      Debug.Print MakeSimpleManifest("Serverlib.cAsp")
    End Sub
    
    Function MakeSimpleManifest(ByVal ProgID As String) As String
    Dim S As String
        S = S & "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>"
        S = S & "<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>"
        S = S & "  <file name = '" & Split(ProgID, ".")(0) & ".dll' >"
        S = S & "    <comClass progid = '" & ProgID & "' clsid = '" & ProgId2ClsId(ProgID) & "'  threadingModel = 'Apartment' />"
        S = S & "  </file>"
        S = S & "</assembly>"
        MakeSimpleManifest = Replace(Replace(S, "'", """"), ">", ">" & vbCrLf)
    End Function
     
    Function ProgId2ClsId(ByVal ProgID As String) As String
      Dim ClsID(0 To 15) As Byte
          CLSIDFromProgID StrPtr(ProgID), ClsID(0)
     ProgId2ClsId = Space$(38) 
      StringFromGUID2 ClsID(0), StrPtr(ProgId2ClsId), Len(ProgId2ClsId) + 1
    End Function
    However, it does not pick up my dll classID.
    In the redlighted code line, I presume I must add some number to ClsID(0) or a program ID. I am not sure.

    Here is my manifest file:

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
      <file name = "C:\inetpub\wwwroot\asp\ServerLib.dll" >
        <comClass progid = "C:\inetpub\wwwroot\asp\ServerLib.dll" clsid = "{00000000-0000-0000-0000-000000000000}"  threadingModel = "Apartment" />
      </file>
    </assembly>

    Thanks
    PK

  2. #2
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,156

    Re: Manifest file

    Your current "Serverlib.cAsp" argument is probably not a registered ProgID, i.e. it cannot be instantiated w/ CreateObject("Serverlib.cAsp") for instance.

    You can fool-proof ProgId2ClsId with a strategic Debug.Assert like this

    Function ProgId2ClsId(ByVal ProgID As String) As String
    Dim ClsID(0 To 15) As Byte
    Debug.Assert Not CreateObject(ProgID) Is Nothing '<---- ProgID is not registered
    CLSIDFromProgID StrPtr(ProgID), ClsID(0)
    ProgId2ClsId = Space$(38)
    StringFromGUID2 ClsID(0), StrPtr(ProgId2ClsId), Len(ProgId2ClsId) + 1
    End Function

    cheers,
    </wqw>

  3. #3

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: Manifest file

    It says under .assert that it cannot create the object. I have registered it and it still gives me the same error.

  4. #4
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,253

    Re: Manifest file

    The two helper-functions are supposed to be run on your dev-machine -
    (in a kind of "post-compile-step", to prepare for "deployment to a non-local running IIS-instance").

    I assume, that "everything still works" in your "Test-VB6-ProjectGroup"?

    If yes, you should:
    - first compile the Serverlib-(VB6-ActiveX-Dll)-Project into a "real *.dll" on your Dev-Machine.
    - this should already take care of "proper registering of the Serverlib.dll"-file on your Dev-machine.
    - now you could try to produce the content of the Serverlib.manifest file, using: MakeSimpleManifest "Serverlib.cASP"

    All on your dev-machine...

    The purpose of that manifest-content-creation is, that you will be able, to
    "move to a different, non-local-IIS-installation" (on a different machine),
    without having to register anything.

    Just copy the two files:
    - Serverlib.dll ... and
    - Serverlib.manifest

    over to the proper location on your new IIS-installation.
    (after configuring the IIS-instance there, to run a 32Bit-Application-Pool)

    Looking at the result of your produced manifest-content, it seems you are passing it the FileName of the Dll-File.
    That's wrong - since the Parameter-Name demands "something else".

    If in doubt, what a "ProgID" is, just google it using [VB6 ProgID]


    HTH

    Olaf

  5. #5

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: Manifest file

    I just can't get the remote server on the local network to access the SQL server database.

    I have the files Serverlib.dll and Serverlib.manifest on the remote server in the /bin folder and I have the file Serverlib.asp in the asp folder:

    Serverlib.asp
    Code:
    <% @EnableSessionState=False %>
    <%
      On Error Resume Next
      'try to create the SxS-Object - and provide it with the Libs-manifest-file
      Dim SxS: Set SxS = Server.CreateObject("Microsoft.Windows.ActCtx") 
          SxS.Manifest = Server.MapPath("/bin/ServerLib.manifest")
    
          'now instantiate a cASP-instance regfree via SxS - and call its HandleRequest-routine
          SxS.CreateObject("ServerLib.cASP").HandleRequest Application, Server, Request, Response
     
      If Err Then Response.Write "Error: " & Err.Description
    %>

    Here is the manifest file Serverlib.manifest:
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
      <file name = "Serverlib.dll" >
        <comClass progid = "Serverlib.cASP" clsid = "{64ECAD6B-BA05-48E2-BCE7-1179A4398510}"  threadingModel = "Apartment" />
      </file>
    </assembly>
    I have configured the remote server IIS default application pool to 32 bit.

    It gives me the error that it cannot create the Active X object (on the server)

    Is there a way I can monitor the progress of the process on the remote server?

    Thanks
    PK
    Last edited by Peekay; Dec 15th, 2019 at 12:00 AM.

  6. #6

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: Manifest file

    To Schmidt:

    The two helper-functions are supposed to be run on your dev-machine -
    (in a kind of "post-compile-step", to prepare for "deployment to a non-local running IIS-instance").
    Can you be more specific of the two helper functions you refer to and elborate on the meaning of the post-compile-step.
    My understanding is that, after I compiled Serverlib.dll, which I have done, I should detach the server side Serverlib project from the project group and just change the URL to that of the new server.
    Can I then still use my VB6 client project to test the new server functions in Serverlib.dll?

  7. #7
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,253

    Re: Manifest file

    Quote Originally Posted by Peekay View Post
    Can you be more specific of the two helper functions you refer to and elborate on the meaning of the post-compile-step.
    I've referred to the Manifest-creating functions - and in other environments/compilers one can often define a
    "post-compile-script" (in the project-settings), which then runs immediately after you pressed the compile-button in the IDE.
    (e.g. manifest-generating "actions" would be ideal to place in such a post-build-script, ... in VB6 I do it manually).

    Quote Originally Posted by Peekay View Post
    My understanding is that, after I compiled Serverlib.dll, which I have done, I should detach the server side Serverlib project from the project group ...
    There is no need to "break up your debug-group".
    Just close it, and start the client-exe-project isolated.

    This should already use the compiled (and therefore automatically registered) version of your Dll on your local IIS-instance.

    Quote Originally Posted by Peekay View Post
    ...and just change the URL to that of the new server.
    Can I then still use my VB6 client project to test the new server functions in Serverlib.dll?
    Before you switch your client-project to the new Server-URL, I'd test it on your local IIS-instance first:
    - once in registered mode (which should be automatically the case, after a fresh compile).
    - and once in regfree-mode on your local IIS-instance
    ...(switching to the manifest-based *.asp-script, after placing Serverlib.dll and Serverlib.manifest in c:\intepub\wwwroot\bin\)

    Only after that worked well, I'd change the URL in your Client-Project to test against a different IIS-instance in your LAN.
    (and also there, I'd test it in the above two modes, using the different *.asp scripts for registered and regfree mode).

    Please note, that the regfree mode is only there for (IIS-hosting-)machines, where you do not have the rights (or the access), to run regsvr32.exe in Admin-mode.
    If you do have "registry-writing-rights" (if you can run regsvr32.exe), then I'd always go with the registered version (without manifests) of a server-dll
    (it's the faster mode for the IIS).

    Oh, and in case you're using the RC5-libs at the serverside (e.g. in your Upload/Download functionality), here the same thing applies -
    (try to use a registered version of the RC5 on the IIS-machine - only if that's not possible, should you use regfree loading-mechnisms for RC5 on an IIS-host).

    HTH

    Olaf

  8. #8

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: Manifest file

    Olaf,

    Thanks so much. It is indeed a very lucid explanation.

    Before you switch your client-project to the new Server-URL, I'd test it on your local IIS-instance first:
    - once in registered mode (which should be automatically the case, after a fresh compile).
    - and once in regfree-mode on your local IIS-instance
    ...(switching to the manifest-based *.asp-script, after placing Serverlib.dll and Serverlib.manifest in c:\intepub\wwwroot\bin\)
    The Client project works perfectly in both the Project group attached and in the Client project with no server group attached.
    I have the Serverlib.dll and the Manifest file available in the c:\intepub\wwwroot\bin\ folder.

    I presume it automatically uses the manifest file in the Serverlib.asp file quoted in post #5.

    For testing without the Manifest file and without specifically registering the Serverlib.dll group, how do I change the Serverlib.asp file to 'forget' about the Manifest file? I have recompiled the Serverlib.dll without registering and placed it in the same folder quoted above, but it then gives me an error related to not opening a recordset in the database which is the first call to the server in my applicaion.


    PK
    Last edited by Peekay; Dec 15th, 2019 at 05:25 AM.

  9. #9
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,253

    Re: Manifest file

    Quote Originally Posted by Peekay View Post
    ...how do I change the Serverlib.asp file to 'forget' about the Manifest file?
    Well, you can of course place more than one single *.asp File in your IIS-wwwroot\asp\ Folder.

    The original one (named ServerLib.asp) I would not change from its original content -
    it already covers both -> the "registered" and also the "debug-project-group"-modes.
    Code:
    <% @EnableSessionState=False %>
    <%
       On Error Resume Next
          Server.CreateObject("ServerLib.cASP").HandleRequest Application, Server, Request, Response
       If Err Then Response.Write "Error: " & Err.Description
    %>
    The other (manifest-based) content of your asp-Script, I'd place in a File named: wwwroot\asp\ServerLib_regfree.asp
    (and only this asp-file would then expect the Dll and the manifest in the wwwrot\bin folder)

    After the two *.asp-Files sit side-by-side in your /asp-folder, you can simply specify which mode you want to use,
    in the RPC-URL of the Client.

    Your Client-App should implement a way, that it reads its RPC-Base-URL from an ini-File or via an "In-App-Settings-Screen",
    which is "user-editable" - so that you don't have to recompile your Client-App:
    - in case you just want to direct it to another WebServer-IP
    - and also in case you want to change the last parts of the URL from /ServerLib.asp to /ServerLib_regfree.asp


    Quote Originally Posted by Peekay View Post
    ...it then gives me an error related to not opening a recordset in the database which is the first call to the server in my applicaion.
    I'd implement a number of Test-Functions in your Server-Dll, starting from stuff like:
    - just returning a simple String via RPC, or AddTwoLongs
    - over File-check-functions (which check serverside-directory-structures, whether "everything is there, in the right places"
    - up to your DB-stuff (functions to test connection-strings for your serverside Cnn, etc.)

    In your case (since you use MS-SQLServer), it's not that simple as a "local DB, sitting in a Folder behind wwwroot" (like possible with SQLite or ADO/JET-mdb) -
    instead you will have to check, whether the SQLServer in question is "reachable" from inside IIS - no matter if its a local SQLServer-instance, or one on a different machine in your LAN).

    Such "reachability-checks" (where you test out the right connection-string) can be done also via simple *.vbs-Files (e.g. placed on the RemoteDesktop of the IIS-hosting-machine in question):
    Code:
    'begin VBScript-Code
    Dim Cnn
    Set Cnn = CreateObject("ADODB.Connection")
        Cnn.Open "Test-your-Connection-String here"
    'end of VBScript-Code
    Same thing as previously said about the "RPC-URL" (which should be editable on your Clients at least by "admin-folks") -
    applies here as well...:
    - find a way, to make the SQLServer-Connection-String adjustable without recompiling the Server-Dll(s).

    HTH

    Olaf

  10. #10

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: Manifest file

    What I cannot understand is that my project group works fine on the localhost, but as soon as I use only the client, it does not find the database error. Maybe it cannot create the object in the .asp file, although it does not give me such an error.
    I registered the serverlib.dll, made a manifest file and put both in the /bin folder. I also tried with the normal and the regfree .asp files. There should not be an error in such a case I think.

    PK

  11. #11
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,253

    Re: Manifest file

    Quote Originally Posted by Peekay View Post
    What I cannot understand is that my project group works fine on the localhost, but as soon as I use only the client, it does not find the database error. Maybe it cannot create the object in the .asp file, although it does not give me such an error.
    I registered the serverlib.dll, made a manifest file and put both in the /bin folder. I also tried with the normal and the regfree .asp files. There should not be an error in such a case I think.
    You have to be more clear in your description, "where you registered, or run what" (part of the client- or server-binaries).

    Let's say, your dev-machine is named "HostDev" and your other (newly configured) Server-machine is named "HostNew"
    (both having different IPs as well)...

    Further above you wrote, that "local-mode" on your "HostDev" was working just fine (even when not run via the Debug-Project-Group).
    Is that still the case?

    If yes, you have worked successfully with a:
    - Client-App on "HostDev"
    - against the IIS-instance on "HostDev"
    via an appropriate URL...
    Please note (or better post here) this URL you used in that successful test.
    The same goes for the SQLServer-instance - please post the Connection-String you used in that successful test.

    Now, let's "move on" to the other (Server-)-machine with your newly configured IIS-instance (using the name "HostNew").

    When you say, you "registered everything", then I assume this was on "HostNew", right?
    And hoepfully you included the vbRichClient5.dll (along with its two satellite-Dlls) in your registering on "HostNew"?

    Then you've hopefully placed the two *.asp-scripts in c:\inetpub\wwwroot\asp\... on "HostNew"?
    And have configured the IIS-instance on "HostNew"to use a 32bit-default-ApplicationPool?

    If yes, you should place a simple html-file (with "Hello-World"-content) named as "index.html" in your "HostNew" ...\wwwroot\ folder.

    Now open a local Browser on "HostNew" and paste the URL [http://localhost/index.html] into the Browsers AddressBar.
    It should show "Hello World" (or whatever you've put into the test-file named "index.html").

    If that worked, then you should try the same Browser-test with a Browser-instance on your "HostDev"-machine
    (but now giving a different URL like: [http://ComputerName_of_HostNew/index.html] or [http://Numeric.IP.of.HostNew/index.html]
    If you do not get the same result ("Hello World") as when doing the local-browser-test, then Port 80 is not yet opened in the FireWall of your "HostNew"-machine.

    If the Browser on your HostDev-machine does indeed show the "Hello World" response, then make sure you have specified the exact same URL in your RPCClientApp, which runs on HostDev (just with a different "suffix-part", which specifies ".../asp/Serverlib.asp" instead of ".../index.html".

    In other words ... please ensure the basic things first, step by step (always being aware, that you'll be finally doing a "cross-machine-call").

    HTH

    Olaf

  12. #12

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: Manifest file

    Oladf,
    Thanks for your detailed and elaborate help in the above two posts. I appreciate it.
    Yes, previous all the instances on my localhost worked, but not anymore.
    I have found the problem. My database got currupted and I was not aware of it. I am still trying to find out why.
    I have fixed the database now and will follow the process again from the start.

    Thanks
    PK
    Last edited by Peekay; Dec 17th, 2019 at 05:20 AM.

  13. #13

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: Manifest file

    Let me state my steps clearly - sorry.

    1. The project group on HostDev works perfectly.
    2. Next I compiled the servelib.dll file on the HostDev and place it in the asp/bin/ folder of the HostDev.
    3. Next I registered the serverlib.dll
    4. Then I made the serverlib.manifest file of the serverlib.casp and put it in the same asp/bin/ folder of the HostDev.
    5. Then I opened the Client project alone and run it with one of the following URL's in turn:

    RPC.RPCUrl = "http://localhost/asp/ServerLib.asp"
    RPC.RPCUrl = "http://localhost/asp/ServerLib_regfree.asp"

    This is my serverlib.asp file:

    Code:
    <% @EnableSessionState=False %>
    <%
       On Error Resume Next
          Server.CreateObject("ServerLib.cASP").HandleRequest Application, Server, Request, Response
       If Err Then Response.Write "Error: " & Err.Description
    %>
    This is my serverlib_regfree.asp file:

    Code:
    <% @EnableSessionState=False %>
    <%
      On Error Resume Next
      'try to create the SxS-Object - and provide it with the Libs-manifest-file
      Dim SxS: Set SxS = Server.CreateObject("Microsoft.Windows.ActCtx") 
          SxS.Manifest = Server.MapPath("/bin/ServerLib.manifest")
    
          'now instantiate a cASP-instance regfree via SxS - and call its HandleRequest-routine
          SxS.CreateObject("ServerLib.cASP").HandleRequest Application, Server, Request, Response
     
      If Err Then Response.Write "Error: " & Err.Description
    %>
    This is my serverlib.manifest file:

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
      <file name = "Serverlib.dll" >
        <comClass progid = "Serverlib.cASP" clsid = "{37CA34C8-4F22-4836-A219-D77FC4D60BBC}"  threadingModel = "Apartment" />
      </file>
    </assembly>
    When I run the Client project on the HostDev machine I get the following error:
    DB connection info not found.

    I know it worked previously, but not anymore, as is par for the course.
    I have a firewall in place and opened ports 1433, 80 and 81, but I do not think that is necessary if I go through the IIS.

    Thanks
    PK

  14. #14
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,253

    Re: Manifest file

    Quote Originally Posted by Peekay View Post
    1. The project group on HostDev works perfectly.
    2. Next I compiled the servelib.dll file on the HostDev and place it in the asp/bin/ folder of the HostDev.
    3. Next I registered the serverlib.dll
    Step 3 is not necessary on HostDev, because Step 2 (compiling in the IDE) already ensures proper registering.

    Quote Originally Posted by Peekay View Post
    4. Then I made the serverlib.manifest file of the serverlib.casp and put it in the same asp/bin/ folder of the HostDev.
    When you place the Binaries and Manifests in a SubFolder of /asp (... -> /asp/bin/... and not in wwwroot/bin/),
    then you will need to adjust the Server.MapPath-call in ServerLib_regfree.asp appropriately to:
    SxS.Manifest = Server.MapPath("/asp/bin/ServerLib.manifest")

    But please leave the regfree mode out of it for a first test.

    Just do Step 2 (and not Step 3) ... and then:
    - Close the Debug-ProjectGroup
    - Restart the IIS from the IIS-Management-GUI
    - And then start only the Client-Project (either compiled or in the IDE)
    - with the correct RPCUrl for registered Mode

    Only if that mode works, try to continue with the regfree-test...
    (which does not require any extra-registering either, just get the Paths right - and don't forget to adapt the new RPC-URL).

    HTH

    Olaf

  15. #15

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: Manifest file

    Olaf,

    Just do Step 2 (and not Step 3) ... and then:
    - Close the Debug-ProjectGroup
    - Restart the IIS from the IIS-Management-GUI
    - And then start only the Client-Project (either compiled or in the IDE)
    - with the correct RPCUrl for registered Mode
    I do exactly as you say and it works fine in the project group, but as soon as I go to the Client project alone in the VB6 IDE, then I get this error on the first call to the database:
    DB-Connection-Info not found

    and I cannot follow the process in the serverlib.dll to see where it goes wrong.

    PK

  16. #16
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,253

    Re: Manifest file

    Quote Originally Posted by Peekay View Post
    ...I get this error on the first call to the database:
    DB-Connection-Info not found
    Please post the entire code of you current cASP.cls (in "code-tags").

    Olaf

  17. #17

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: Manifest file

    Please post the entire code of you current cASP.cls (in "code-tags").
    Here is the complete code for cASP.cls:

    Code:
    Option Explicit 'in this "Main-Entry-Class" we just delegate further into a Handler-Class (cHandler)
    
    Public Sub HandleRequest(Application As Object, Server As Object, Request As Object, Response As Object)
    On Error Resume Next
    Dim Handler As New cHandler 'fill a new Handler-Instance with the (deserialized) incoming RsParams (which were set at the clientside)
    
    Set Handler.RsIn = GetRsFromByteContent(Request.BinaryRead(Request.TotalBytes))
          
    Handler.AppID = Request.ServerVariables("HTTP_RPC-AppID")
    Handler.CustomerID = Request.ServerVariables("HTTP_RPC-CustomerID")
    Handler.UserName = Request.ServerVariables("HTTP_RPC-UserName")
    Handler.UserToken = Request.ServerVariables("HTTP_RPC-UserToken")
      
    'Dim ConnStringSettingsDB As String
    ConnStringSettingsDB = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DBlinks\asp.mdb"
    'Dim CnnSettings As ADODB.Connection
    'Dim RsSettings As ADODB.Recordset
    
    Set CnnSettings = modADODB.OpenJetCnn(ConnStringSettingsDB)
    Set RsSettings = modADODB.GetRs(CnnSettings, "Select CnnString From CnnStrings Where AppID=? And CustomerID=?", Handler.AppID, Handler.CustomerID)
    If RsSettings.RecordCount = 0 Then    'we have not found a valid Cnn for the given AppID and CustomerID
       Response.BinaryWrite GetByteContentFromRs(CreateErrorRs("DB-Connection-Info not found", vbObjectError))
       Err.Clear
       Exit Sub
    End If
    Err.Clear
    
    'we have found a record with a valid Connections-String in our Settings-DB
    strConn = RsSettings(0)
    Set Handler.Cnn = OpenCnn(CStr(RsSettings!CnnString.Value), Handler.UserName, Handler.UserToken)         'let's try to set the Cnn-Object-Property in the Handler-Class
    
    If Err Then 'Error establishing the specific Handler-Connection for this request
       Response.BinaryWrite GetByteContentFromRs(CreateErrorRs(Err.Description, Err.Number))
       Err.Clear
       Exit Sub
    End If
    Err.Clear
    
    
    'since the incoming Rs contains the ProcedureName as a String, we use that in a CallByName-call on the Handler-Instance
    CallByName Handler, Handler.RsIn!ProcName.Value, VbMethod
    
    If Err Then
      Response.BinaryWrite GetByteContentFromRs(CreateErrorRs(Err.Description, Err.Number))
      Err.Clear
    ElseIf Not Handler.RsOut Is Nothing Then
      Response.BinaryWrite GetByteContentFromRs(Handler.RsOut)
    End If
    
    End Sub
    Here are the parameters sent to this HandleRequest:

    Code:
        'new, Dll-Handler-Specific Extra-Headers:
        http.SetRequestHeader "RPC-AppID", "IDMStemplate"
        http.SetRequestHeader "RPC-CustomerID", "Peka+12093"
        http.SetRequestHeader "RPC-UserName", "Peka"
        http.SetRequestHeader "RPC-UserToken", "2462"
    The Access database is saved under .../asp/DBlinks/asp.mdb
    and the 'ConnStringSettingsDB' in cASP.cls is : Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\wwwroot\asp\DBlinks\asp.mdb

    PK
    Last edited by Peekay; Dec 19th, 2019 at 05:55 AM.

  18. #18
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,253

    Re: Manifest file

    Quote Originally Posted by Peekay View Post
    Code:
     
    '...
    ConnStringSettingsDB = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DBlinks\asp.mdb"
    '...
    The Access database is saved under .../asp/DBlinks/asp.mdb
    and the 'ConnStringSettingsDB' in cASP.cls is :
    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\wwwroot\asp\DBlinks\asp.mdb
    No ConnStringSettingsDB is not (really): C:\inetpub\wwwroot\asp\DBlinks\asp.mdb

    Instead it is a concat of the ServerLibs App.Path with "\DBlinks\asp.mdb" (I've marked the part in your SourceCode above blue).

    Well, where does App.Path resolve to (when called in an AX-Dll-Project)?

    1) When the Dll(-Project) is is run in "IDE-Debug-Mode" (e.g. as "part of a project-grop") -
    ... App.Path resolves to the path, where ServerLib.vbp is placed.

    2) When the Dll is used as a Binary in "registered-mode" (e.g. when you run the Client-Project only, and not the Group) -
    ... App.Path called from within the ServerLib.dll resolves to the path, where the ServerLib.dll was registered...
    ... (after a fresh compile, this is identical with the Compile-Path - since the IDE does auto-registering)

    3) When the Dll is used as a Binary in "regfree-mode" (e.g. via Serverlib.manifest) -
    ... App.Path resolves to the path, where the copy of the ServerLib.dll was placed (alongside the Serverlib.manifest).

    HTH

    Olaf

  19. #19

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: Manifest file

    Thank you for the touch of the master!!

  20. #20

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: Manifest file

    Olaf,

    My program group in VB6 IDE, client program in VB6 IDE and compiled client all work with serverlib.asp and serverlib_regfree.asp.
    Can you please give me the steps to migrate to the remote server now. I see I cannot just copy the serverlib.dll to that server and register it.

    Here is my remote ping:

    Name:  RemotePing.jpg
Views: 159
Size:  9.9 KB

    Here is the result of the VBscript I sent to the remote (local) server.

    Name:  RemoteVBS.jpg
Views: 202
Size:  18.5 KB


    Thanks
    PK
    Last edited by Peekay; Dec 19th, 2019 at 05:21 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width