Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / December 2005

Tip: Looking for answers? Try searching our database.

.NET 2.0/csc.exe/SoapHttpClientProtocol hangs for 15-20 seconds (compared to .NET 1.1) under Citrix

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Leon Finker - 09 Dec 2005 03:38 GMT
Hi,

I have a problem where creating a webservice proxy class takes from 15-20
seconds. This happens under Citrix environment. I was able to see what
csc.exe is doing. I'm not 100% sure if I caught it at the right moment. Let
me know if more info is needed. Here is the callstack:

ntdll!NtWaitForSingleObject+0xc
cryptnet!I_CryptNetIsConnected+0x205
cryptnet!I_CryptNetIsConnected+0x104
cryptnet!CryptGetObjectUrl+0x4b9
cryptnet!I_CryptNetIsConnected+0x187e
cryptnet!CryptGetObjectUrl+0x319
cryptnet!CryptGetObjectUrl+0x273
cryptnet!CryptGetTimeValidObject+0xa0
cryptnet!CryptGetTimeValidObject+0x4d
cryptnet!I_CryptNetIsConnected+0xef0
cryptnet!CertDllVerifyRevocation+0x38c
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for
C:\WINDOWS\system32\CRYPT32.dll -
cryptnet!CertDllVerifyRevocation+0x101
CRYPT32!CertVerifyCertificateChainPolicy+0x14b0
CRYPT32!CertVerifyRevocation+0xb5
CRYPT32!I_CryptCreateLruCache+0x34b0
CRYPT32!I_CryptCreateLruCache+0x5175
CRYPT32!I_CryptCreateLruCache+0x7006
CRYPT32!I_CryptCreateLruCache+0x8a2a
CRYPT32!I_CryptCreateLruCache+0x8a7b

The process that calls csc.exe is in:
0012f538 7ffe0304 [HelperMethodFrame_1OBJ: 0012f538]
System.Threading.Monitor.Enter(System.Object)
0012f590 69919900
System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()

Do I need to disable cert revocation verification in registry (i don't
remember how to do it)? Is this a known problem? How can I work around this?
This appears to be the only problem so far under Citrix. Thanks for any
help!
Leon Finker - 09 Dec 2005 04:20 GMT
Another thread in csc.exe has the following callstack:

ntdll.dll!NtWaitForSingleObject+0xc
mswsock.dll+0x39d1
ws2_32.dll!select+0x99
WINHTTP.dll!WinHttpReceiveResponse+0xc613
WINHTTP.dll!WinHttpReceiveResponse+0xc762
WINHTTP.dll!WinHttpReceiveResponse+0x855e
WINHTTP.dll!WinHttpTimeToSystemTime+0x6407
WINHTTP.dll!WinHttpReceiveResponse+0x855e
WINHTTP.dll!WinHttpTimeToSystemTime+0x8169
WINHTTP.dll!WinHttpReceiveResponse+0x855e
WINHTTP.dll!WinHttpTimeToSystemTime+0x6de5
WINHTTP.dll!WinHttpReceiveResponse+0x855e
WINHTTP.dll!WinHttpTimeToSystemTime+0x28b2
WINHTTP.dll!WinHttpReceiveResponse+0x8668
WINHTTP.dll!WinHttpSetOption+0x573
WINHTTP.dll!WinHttpSendRequest+0x1db
cryptnet.dll!I_CryptNetEnumUrlCacheEntry+0x1ebd
csc.exe+0x10053

The Citrix machine doesn't have connectivity to the outside.

> Hi,
>
[quoted text clipped - 36 lines]
> This appears to be the only problem so far under Citrix. Thanks for any
> help!
Steven Cheng[MSFT] - 09 Dec 2005 12:16 GMT
Hi Leon,

Welcome to MSDN newsgroup.
From your description you're encountering some problem when creating
webservice proxy in a .net 2.0 application, which will take long time with
no responding ....  ,yes?

Are you generating the webservcie proxy through VS2005 or the wsdl.exe
tool?  Also, I think this should be a service specific behavior. Can you
repro the problem through a simplified WSDL document?  If so, it'd be
helpful if you can provide us this one so that we can have some test on our
side...

Thanks,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Leon Finker" <Leon@nospam.nospam>
| References: <#YQz4HH$FHA.344@TK2MSFTNGP11.phx.gbl>
| Subject: Re: .NET 2.0/csc.exe/SoapHttpClientProtocol hangs for 15-20
seconds (compared to .NET 1.1) under Citrix
| Date: Thu, 8 Dec 2005 23:20:51 -0500
| Lines: 68
[quoted text clipped - 73 lines]
| > This appears to be the only problem so far under Citrix. Thanks for any
| > help!
Leon Finker - 09 Dec 2005 13:10 GMT
No, the proxy class was generated in .NET 1.1 and I'm running .NET 1.1
assemblies under .NET 2.0 by specifying the requiredRuntime in .config file.
We are also doing our own CLR hosting and specifying 2.0 version (but that
shouldn't matter). So, all of the assemblies are .NET 1.1 assemblies. But
same code works fine on non Citrix machine under same conditions otherwise.
Yes, the problem definitely occurs when I create web service proxy which has
structures for web method parameters. In this case csc.exe has to be invoked
to generate the code for xml serialization of those structures. It's not
just csc.exe that blocks on something.

The code in SoapHttpClientProtocol..ctor() also blocks and waits for
something before even creating the csc.exe process.

Just to clarify, the problem is not in the invocation of web method. The
problem is in creating the class object (i.e.: SomeSvc svc = new
SomeSvc() ). I have isolated just web proxy class object creation line as
the culprit (that's for sure).

As far as I saw, it didn't happen under admin account that I use for
development/debugging under Citrix. Only happens under regular AD User
accounts that are created for Citrix . I'll gather more information and
update the post.

Thanks for getting back!

> Hi Leon,
>
[quoted text clipped - 105 lines]
> any
> | > help!
Leon Finker - 12 Dec 2005 04:38 GMT
The problem is just as it was in .NET 1.1. It's CRL (cert. revocation list)
verification done by wintrust API, which .NET is using. It's timing out.
However, in .NET 1.1 there probably weren't any authenticode signed assembly
dependencies when using SoapHttpClient and csc.exe for XML serialization
because same code doesn't block under .NET 1.1.

By disabling CRL verification for the user, the problem disappears under
2.0. First I see connection being made to crl.microsoft.com and then to
crl.verisign.com. Both either fail or timeout, but this continues for good
~10 seconds per csc.exe invocation as well as in main host executable.

> Hi Leon,
>
[quoted text clipped - 105 lines]
> any
> | > help!
Steven Cheng[MSFT] - 13 Dec 2005 01:19 GMT
Thanks for your followup Leon,

Yes, your response also remind me of a former issue which is caused by the
similiar things. When some of our assemblies are code signed and at the CLR
startup  time, the security(cas) policy will try to verfiy the certificate
revorcation list over internet, if the machine's internet connection is not
setup correctly, it'll hangs until timeout.....    
Also, there is the "Check for publisher's certificate revocation" setting
in the internet explore's advanced options , when turn off this can also
avoid such checking....

Regards,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "Leon Finker" <Leon@nospam.nospam>
| References: <#YQz4HH$FHA.344@TK2MSFTNGP11.phx.gbl>
<#h7PyfH$FHA.208@tk2msftngp13.phx.gbl>
<IkzTdpL$FHA.552@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: .NET 2.0/csc.exe/SoapHttpClientProtocol hangs for 15-20
seconds (compared to .NET 1.1) under Citrix
| Date: Sun, 11 Dec 2005 23:38:59 -0500
| Lines: 134
[quoted text clipped - 130 lines]
| > any
| > | > help!
Rick Strahl [MVP] - 14 Dec 2005 23:17 GMT
Leon,

I've seen this same sort of thing and it's related to the change of the
default proxy that .NET 2.0 uses. .NET 2.0 will by default use the System
Proxy settings where 1.1 by default connected directly without any proxy...

I've found this to be a problem if you're running in ASP.NET under NETWORK
SERVICE for example, which doesn't have access to the System Proxy settings
in the registry - so it hunts around looking for the proxy settings before
giving up and using direct connects.

You can override the default roxy in your .Config file. This is what I use
in my ASP.NET apps now:

<system.net>
<defaultProxy>

<proxy bypassonlocal="true" usesystemdefault="false" />

</defaultProxy>

</system.net>

The above uses direct connect by default.

Not sure if this is your issue, but it sounds exactly like the symptoms I
saw with using the XMLReader to load some XML from over the Web from an
ASP.NET app.

+++ Rick ---

Signature

Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog

> Hi,
>
[quoted text clipped - 36 lines]
> This appears to be the only problem so far under Citrix. Thanks for any
> help!
Leon Finker - 16 Dec 2005 04:11 GMT
Hi Rick,

It didn't help. It still tries to connect to crl.microsoft.com and
crl.verisign.com. But it's unable to connect behind firewall and waits for
reponse 10s or so per try. Firewall most likely just drops the packet. The
only way that helps is to disable CRL verification.

> Leon,
>
[quoted text clipped - 68 lines]
>> This appears to be the only problem so far under Citrix. Thanks for any
>> help!

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.