Skip to main content

Microsoft Silverlight

Answered Question Problem with the WebServices hosted in IIS7RSS Feed

(0)

kingve
kingve

Member

Member

21 points

78 Posts

Problem with the WebServices hosted in IIS7

hi guys, i hosted my app in IIS7, but when try login into my app raise a error.

 Detalles de error de página web

Agente de usuario: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Fecha: Tue, 3 Nov 2009 07:09:48 UTC


Mensaje: Unhandled Error in Silverlight Application Excepción durante la operación. El resultado no es válido. Compruebe la excepción InnerException para obtener más detalles.   en System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() en PersonFramework.PersonSR.GetLoginCompletedEventArgs.get_Result()
en SilverlightLOBFramework.Content.Miscellaneous.LoginPage.AWDataServiceClient_LoginCompleted(Object sender, GetLoginCompletedEventArgs e)
 en PersonFramework.PersonSR.PersonServiceClient.OnGetLoginCompleted(Object state)
Línea: 1
Carácter: 1
Código: 0
URI: http://190.202.138.200:8080/Silverlight.js

what missing?

 

thanks

ken tucker
ken tucker

All-Star

All-Star

16334 points

2,498 Posts

Re: Problem with the WebServices hosted in IIS7

I would use a tool like fiddler, web developer helper, or firebug to see what is going on. 

 

http://blogs.silverlight.net/blogs/msnow/archive/2008/10/20/silverlight-tip-of-the-day-63-how-to-monitor-http-traffic-for-errors.aspx

kingve
kingve

Member

Member

21 points

78 Posts

Re: Problem with the WebServices hosted in IIS7

i used fiddler but don't show nothing....

ken tucker
ken tucker

All-Star

All-Star

16334 points

2,498 Posts

Re: Problem with the WebServices hosted in IIS7

As long as the silverlight app is finding the service and you do not have a cross domain issue. I would suspect there is something wrong with the service. Maybe there is a problem with the connection string when deployed or maybe you have to add the aspnet user as a user to the database

kingve
kingve

Member

Member

21 points

78 Posts

Re: Problem with the WebServices hosted in IIS7

thanks for your response tucker, but in my debuggin in VS2008 working perfectly all my connection string,

am try putt my app in IIS 6 but the problem is other, i published in this link

Silverlight + Net 3.5 Framework + IIS6 + PROBLEM.....Service Unavailable

this world is very excited but the problem is so more bigger... jajajajajajaj

thanks for your help tucker, if this issues is solved, this being my first app in the intranet company in this Tools (SL3 + WCF + ADO.NET)

JC.

 

 

davidezordan
davidezo...

Contributor

Contributor

5690 points

875 Posts

Silverlight MVP
Answered Question

Re: Problem with the WebServices hosted in IIS7

Hi,

I suggest to follow the steps available here: http://msdn.microsoft.com/en-us/library/dd470100(VS.95).aspx

To verify if the service is working properly, you can also use the utility WcfTestClient.exe.

HTH.

Thanks, Davide

Silverlight MVP

Blog Twitter Silverlight Experts

kingve
kingve

Member

Member

21 points

78 Posts

Re: Problem with the WebServices hosted in IIS7

thanks for your reply David, i check according to what you recommended me, my ServiceReferences.ClientConfig works perfectly, but the tool for WCF as not supported me I am calling many methods in my iServices.

 this is my OperationContract, this in my VS2008 Running Working very well... but in my IIS 7 not.

 

1    using System;
2    using System.Collections.Generic;
3    using System.Linq;
4    using System.Runtime.Serialization;
5    using System.ServiceModel;
6    using System.Text;
7    using PersonObject.Dictionaries;
8    using InventoryBO = PersonObject.Inventory;
9    
10   namespace PersonFramework.Web
11   {
12       // NOTE: If you change the interface name "IPersonService" here, you must also update the reference to "IPersonService" in Web.config.
13       [ServiceContract]
14       public interface IPersonService
15       {
16           [OperationContract]
17           List GetTipificacion(string Cod, string Telf);
18   
19           [OperationContract]
20           List GetLogin(string Login, string Password);
21   
22           [OperationContract]
23           TipoDictionaries GetTipo();
24   
25           [OperationContract]
26           List GetReqTipo();
27   
28           [OperationContract]
29           List GetSubtipo();
30   
31           [OperationContract]
32           List GetCaso();
33   
34           [OperationContract]
35           void SaveData(Tipificacion p);
36   
37           [OperationContract]
38           List GSubtipo(int codigo);
39   
40           [OperationContract]
41           List GCaso(int codigo);
42       }
43   }
44   

 

1    using System;
2    using System.Collections.Generic;
3    using System.Linq;
4    using System.Runtime.Serialization;
5    using System.ServiceModel;
6    using System.Text;
7    using PersonObject.Dictionaries;
8    using InventoryBO = PersonObject.Inventory;
9    
10   namespace PersonFramework.Web
11   {
12       // NOTE: If you change the class name "PersonService" here, you must also update the reference to "PersonService" in Web.config.
13       public class PersonService : IPersonService
14       {
15   
16           #region List Tipificacion
17   
18           public List GetTipificacion(string Cod, string Telf)
19           {
20               db_tipificacionEntities db = new db_tipificacionEntities();
21               var MatchTipificacion = from Tip in db.Tipificacion
22                                       where Tip.Cod_Area.Equals(Cod)
23                                       where Tip.Num_Telef.Equals(Telf)
24                                       select Tip;
25   
26               return MatchTipificacion.ToList();
27           }
28           #endregion
29   
30           #region List Personal
31           public List GetLogin(string Login, string Password)
32           {
33               db_tipificacionEntities db2 = new db_tipificacionEntities();
34               var MatchLogin = from Datos in db2.vwPersonal
35                                where Datos.dlogin.Equals(Login)
36                                where Datos.clave.Equals(Password)
37                                select Datos;
38   
39               return MatchLogin.ToList();
40           }
41           #endregion
42   
43           #region Dictionaries (Tipo)
44           public TipoDictionaries GetTipo()
45           {
46               using (db_tipificacionEntities db3 = new db_tipificacionEntities())
47               {
48                   var TipoQuery = from RTP in db3.Req_Tipo
49                                   select RTP;
50   
51                   var tipoDictionaries = new TipoDictionaries();
52                   tipoDictionaries.DatosTipo = TipoQuery.ToDictionary(RTP => RTP.IDTipo,
53                                                                       RTP => RTP.Nombre);
54   
55                   return tipoDictionaries;
56               }
57           }
58           #endregion
59   
60           #region Get Requerimiento Tipo
61           public List GetReqTipo()
62           {
63               db_tipificacionEntities db4 = new db_tipificacionEntities();
64               var RTQuery = from RQT in db4.Req_Tipo
65                             select RQT;
66   
67               return RTQuery.ToList();
68   
69           }
70   
71           #endregion
72   
73           #region Get Requerimiento SubTipo
74           public List GetSubtipo()
75           {
76               db_tipificacionEntities db5 = new db_tipificacionEntities();
77               var SQuery = from SDat in db5.Req_Subtipo
78                            select SDat;
79   
80               return SQuery.ToList();
81           }
82           #endregion
83   
84           #region Get Requerimiento Caso
85           public List GetCaso()
86           {
87               db_tipificacionEntities db6 = new db_tipificacionEntities();
88               var CQuery = from CDat in db6.Req_Caso
89                            select CDat;
90   
91               return CQuery.ToList();
92           }
93   
94           #endregion
95   
96           #region Save Data
97   
98           public void SaveData(Tipificacion p)
99           {
100              using (db_tipificacionEntities context = new db_tipificacionEntities())
101              {
102                  context.AddToTipificacion(p);
103                  context.SaveChanges();
104              }
105          }
106          #endregion
107  
108          #region GSubTipo (Nuevo para Filtrar)
109          public List GSubtipo(int codigo)
110          {
111              db_tipificacionEntities QSub = new db_tipificacionEntities();
112              var QSubtipo = from Dats in QSub.Req_Subtipo
113                             where Dats.IDTipo.Equals(codigo)
114                             select Dats;
115  
116              return QSubtipo.ToList();
117          }
118          #endregion
119  
120          #region GCaso(Nuevo para Filtrar)
121          public List GCaso(int codigo)
122          {
123              db_tipificacionEntities QCaso = new db_tipificacionEntities();
124              var QSubcaso = from Cass in QCaso.Req_Caso
125                             where Cass.IDSub.Equals(codigo)
126                             select Cass;
127  
128              return QSubcaso.ToList();
129          }
130          #endregion
131      }
132  }
133  

 

I'm missing or ignoring?

kingve
kingve

Member

Member

21 points

78 Posts

Answered Question

Re: Problem with the WebServices hosted in IIS7

Thanks for the help David, my project was to ADO.NET Entity Data Model, LINQ to SQL and change it to work perfectly from the IIS7, WCF was my mistake in almost all except one OperationContract tool as I mentioned, to change the context of LINQ to SQL class , all worked perfectly, I imagine that something bad had declared within the ADO.NET Entity Data Model and therefore did not return what I needed.
 
Thank you for your support.

davidezordan
davidezo...

Contributor

Contributor

5690 points

875 Posts

Silverlight MVP

Re: Re: Problem with the WebServices hosted in IIS7

Great! Glad to help Smile

Thanks, Davide

Silverlight MVP

Blog Twitter Silverlight Experts
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities