2009-06-13 159 views
1

我的Web服务出现问题,我需要帮助。 我有一个Silverlight项目和ASP部分Silverlight.Web。在Silverlight.Web中添加了一个Linq to SQL文件,一个用于验证用户登录的数据库userd,以及一个创建的服务asmx文件。在Silverlight项目中,为我的asmx Web服务添加了一个服务参考。构建ServiceReferences.ClientConfig后创建。 Whwn我跑我的项目的服务不与创建ServiceReferences.ClientConfig文件工作: Silverlight的Web服务访问

如果我评论这一部分 只有从VisualStudio运行我的项目,但如果在IIS上发布我的项目,该服务无法正常工作(我在ServiceReferences.ClientConfig中更改我的服务路径http://localhost/silverlight/UserLogin.asmx,我的服务发布在那里)出现此错误:

错误:Silverlight应用程序中未处理的错误在操作过程中发生异常,导致结果无效。检查异常详情的InnerException。在System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() 在SilverlightPowerPoint.UserLoginService.UsersLoginCompletedEventArgs.get_Result() 在SilverlightPowerPoint.Login.uls_UsersLoginCompleted(对象发件人,UsersLoginCompletedEventArgs E) 在SilverlightPowerPoint.UserLoginService.UserLoginSoapClient.OnUsersLoginCompleted(对象状态) 源文件:http://localhost/Silverlight/SilverlightPowerPointTestPage.aspx

如果我从我的IIS http://localhost/Silverlight/UserLogin.asmx运行服务,我给参数和它的作品,它返回给我的答案。

我该怎么办?

Thanck你, 安德烈

回答

1

ServiceReferences.ClientConfig文件:

<system.serviceModel> 
    <bindings> 
     <basicHttpBinding> 
      <binding name="UserLoginSoap" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> 
       <security> 
        <transport> 
         <extendedProtectionPolicy policyEnforcement="Never" /> 
        </transport> 
       </security> 
      </binding> 
     </basicHttpBinding> 
    </bindings> 
    <client> 
     <endpoint address="http://localhost:50470/UserLogin.asmx" 
      binding="basicHttpBinding" bindingConfiguration="UserLoginSoap" 
      contract="UserLoginService.UserLoginSoap" name="UserLoginSoap" /> 
    </client> 
</system.serviceModel> 

它的工作原理我评论此之后:

   <security> 
       <transport> 
        <extendedProtectionPolicy policyEnforcement="Never" /> 
       </transport> 
      </security> 
+0

所以这就是答案你长了? os仍然有问题? – 2009-06-13 13:22:55