locked
Http 400 error RRS feed

  • Question

  • User-1907931422 posted

    My service is used to be working in local, I don't remember what I changed today now it is not working. Visual Studio 2012, IIS Express.

    The url is http://localhost:59899/wscccService.svc

    The web.config is:

    <?xml version="1.0"?>
    <configuration>
       <system.web>
         <compilation debug="true" targetFramework="4.5"/>
         <httpRuntime targetFramework="4.5"/>
         <customErrors mode="Off"></customErrors>
       </system.web>
       <system.serviceModel>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true">
        <serviceActivations>
           <add factory="System.ServiceModel.Activation.WebServiceHostFactory"
            relativeAddress="wscccService.svc"
            service="service.wservice"/>
      </serviceActivations>
      <baseAddressPrefixFilters>
        <add prefix="http://localhost:59899/" />
      </baseAddressPrefixFilters>
    </serviceHostingEnvironment>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <diagnostics>
      <messageLogging logEntireMessage="true"
                      logMessagesAtServiceLevel="false"
                      logMessagesAtTransportLevel="false"
                      logMalformedMessages="true"
                      maxMessagesToLog="5000"
                      maxSizeOfMessageToLog="2000">
       </messageLogging>
     </diagnostics>
    </system.serviceModel>
       <system.webServer>
        <validation validateIntegratedModeConfiguration="true" />
        <handlers>
          <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
          <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
          <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
          <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
          <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
          <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
        </handlers>
      </system.webServer>
       <system.diagnostics>
         <sources>
           <source name="System.ServiceModel.MessageLogging">
             <listeners>
               <add name="messagelistener"
                 type="System.Diagnostics.XmlWriterTraceListener"
                      initializeData="C:\myMessages.svclog"></add>
             </listeners>
          </source>
         </sources>
          <trace autoflush="true"></trace>
        </system.diagnostics>
      </configuration>

    I used fileless so there is no endpoint section in the file.

    Monday, July 15, 2013 9:20 PM

Answers

  • User-1907931422 posted

    Add an ignore route, the exception is gone.

    routes.IgnoreRoute("{allServices}.svc/{*pathInfo}")



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 16, 2013 11:04 AM

All replies

  • User-2001332922 posted

    <add prefix="http://localhost:59899/" />

    is the hard coded

    add name="messagelistener"
                 type="System.Diagnostics.XmlWriterTraceListener"
                      initializeData="C:\myMessages.svclog"></add>

    message in the file please if those are after your change done time.

    seems okay exept i quoted.

    Monday, July 15, 2013 9:34 PM
  • User-1907931422 posted

    What is wrong for hardcode part?How to change it? I did not get the trace file, why?

    Monday, July 15, 2013 9:39 PM
  • User-2001332922 posted

    the access of website is particualr at computer port 59899 i just observed that. and wrong as a practice is. also default is this that need extra work further during deployment. i did once the implementation with no success of that tiem.

    How to change?

    Answer : Create an website in IIS

    I did not get the trace file, why?

    As known the svc is not wokring as off. right OR wrong.

    Tuesday, July 16, 2013 1:20 AM
  • User-1907931422 posted

    I found log files in C:\Users\hui\Documents\IISExpress\TraceLogFiles\wsccc1, wsccc1 is my web site name. I don't understand it.

    [HttpException]: The controller for path &amp;#39;/wscccService.svc/&amp;#39; was not found or does not implement IController.
       at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
       at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
       at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController&amp; controller, IControllerFactory&amp; factory)
       at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
       at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state)
       at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)
    --&gt;</Data>



    Tuesday, July 16, 2013 8:57 AM
  • User-1907931422 posted

    Add an ignore route, the exception is gone.

    routes.IgnoreRoute("{allServices}.svc/{*pathInfo}")



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 16, 2013 11:04 AM