Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Asp .Net Web 服务。在其方法中,我调用 SQL Server 的 HOST_ID() 函数来获取每个会话或连接的唯一 ID,但我为每个会话获取一个 ID。我怎样才能使它对每个 http 会话都是唯一的?
来自在线书籍:
返回工作站标识号。工作站标识号是连接到 SQL Server 的客户端计算机上的应用程序的进程 ID (PID)。
这不太可能是独一无二的。