InternetOpenUrl有时会挂起(WinInet:6.00.3790.3959) [英] InternetOpenUrl hangs once in a while (WinInet: 6.00.3790.3959)

查看:142
本文介绍了InternetOpenUrl有时会挂起(WinInet:6.00.3790.3959)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我们有一个应用程序(Windows服务),它使用InternetOpenUrl从Web服务器下载文件.有时,只有在Windows 2003 SP2上,该功能才会挂起.执行一些调试后,似乎它的调用堆栈中的功能之一 正在等待INFINITE超时的互斥锁.

We have an aplication (windows service) which uses InternetOpenUrl to download a file from a webserver. Once in a while, and only on Windows 2003 SP2 the function hangs. After performing some debugging it seems that one of the functions in its call stack is waiting on a mutex with INFINITE as a timeout.

这是WinDbg的堆栈跟踪

Here is the stack trace from WinDbg

0824ed78 7c827d0b 77e61d1e 00000a10 00000000 ntdll!KiFastSystemCallRet

0824ed7c 77e61d1e 00000a10 00000000 00000000 ntdll!NtWaitForSingleObject+0xc

0824edec 77e61c8d 00000a10 ffffffff 00000000 kernel32!WaitForSingleObjectEx+0xac

0824ee00 772149e5 00000a10 ffffffff 00000001 kernel32!WaitForSingleObject+0x12

0824ee18 77214949 0824ee38 00000001 00000000 WININET!URL_CONTAINER::LockContainer+0x27

0824ee54 77216dab 00000000 0824ee74 0824ee78 WININET!URL_CONTAINER::GetHeaderData+0x22

0824ee64 77216d60 0824ee74 00000000 00000000 WININET!GetCurrentSettingsVersion+0x2d

0824ee78 7722d1fa 00000000 00000000 76e44fd3 WININET!InternetSettingsChanged+0x12

0824efcc 7722d567 00000000 00000000 00000001 WININET!FixProxySettings+0x46

0824efec 77234713 00000000 011df078 01201310 WININET!FixProxySettingsForCurrentConnection+0x70

0824f01c 772383fb 011dc9b0 00000000 011df078 WININET!InternetAutodialIfNotLocalHost+0xe6

0824f090 77238318 00000000 0824f0b4 77229745 WININET!ParseUrlForHttp_Fsm+0x135

0824f09c 77229745 01201310 011df078 00000000 WININET!CFsm_ParseUrlForHttp::RunSM+0x2b

0824f0b4 772296fa 011df078 00000000 00000000 WININET!CFsm::Run+0x39

0824f0cc 7723812e 01201310 0824f5b8 030c8140 WININET!DoFsm+0x25

0824f118 013893c8 00cc0004 030c8140 00000000 WININET!InternetOpenUrlA+0x1dd

这是手柄上的可用信息:

This is the information avaliable on the handle:

0:051> !handle 00000a10 f

Handle a10

 Type   	Mutant

 Attributes 	0

 GrantedAccess	0x100000:

   Synch

   None

 HandleCount 	3

 PointerCount 	8

 Name   	\BaseNamedObjects\c:!documents and settings!default user!local settings!temporary internet files!content.ie5!

 Object Specific Information

 Handle does not have required access to query basic mutant information

 

有什么想法会导致这种情况吗?这是一个已知的错误,还是我做错了事?

Any ideas what could be causing this? Is this a known bug, or perhaps I'm doing something wrong

谢谢

-Kostya

推荐答案

Wininet api无法从服务应用程序中调用,因为这些api可能具有一些服务不支持的ui弹出窗口.您需要使用winhttp api在服务应用程序中执行http操作.
Wininet api cannot be invoked from a service application as these api's might have some ui popup which is not supported in service. You need to use the winhttp api to perform http operation within a service application.


这篇关于InternetOpenUrl有时会挂起(WinInet:6.00.3790.3959)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆