English 中文(简体)
SOAP 服务器无法在代理/防火墙后面正确工作
原标题:SOAP server couldn t work correctly behind some proxy/firewall

我有一个SOAP服务器/客户应用程序以德尔斐XE书写,在一段时间内运作良好,直到一个用户在Windows 7x64的代理/防火墙后面运行。应用程序发送和接收请求中的 TSOAPAttachment 对象。

问题:

  • Once the first request from this user is received and processed, the server could not process any request (from any user) successfully coming after this.
  • The server still response to the request, but the SOAPAttachment of the request seems corrupted after the first one from this user, that s why it couldn t process the request successfully.
  • After putting may debug logs to the server, I noticed the TSOAPAttachment.SourceStream in the request s parameter become inaccessible (or empty), and TSOAPAttachment.CacheFile also empty. Therefore whenever trying to use the SourceStream, it will return Access Violation error.
  • Further investigation found that the BorlandSoapAttachment(n) file generated in the temp folder by the first request still exist and locked (which should be deleted when a request is completed normally), and BorlandSoapAttachment(n+1) files of the following request are piling up.
  • The SOAP server will work again after restarting IIS or recycle the application pool.
  • It is quite certain that it is caused by the proxy or the user’s networks because when the same machine runs outside this networks, it will work fine.
  • To add more mystery to the problem, running the application on WinXP behind the same proxy have no problem AT ALL!

任何帮助或建议都十分感谢,因为我们在这种局势下已经坚持了一段时间。

提前多谢了

问题回答

如果您真的确定您调试了您所有处理附件的服务器逻辑, 试图找到任何可能具体在 Windows 7 上失败的代码, 我建议 :

(1) 使用某种网络嗅探器"http://www.wireshark.org/"rel="nofollow" >Wireshark对这项任务是有好处的 ,随后提出两项要求,同时使用相同的数据/参数值,并比较HTTP的内容。这项分析应在客户端(看数据是否总是使客户机具有相同的内容)和服务器上进行,以分析收到的数据;

2) 我过去也遇到过类似的情况,我试图真正理解这个问题的尝试并不成功。我确实解决了将文件发送为 Base64 编码字符串参数,而不是使用 SOAP 附录的问题。使用 Base64 将发送的数据大小增加~30%的侧面影响,如果您传输大文件,这可能很重要。

记住 SOAP 附录会在服务器上创建临时文件, 而 Windows 7 与 Windows XP 有着不同的文件访问规则 。 我不知道这是否可以解释第一个被处理的蚂蚁, 其他人没有, 但也许与文件访问有关 。

也许这是UAC(用户访问控制)在Win 7下的问题,





相关问题
determining the character set to use

my delphi 2009 app has a basic translation system that uses GNUGetText. i had used some win API calls to prepare the fonts. i thought it was working correctly until recently when someone from Malta ...

Help with strange Delphi 5 IDE problems

Ok, I m going nuts here. For the last (almost) four years, I ve been putting up with some extremely bad behavior from my Delphi 5 IDE. Problems include: Seemingly random errors in coride50.bpl ...

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How convert string to integer in Oxygene

In Delphi, there is a function StrToInt() that converts a string to an integer value; there is also IntToStr(), which does the reverse. These functions doesn t appear to be part of Oxygene, and I can ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签