Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Internal Server Error (500) accessing Webservice from CLR SPROC
ebz
#1 Posted : Friday, December 7, 2007 4:59:50 AM(UTC)
Groups: Member
Joined: 9/28/2007(UTC)
Posts: 4
Location: Frankfurt, Germany

HI,

i've written a Webservice and its running under Cassini Web Server for ASP.NET 2.0.
Everything seems to be working fine, when i call the Web Service through a C# .Net Window Application.

I have problems running the through a call from a CLR Stored Procedure or from an assembly that i have written.

When i run the assembly i get a Webexception:

Server: "UltiDev Cassini/2.1.4.3"
StatusCode: System.Net.HttpStatusCode.InternalServerError
StatusDescription: "Internal Server Error"
Status: System.Net.WebExceptionStatus.ProtocolError


When i run the CLR Stored Procedure, which calls the Webservice i receive the following error:

A .NET Framework error occurred during execution of user-defined routine or aggregate "GetTerminalPx":
System.Net.WebException: The operation has timed out
System.Net.WebException:
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Terminal_PX2.TerminalWebservice.Service.GetTerminalData(String ident, String field)
at StoredProcedures.GetPX(String ID, String fields, DataSet dsID)
at StoredProcedures.callMembership(String indexfamily, Int32 timeframe, String fields)


Any clue what this could be?
Ultidev Team
#2 Posted : Friday, December 7, 2007 5:57:02 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

We don't know what exactly happens, but we could suggest troubleshooting steps. In situations like this you may start with looking at what goes on on the wire. For that please install Fiddler, or some other HTTP tracing utility. If your client process runs under interactive user account, then no changes in your client code is necessary for http interception to work. However, since CLR stored proc code is probably hosted inside the LOCAL SYSTEM -based process, you may need to add
Code:
wsClient.Proxy = new System.Net.WebProxy("localhost", "8888");

to your CLR sproc before calling the web service. Just make sure Fiddler runs on the same machine as your web service client. Also, for http tracing to work you have to use real machine name or IP address in the web service URL. Interception won't work if you use localhost or 127.0.0.1 in the web service URL. With this setup you will be able to monitor requests and responses and compare ones that work (from regular app) to those that don't (from CLR sproc). If you need a help in interpreting differences, please post here.

Please let us know if this information was helpful.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.