WCF 服务不在服务器上工作。我收到以下错误
由于内部错误,服务器无法处理请求。有关错误的更多信息,请在服务器上打开 IncludeExceptionDetailInFaults(来自 ServiceBehaviorAttribute 或来自配置行为)以便将异常信息发送回客户端,或根据 Microsoft .NET Framework 3.0 SDK 文档打开跟踪并检查服务器跟踪日志。
它在本地主机中为我工作
我还在 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>
我正在使用 Microsoft.Practices.Unity 进行数据访问。在查看异常详细信息时,返回了错误。
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"