【发布时间】:2013-05-20 17:51:21
【问题描述】:
我有一个 WCF 服务,当我签入 WCF 测试客户端时它工作正常,但是在我将服务部署到远程服务器(我的大学服务器)之后它就不起作用了。我在 wp8 应用程序上运行它,但它没有给我错误,所以我在 wcf 测试客户端上运行它,我发现我无法连接到我的数据库,我不知道为什么!
我在网上搜索有关连接字符串的信息,因为每个人都告诉我可能是这样,但一切看起来都很好:(
这是我的连接字符串:
<connectionStrings>
<add name="dbPulpoConnectionString" providerName="System.Data.SqlClient" connectionString="Server=(LocalDb)\v11.0;Initial Catalog=PulpoDatabase;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\PulpoDatabase.mdf"/>
我也改成:
<connectionStrings>
<add name="dbPulpoConnectionString" providerName="System.Data.SqlClient" connectionString="Server=.\SQLEXPRESS;Initial Catalog=PulpoDatabase;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\PulpoDatabase.mdf"/>
但是还是不行>
编辑:在我的专有名词中它说 .NET FRAMWORK 4.5
请帮帮我,我不知道该怎么办了>
编辑:我有我需要的所有前提在远程服务器上,在远程服务器上我有 App_Data 文件夹,我的 database.mdf 文件在那里,web.config 和 bin 以及 wcf.svc 服务器
编辑:我的错误:
Object reference not set to an instance of an object. Server stack trace: at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter) at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at IPulpoService.ShowStatistics(UserVO client) at PulpoServiceClient.ShowStatistics(UserVO client)
【问题讨论】:
-
您能否发布您收到的实际错误消息?
标签: mysql wcf connection-string wcf-data-services publish