在WebService WCF中登录时出错 [英] Error while login in WebService WCF

查看:130
本文介绍了在WebService WCF中登录时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有Windows应用程序并且有登录页面。

登录页面调用webservice进行身份验证,如果经过身份验证重定向到新页面。



我有webservice为我做这个活动。

如果我在我的服务器上运行主机webservice并运行windows我的办公室机器上的应用程序可以运行。

但是如果我在客户系统中运行Windows应用程序。然后它给了我以下错误(在这种情况下,Web服务仍在我的服务器上)。



27/10/2014 02:36:39 PM ==>用户名:==> ActivateProduct ==>错误消息:接收到http://URL..../licensews/Service.svc的HTTP响应时发生错误。这可能是由于服务端点绑定不使用HTTP协议。这也可能是由于服务器中止HTTP请求上下文(可能是由于服务关闭)。有关详细信息,请参阅服务器日志。

Hello everyone,

I have Windows application and which has login page.
Login page calls webservice for authentication and if authenticated it redirects to new page.

I have webservice which does this activity for me.
If i run host webservice in my server and run windows application on my office machines it works.
But if i run Windows application in Client's system. Then It gives me below error(In this case web service is still on my server).

27/10/2014 02:36:39 PM ==> Username: ==> ActivateProduct ==> Error Msg: An error occurred while receiving the HTTP response to http://URL..../licensews/Service.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.

推荐答案

您好,



我认为您有序列化问题可以找到确切的错误。只需在服务配置中添加以下代码即可。



添加以下代码后,将创建一个App_tracelog.svclog文件,其中包含您的服务。打开它,找到红色的线条,这是错误并看到它的描述。



Hi,

I think there is a serialization problem you can find the exact error. Just add the below code in service config in section.

After adding the below code, a"App_tracelog.svclog" file will be created where your service exists. Open it and find the red colored line which is the error and see its description.

<system.diagnostics>
    <sources>
      <source name="System.ServiceModel.MessageLogging" switchvalue="Warning, ActivityTracing">
        <listeners>
          <add name="ServiceModelTraceListener" />
        </listeners>
      </source>
      <source name="System.ServiceModel" switchvalue="Verbose,ActivityTracing">
        <listeners>
          <add name="ServiceModelTraceListener" />
        </listeners>
      </source>
      <source name="System.Runtime.Serialization" switchvalue="Verbose,ActivityTracing">
        <listeners>
          <add name="ServiceModelTraceListener" />
        </listeners>
      </source>
    </sources>
    <sharedlisteners>
      <add initializedata="App_tracelog.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="ServiceModelTraceListener" traceoutputoptions="Timestamp" />
    </sharedlisteners>
  </system.diagnostics>





希望这可以帮助您找到确切的错误:)



问候,

Praneet



Hope this helps you in finding the exact error :)

Regards,
Praneet

这篇关于在WebService WCF中登录时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆