Click here to Skip to main content
15,914,392 members
Home / Discussions / C#
   

C#

 
GeneralRe: Get folders like the one for mega, drop box Pin
Duc Axenn19-May-21 21:27
Duc Axenn19-May-21 21:27 
QuestionIs ILMerge still used ? Pin
Maximilien19-May-21 9:05
Maximilien19-May-21 9:05 
AnswerRe: Is ILMerge still used ? Pin
Dave Kreskowiak19-May-21 9:48
mveDave Kreskowiak19-May-21 9:48 
QuestionString.Replace() & Regex.Replace() not working Pin
Mou_kol15-May-21 22:40
Mou_kol15-May-21 22:40 
GeneralRe: String.Replace() & Regex.Replace() not working Pin
Tony Hill15-May-21 23:30
professionalTony Hill15-May-21 23:30 
GeneralRe: String.Replace() & Regex.Replace() not working Pin
Mou_kol15-May-21 23:36
Mou_kol15-May-21 23:36 
SuggestionRe: String.Replace() & Regex.Replace() not working Pin
Tony Hill16-May-21 0:04
professionalTony Hill16-May-21 0:04 
GeneralRe: String.Replace() & Regex.Replace() not working Pin
Mou_kol16-May-21 0:21
Mou_kol16-May-21 0:21 
AnswerRe: String.Replace() & Regex.Replace() not working Pin
OriginalGriff16-May-21 0:20
mveOriginalGriff16-May-21 0:20 
GeneralRe: String.Replace() & Regex.Replace() not working Pin
Mou_kol16-May-21 0:21
Mou_kol16-May-21 0:21 
AnswerRe: String.Replace() & Regex.Replace() not working Pin
Gerry Schmitz16-May-21 11:04
mveGerry Schmitz16-May-21 11:04 
QuestionBug in form font Pin
Ismael Oliveira 202112-May-21 4:12
Ismael Oliveira 202112-May-21 4:12 
QuestionRe: Bug in form font Pin
Richard MacCutchan12-May-21 5:26
mveRichard MacCutchan12-May-21 5:26 
AnswerRe: Bug in form font Pin
OriginalGriff12-May-21 5:27
mveOriginalGriff12-May-21 5:27 
AnswerRe: Bug in form font Pin
Ismael Oliveira 202117-May-21 10:08
Ismael Oliveira 202117-May-21 10:08 
GeneralRe: Bug in form font Pin
Richard MacCutchan17-May-21 21:05
mveRichard MacCutchan17-May-21 21:05 
AnswerRe: Bug in form font Pin
OriginalGriff12-May-21 5:26
mveOriginalGriff12-May-21 5:26 
GeneralRe: Bug in form font Pin
Ismael Oliveira 202117-May-21 10:06
Ismael Oliveira 202117-May-21 10:06 
Question[SOLVED] Problem in a Web Service Pin
Luis M. Rojas12-May-21 3:54
Luis M. Rojas12-May-21 3:54 
Any Help, please

I am new in Web Service.
I have this WS
[ServiceContract]
public interface IWSEPSService
{
[OperationContract]
Persona ObtenerPersona(string id, string TipoDocumento);
[OperationContract]
Cliente SaveData(string documento, string tipoDocumneto);
}

[DataContract]
public class Persona : BaseRespuesta
{
[DataMember]
public string Nombre { get; set; }
[DataMember]
}

[DataContract]
public class Cliente : BaseRespuesta
{
[DataMember]
public int id { get; set; }
[DataMember]
public string direccion { get; set; }

more properties..
}

/* Class Persona */
public Persona ObtenerPersona(string Id, string tipoDocumento)
{
if (tipoDocumento == "Cedula")
{
if (ValidaCedula(Id) == false)
{
return new Persona() { Error = "Cedula erronea" };
}
}

/* Class CLiente */
public Cliente SaveData(string documento, string tipoDocumento)
{

if (tipoDocumento == "Cedula")
{

if (ValidaCedula(documento) == false)
{
return new Cliente() { Error = "Error Cedula incorreta." };
}
else
{

dt = ConsultaDatosClientes(documento, tipoDocumento);
foreach(DataRow row in dt.Rows)
{
if (tipoDocumento == "Cedula")
{
nombre = row["nombre"].ToString();
apellido = row["apellido"].ToString();
}

In the client Side I have this:
1. This code works perfect
private void button1_Click(object sender, EventArgs e)
{
var cedula = txtCedula.Text;
using(WSEPSService.WSEPSServiceClient client =new WSEPSService.WSEPSServiceClient())
{
var Persona = client.ObtenerPersona(cedula,"Cedula");
txtNombre.Text = Persona.Nombre + ' ' + Persona.Nombre;
txtEdad.Text = Persona.Edad.ToString();
}
}

2. This code does not work
private void btnSalvar_Click(object sender, EventArgs e)
{
using (WSEPSService.WSEPSServiceClient client = new WSEPSService.WSEPSServiceClient())
{
var Salvar= client.SaveData("10233317", "RNC"); // Here the program stopped
}
}

This is the Error:
System.ServiceModel.FaultException: 'The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.'

modified 12-May-21 11:20am.

AnswerRe: Problem in a Web Service Pin
OriginalGriff12-May-21 5:20
mveOriginalGriff12-May-21 5:20 
General[SOLVED] Re: Problem in a Web Service Pin
Luis M. Rojas12-May-21 5:23
Luis M. Rojas12-May-21 5:23 
Questiondata clustering Pin
Ahmed Alamdy10-May-21 14:02
Ahmed Alamdy10-May-21 14:02 
AnswerRe: data clustering Pin
Dave Kreskowiak10-May-21 19:27
mveDave Kreskowiak10-May-21 19:27 
AnswerRe: data clustering Pin
OriginalGriff10-May-21 20:21
mveOriginalGriff10-May-21 20:21 
AnswerRe: data clustering Pin
Pete O'Hanlon10-May-21 20:58
mvePete O'Hanlon10-May-21 20:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.