Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. SSPI context

SSPI context

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpquestion
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Farah Mansor
    wrote on last edited by
    #1

    Hi all, :) I just create one program using timer and it connect to database to process something. I try to leave my program running one day, but what I get next morning is it prompt out a dialog box say "Cannot generate SSPI context". I don't know what it is.:confused: + X| +:(( Can anybody help me to resolve on this?? I really appriate it. Thank you. :rose: FM

    T 1 Reply Last reply
    0
    • F Farah Mansor

      Hi all, :) I just create one program using timer and it connect to database to process something. I try to leave my program running one day, but what I get next morning is it prompt out a dialog box say "Cannot generate SSPI context". I don't know what it is.:confused: + X| +:(( Can anybody help me to resolve on this?? I really appriate it. Thank you. :rose: FM

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      I just create one program using timer and it connect to database to process something. This means that you open database, write something, and close database every XXX seconds? Tomasz Sowinski -- http://www.shooltz.com

      F 1 Reply Last reply
      0
      • T Tomasz Sowinski

        I just create one program using timer and it connect to database to process something. This means that you open database, write something, and close database every XXX seconds? Tomasz Sowinski -- http://www.shooltz.com

        F Offline
        F Offline
        Farah Mansor
        wrote on last edited by
        #3

        Yes. But it will continue to loop after it finishing the task (open, write and close). This is done by using KillTimer and SetTimer back. :| Thanks in advance. p/s: My supervisor said it is because my program keep generating a user in the database until it exceeds the limit and gives me that dialog box saying "cannot generate SSPI context". Could this be the problem?? But I already check my code and I close every database that I open. X| +:confused: = :(( FM

        T 1 Reply Last reply
        0
        • F Farah Mansor

          Yes. But it will continue to loop after it finishing the task (open, write and close). This is done by using KillTimer and SetTimer back. :| Thanks in advance. p/s: My supervisor said it is because my program keep generating a user in the database until it exceeds the limit and gives me that dialog box saying "cannot generate SSPI context". Could this be the problem?? But I already check my code and I close every database that I open. X| +:confused: = :(( FM

          T Offline
          T Offline
          Tomasz Sowinski
          wrote on last edited by
          #4

          My supervisor said it is because my program keep generating a user in the database until it exceeds the limit and gives me that dialog box saying "cannot generate SSPI context". Could this be the problem?? Exactly, it looks like resource leak. SSPI == Security Support Provider Interface; it's used to "establish authenticated connections and to exchange data securely over those connections". To avoid problems with long period of time before error occurs, replace the timer and use database in a tight loop: you should see the problem much earlier. Tomasz Sowinski -- http://www.shooltz.com

          F 1 Reply Last reply
          0
          • T Tomasz Sowinski

            My supervisor said it is because my program keep generating a user in the database until it exceeds the limit and gives me that dialog box saying "cannot generate SSPI context". Could this be the problem?? Exactly, it looks like resource leak. SSPI == Security Support Provider Interface; it's used to "establish authenticated connections and to exchange data securely over those connections". To avoid problems with long period of time before error occurs, replace the timer and use database in a tight loop: you should see the problem much earlier. Tomasz Sowinski -- http://www.shooltz.com

            F Offline
            F Offline
            Farah Mansor
            wrote on last edited by
            #5

            :( How to replace the timer, and with what?? And can I know what do you mean by using database in a tight loop?? This application cannot be stopped or closed, unless there is a network connection error. Could be the network error?? X| Thank you so much for your help.:rose: FM

            T 1 Reply Last reply
            0
            • F Farah Mansor

              :( How to replace the timer, and with what?? And can I know what do you mean by using database in a tight loop?? This application cannot be stopped or closed, unless there is a network connection error. Could be the network error?? X| Thank you so much for your help.:rose: FM

              T Offline
              T Offline
              Tomasz Sowinski
              wrote on last edited by
              #6

              To diagnose and fix the error you need to make it easier to reproduce - waiting many hours for SSPI context error is a waste of time, right? Two solutions are possible: 1) easier: set the timer elapse period to 10 msec. 2) create an infinite loop that repeatedly calls database code. This will be marginally 'faster', but application will not respond to menu selections, etc. I'm not sure if automatic error detection tools like BoundsChecker can detect problems with SSPI. If you have such a tool, give it a try. Tomasz Sowinski -- http://www.shooltz.com

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups