Usuario
problema para conectar client aplication con crm

Pregunta
-
buenas, mi pregunta es la siguiente, espero me puedan ayudar,
hice una aplicacion en VS 2010 para crear una cuenta en el CRM 2011 utilizando c#, en el formulario el usuario ingresa los datos que desea poner en la cuenta, al darle click al boton para crear la cuenta se genera una excepcion diciendo lo siguiente:
System.Net.WebException was unhandled
Message=Error de la solicitud con el código de estado HTTP 415: Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'..
Source=System.Web.Services
StackTrace:
en System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
en System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
en CrmLabs01.CRMWebServer.CrmService.Create(BusinessEntity entity) en c:\users\ps\documents\visual studio 2010\Projects\CrmLabs01\CrmLabs01\Web References\CRMWebServer\Reference.cs:línea 212
en CrmLabs01.Form1.btnCreate_Click(Object sender, EventArgs e) en c:\users\ps\documents\visual studio 2010\Projects\CrmLabs01\CrmLabs01\Form1.cs:línea 44
en System.Windows.Forms.Control.OnClick(EventArgs e)
en System.Windows.Forms.Button.OnClick(EventArgs e)
en System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
en System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
en System.Windows.Forms.Control.WndProc(Message& m)
en System.Windows.Forms.ButtonBase.WndProc(Message& m)
en System.Windows.Forms.Button.WndProc(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
en System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
en System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
en System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
en System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
en System.Windows.Forms.Application.Run(Form mainForm)
en CrmLabs01.Program.Main() en c:\users\ps\documents\visual studio 2010\Projects\CrmLabs01\CrmLabs01\Program.cs:línea 18
en System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
en System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
en Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
en System.Threading.ThreadHelper.ThreadStart()
InnerException:para aclarar el servidor del CRM lo tengo en una maquina virtual con Wserver 2008 y la aplicacion de VisualStudio la estoy haciendo desde otro computador... no se si tendra que ver con el acceso remoto.
muchas gracias de antemano por la ayuda..
- Editado Alizanoc viernes, 18 de noviembre de 2011 22:44
Todas las respuestas
-
hola, aparentemente es un error en la conexión a los web services de CRM. Revisa si te estas conectando tal y como explica en la SDK (de hecho tienes allí soluciones .NET de ejemplo 100% funcionales)
sino mirate esto
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/8d84dd16-605f-46dc-a8f2-5ee8b1cef150
y esto: http://forums.silverlight.net/p/205815/482872.aspx
a ver si te ayudan
Demian Adolfo Raschkovan Blog: http://crmtoall.blogspot.com- Propuesto como respuesta Demian Adolfo RaschkovanMVP, Moderator lunes, 21 de noviembre de 2011 15:39