When I try to select global temp table from win form application then I am able to read the table from any number of client, when I do the same from WCF service hosted in windows service, I am getting error saying that Invalid object name '##MyTempTable'.
At the same time I am able to select the table from winform with the same piece of code, will anyone explain me what could be possible reasons?
What ever I am trying to do from the dll can be done from the win form and I am not able to do from the dll used by WCF service.
Until connection who created your global temp table is live. Any other connection can access that global temp table. As soon as connection who created gloabl temp table is closed, this global temp table gets dropped automatically and any other connection trying to use it gets an exception saying Invalid object name.