1

I have a asp.net webpage with just a couple divs on it. Most of the work is done through javascript, JSON, and a webservice running on the same page.

My webservice has three different functions I use. All functions perform a select statement from the same database, the database that is being queried is located on the same machine the website is on.

I originally started working on the webpage on my local machine and could run all my webservice functions correctly and get a response. However, I am now trying to move the page to a server but I am having no luck.

When on the server the page loads correctly, which requires a call to the first function (this works fine). However on click of a button a second call to the function is made but I get a timeout error.

I tried running the functions directly from the server, and the first function works fine, however the other two do not, they give me a page error code 500. Any ideas what could be causing this?

Brian Webster
  • 30,033
  • 48
  • 152
  • 225
user541597
  • 4,247
  • 11
  • 59
  • 87
  • Show us the code? We probably can't help without it. – Piccolo Feb 16 '13 at 02:19
  • what can I show? the code works fine on my local computer, wouldn't it be more likely that is a setting on iis or the website project than the code? – user541597 Feb 16 '13 at 02:21
  • do you have access to the server logs? – Shanimal Feb 16 '13 at 03:31
  • @user541597 Probably some info on your web config and iis settings – nbrooks Feb 16 '13 at 03:31
  • What are you using to query the database? ADO? What type of database, and what version(s) of IIS? – Tieson T. Feb 16 '13 at 04:12
  • Does the web server have the same .net framework as local? Can you turn on debugging in web.config? Can you isolate the code that is not working and run it directly from a separate page to try and debug? – Tom Feb 16 '13 at 04:27
  • Try turning on [Exception Details](http://stackoverflow.com/questions/8315633/turn-on-includeexceptiondetailinfaults-either-from-servicebehaviorattribute-or) – Tung Feb 16 '13 at 06:03
  • 1
    I suggest to use a tool like Fiddler to monitor the request/response between your app and webservice, to find out what exactly the error is. – Yousef Salimpour Feb 16 '13 at 12:29
  • using fiddler got me to my solution. Thank you – user541597 Feb 16 '13 at 19:44

1 Answers1

0

I figured out the issue. I had some code on the two functions that was trying to get the hostname from an ip address but my webpage was being hosted on a computer in the network outside of the domain. So it was getting an exception when trying to convert the ip to a hostname. I resolved the issue by hosting the webpage on a computer on the same domain so that it could resolve the ip addresses to a hostname. Thanks for the help.

user541597
  • 4,247
  • 11
  • 59
  • 87