#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Posts
    2
    Rep Power
    0

    Getting 400 error and not 500


    I have a problem in the IIS. I created on my computer WCF that work with JSON on .NET 3.5. I added ErrorHandling which throw the error in soap for example:

    <Fault>...</Fault>

    The error arrive with code 500.

    But on the server it throw html like this:

    The server encountered an error processing the request. The exception message is 'hello world'. See server logs for more details. The exception stack trace is:

    at TGS.WebService.HotelMobile.HotelMobileFlow.GetServerTime() in D:\TGS\Symphony\Features\Dev-8.50-SP1-Mobile\Development\WebServiceProjects\HotelMobileWS\HotelMobileFlow.svc.cs:line 96 at SyncInvokeGetServerTime(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

    and the error code is 400.

    Please assist.

    Thanks, Michal
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    What makes you think your problem lies in IIS and not the coding? My guess is you have a coding problem, try very simple pages like hello world, etc.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Posts
    2
    Rep Power
    0
    Originally Posted by Doug G
    What makes you think your problem lies in IIS and not the coding? My guess is you have a coding problem, try very simple pages like hello world, etc.
    Hi, I try my code/ I put it on my iis and let other people reach him.
    and ther was not any problem with the error. I also try to put the code on my manager computer and its work fine. We both work with framework 4 so the website sit under framework 4 default website. In the server there is framework 3.5 so the program sit on the iis under default website 2 and there it does not work and return the wrong error.

    The error handling is an attribute in our company so it is on a lot of services. The different is that my service is return json so the binding and the end point is different.
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Maybe you have something coded that requires NET 4. Or there is some component your code uses that is missing on the failing server. Check your event logs and server logs and try to find something you can use as a starting point for debugging.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo