WCF services not working on the server
WCF service is not working on the server. I am getting following error
The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
It is working for me in localhost
I have also set endpoint address in web.config
<service name="Myproject.project.Web.UI.SurveyServices"> <endpoint adress="http://www.abc.com/SurveyServices/SurveyServiceWeb.svc" behaviorConfiguration="Myproject.project.Web.UI.SurveyServices.SurveyServiceWebAspNetAjaxBehavior" binding="webHttpBinding" contract="Myproject.project.Web.UI.SurveyServices.SurveyServiceWeb" /> </service>
I am using using Microsoft.Practices.Unity for data access. While looking at the exception detail following error was returned.
Some internal error occured while processing your request please try again later Error:System.NullReferenceException: Object reference not set to an instance of an object. at MyProject.Project.Web.Extensions.UnityUtiliy.GetContainer() in E:\HostingSpaces\montotec\myproject.domain.com\wwwroot\MyProject.Project.Web.Extensions\UnityUtiliy.cs:line 62 at MyProject.Project.Business.Surveys.SurveyServiceManager.GetSurveyDetailsBySurveyId(Int32 SurveyId) in E:\HostingSpaces\montotec\Myproject.domain.com\wwwroot\Myproject.project.Business.Surveys\SurveyServiceManager.cs:line 31"
I have solved solved this issues
to resolved this issue I was set <serviceHostingEnvironment aspNetCompatibilityEnabled="true"> under <system.serviceModel>