Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET WCF MVC
Hello!When I start asp.net mvc project I get error.Internal Server Error.
I host asp.net mvc and wcf application on IIS express.
    <services>
      <service name="WCFSkyAuction.Service.UserRoleService">
        <endpoint address="" behaviorConfiguration="WCFSkyAuction.Service.UserRoleServiceAspNetAjaxBehavior"
          binding="webHttpBinding" name="UserService" contract="WCFSkyAuction.Service.UserRoleService" />
      </service>
      <service name="WCFSkyAuction.Service.AdminRoleService">
        <endpoint address="" behaviorConfiguration="WCFSkyAuction.Service.AdminRoleServiceAspNetAjaxBehavior"
          binding="webHttpBinding" name="AdminService" contract="WCFSkyAuction.Service.AdminRoleService" />
      </service>
      <service name="WCFSkyAuction.Service.VipRoleService">
        <endpoint address="" behaviorConfiguration="WCFSkyAuction.Service.VipRoleServiceAspNetAjaxBehavior"
          binding="webHttpBinding" contract="WCFSkyAuction.Service.VipRoleService"/>
      </service>
      <service name="WCFSkyAuction.Service.MailService">
        <endpoint address="" behaviorConfiguration="WCFSkyAuction.Service.MailServiceAspNetAjaxBehavior"
          binding="webHttpBinding" contract="WCFSkyAuction.Service.MailService" />
      </service>
    </services>
   <endpointBehaviors>
        <behavior name="WCFSkyAuction.Service.UserRoleServiceAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
        <behavior name="WCFSkyAuction.Service.AdminRoleServiceAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
        <behavior name="WCFSkyAuction.Service.VipRoleServiceAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
        <behavior name="WCFSkyAuction.Service.MailServiceAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
That's my config file on WCF side I have each endpoint with webHttp binding and contract on 4 svc files.All methods has correct set in svc files with operationcontract, with one argument.I have cheacked services is cool.
<system.serviceModel>
    <client>
      <endpoint address="http://localhost:8080/WCFSkyAuction/Service/UserRoleService.svc"
        binding="webHttpBinding" bindingConfiguration="" behaviorConfiguration="webhttp" contract="UserService.UserRoleService"
        name="UserService" />
      <endpoint address="http://localhost:8080/WCFSkyAuction/Service/AdminRoleService.svc" 
                binding="webHttpBinding" behaviorConfiguration="webhttp" contract="AdminService.AdminRoleService"
        name="AdminService" />
    </client>
    <behaviors>
      <endpointBehaviors>
        <behavior name="webhttp">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
  </system.serviceModel>
That's a web.config in asp.net mvc side. I have written client endpoints and behaviors by Edit WCF file.Add Service Referance works good and I added all reference.when I started project with a first operation of service I got Internal Server Error.Communication Exception was uhandled by user code.
Thank you.How can I decide it?
Posted 25-Jun-12 23:43pm
Comments
Wes Aday at 26-Jun-12 9:37am
   
Post the stack trace for the exception.
thomas_wingfield at 26-Jun-12 10:22am
   
u can see my trace in my sloution.Thanks
Wes Aday at 26-Jun-12 10:23am
   
Uhm... no. There is no exception stack trace posted in your question.
thomas_wingfield at 26-Jun-12 10:39am
   
Sorry Wes, I'm new)
Server stack trace:
in System.ServiceModel.Dispatcher.WebFaultClientMessageInspector.AfterReceiveReply(Message& reply, Object correlationState)
in System.ServiceModel.Dispatcher.ImmutableClientRuntime.AfterReceiveReply(ProxyRpc& rpc)
in System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
in System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
in System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
in System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
 
Exception rethrown at [0]:
in System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
in System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
in SkyAuction.UserService.UserRoleService.GetCategoryById(Int32 id)
in SkyAuction.UserService.UserRoleServiceClient.GetCategoryById(Int32 id) in C:\Users\ShoX\Desktop\SkyAuction\SkyAuction\SkyAuction\SkyAuction\Service References\UserService\Reference.cs:line 176
in SkyAuction.Controllers.HomeController.Categories(String id, Nullable`1 page) in C:\Users\ShoX\Desktop\SkyAuction\SkyAuction\SkyAuction\SkyAuction\Controllers\HomeController.cs:line 59
in lambda_method(Closure , ControllerBase , Object[] )
in System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
in System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
in System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.b__12()
in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

[CommunicationException: Internal Server Error]
   System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +9464911
   System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +345
   SkyAuction.UserService.UserRoleService.GetUserForValidation(Temp test) +0
   SkyAuction.UserService.UserRoleServiceClient.GetUserForValidation(Temp test) in C:\Users\ShoX\Desktop\SkyAuction\SkyAuction\SkyAuction\SkyAuction\Service References\UserService\Reference.cs:240
   SkyAuction.Controllers.UserController.LogOn(String login, String password, Nullable`1 remember) in C:\Users\ShoX\Desktop\SkyAuction\SkyAuction\SkyAuction\SkyAuction\Controllers\UserController.cs:60
   lambda_method(Closure , ControllerBase , Object[] ) +193
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +208
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +55
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +263
   System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +191
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8862669
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
 
That's my trace
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 mhegazy94 460
1 Sergey Alexandrovich Kryukov 400
2 Kornfeld Eliyahu Peter 315
3 Gihan Liyanage 147
4 Sibeesh KV 145
0 Sergey Alexandrovich Kryukov 6,890
1 OriginalGriff 6,761
2 CPallini 5,350
3 George Jonsson 3,609
4 Gihan Liyanage 2,797


Advertise | Privacy | Mobile
Web01 | 2.8.140922.1 | Last Updated 26 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100