【问题标题】:ASP.Net Web Service returns no data after deploymentASP.Net Web Service 部署后不返回数据
【发布时间】:2012-06-09 15:55:15
【问题描述】:
Visual Studio 2010
.Net framework 4.0
IIS 7.0
Windows Server 2008
within a visual studio solution I have: 

- Website project 
- Webservice project

基本上,网站函数调用 webservice 方法来选择/插入/更新数据。

This works fine when I try to run through the visual studio, but does not work on the server. 
 - using Visual Studio 2010 express on the server, the solution compiles successfully and gets the requested data. 
 - however, if I try to retrieve some data from deployed web service like:
 http://localhost/LTC_webservice/LTCWebService.asmx/GetWorkTypes

我没有桌子.. 所以我的网站得到了这个页面:

找不到表 0。

IIS Settings: 
- using ASP.Net v4.0 application pool 
- Managed Pipeline = Classic
- ISAPI and CGI Restrictions: allowed on ASP.NET v4.0.30319

我在这里错过了什么?

【问题讨论】:

  • 找不到表[0],所以它可能是一个返回数据集的数据库调用,您正在尝试访问第一个不可用的数据表。检查你的连接字符串?或您假设的数据不存在...您是否有任何日志,请提供一些代码,以便人们可以实际提供帮助。
  • 这是连接字符串问题。谢谢。

标签: asp.net web-services deployment iis-7 web


【解决方案1】:

数据库连接应该是SQL认证,不是windows认证。 我的连接字符串是使用 Windows 身份验证连接到数据库,而不是使用用户 ID 和密码的 SQL 身份验证。

【讨论】:

    猜你喜欢
    • 2019-10-16
    • 2016-04-25
    • 2021-09-11
    • 1970-01-01
    • 1970-01-01
    • 2012-04-02
    • 2017-05-28
    • 2013-06-23
    • 1970-01-01
    相关资源
    最近更新 更多