Solved

Deploying a wcf application

Posted on 2014-11-14
3
93 Views
Last Modified: 2014-11-25
Hi. I have a WCF service published and this is my connectionstring  to the database.
<add name="DBEntities" connectionString="metadata=res://*/ServContexto.csdl|res://*/ServContexto.ssdl|res://*/ServContexto.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=10.1.1.71;initial catalog=DB;persist security info=True;user id=usr_xxx;password=YYYYYYYYY;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

another connectionstring "Provider=SQLOLEDB;SERVER=10.1.1.71;DATABASE=producao;UID=homologacao;PWD=ZZZZZZZZZ;"

using the first connection with my wcf service, I got a error 500. and the second, a legacy application works fine.

basically the difference is the provider. how my publish could upload the sqlclient provider?

I have a test method that does not use the database and it works ok. only the methods that use the database fail.

thx in advance.
0
Comment
Question by:Deraldo Silva
  • 2
3 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40443416
Try turning on the display of custom errors so that you can see what the underlying issue is. Modify your web.config with the information found here:

http://msdn.microsoft.com/en-us/library/h0hfz6fc(v=vs.85).aspx

Spceficially, setting customErrors to off should allow you to see the exception detail. You'll need to turn on debug mode as well:

http://msdn.microsoft.com/en-us/library/e8z01xdh.aspx

Be sure to remove these added settings before you go to production!
0
 

Accepted Solution

by:
Deraldo Silva earned 0 total points
ID: 40456827
Hi.
The problem occurred because the sql server native client was not installed.
It comes with sql server as in http://msdn.microsoft.com/pt-br/library/ms131321(v=sql.110).aspx
and from here https://www.connectionstrings.com/download-sql-server-native-client/

thx for your attention
0
 

Author Closing Comment

by:Deraldo Silva
ID: 40464129
After install the missing component, the deploy works fine.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The reason that corporations and businesses use Windows servers is because it supports custom modifications to adapt to the business and what it needs. Most individual users won’t need such powerful options. Here I’ll explain how you can enable Wind…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question