views:

241

answers:

1

I have developed a web app using a webservice. Everything works fine in the development environment. I have moved the webservice to the production server in a test folder behind my main website. I can browse to the published service localy on the production server and i can access the remote service from my development machine.

If I run my web app in my development environment I can use the remote webservice no problem. If I move the web application to the production environment the browser outputs this error when the application performs the ajax login method.

The following javascript error is output to the browser

Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server.

The status code returned from the server was: 500
Source File: www.grav80.com/clients/callswharf/Redshift/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1247b7d8-6b6c-419f-a45f-8ff264c90734%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3ad2d891f5-3533-469c-b9a2-ac7d16eb23ff%3a16e4e7cd%3a86526ba7%3aed16cbdc%3ab7778d6c
Line: 15

The Following error appears in the event log

Exception information: 
    Exception type: WebException 
    Exception message: Unable to connect to the remote server 

Request information: 
    Request URL: www.grav80.com/clients/callswharf/redshift/login.aspx 
    Request path: /clients/callswharf/redshift/login.aspx 
    User host address: 77.68.58.231 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: NT AUTHORITY\NETWORK SERVICE 

You can view the behaviour in the test environment here. http://www.grav80.com/clients/callswharf/redshift/

You can view the service here http://www.grav80.com/clients/callswharf/redshift/service/g80cms.asmx

I hope some on can shine some light on this for me.

+2  A: 

The exception message shows you were running your Login.aspx, not your web service.

Also, the WebResource.axd is used to return resources from a resource file. The fact that that is tied in with your Login.aspx makes me think you have Forms Authentication configured incorrectly. It should not be configured for the WebResource.axd.


Just in case it turns out you're calling the service from Login.aspx using "AJAX", I'll mention that "Unable to connect to the remote server" usually means exactly that. There was an attempt to make a TCP/IP connection to the remote server, usually on port 80 or 443, and the connection was not successfully made. This means it's time to look into networking issues such as firewalls, Web blockers (like Bluecoat), proxy servers, etc.

You might try to look at the network traffic with Fiddler, if that's possible in your environment.

John Saunders
Hi John thanks for the quick response.Login.aspx makes an ajax call to the webservice. Wen im running on the dev machine connecting to the live service it works fine as soon as I move the app to a live environment it all falls apart.As far as I am aware webresources.axd is used buy the telerik controls on the page. This javascript error only occurs after the ajax postback.
sidcom
@sidcom: When you say "AJAX", are you using it from the client (in the browser), or from the server (in login.aspx.cs)?
John Saunders
@John Saunders Hi John I am using a telerik Rad Ajax Panel to "ajaxify" the login area. The ajax panel converts all server based events into an ajax request. The code that is executed in login.aspx.cs connects to the webservice and checks that the user is using the correct login info. No visible page refresh is made and a client side error message is displayed if the user cannot login. If the user can login a session is created and the user directed to the control panel home page. Hope that helps.
sidcom
@John Saunders Thanks for the update John. I had the same suspicions that the problem was due to some network related security. I have moved the application and service to its own domain name and hosting space and hey presto its all working. Thanks very much for your input it is greatly appreciated.
sidcom