Basically I have worked through my c# code, and that is looking fine, but I keep having issues with the configuration (masses of errors I have no hope in debugging).
Below is my third attempt (cut right back to the barest essentials), now when I run the service a message comes up "WCF Service Host cannot find any service metadata. This may cause the client application to run improperly. Please check that metadata is enabled. Do you want to exit?"
NOTE: the app.config file is generated so I am not sure what can be wrong with it... (I have tried remove all the namespaces just incase they were wrong (as I added them later), no effect.
namespace MOE.PaHekoService
{
[ServiceContract]
public interface IPaHekoAppList
{
[OperationContract]
List
}
}
namespace MOE.PaHekoService
{
public class PaHekoAppList : IPaHekoAppList
{
public List
{
try
{
string resPath = @System.IO.Path.GetDirectoryName(
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\Resources\\";
//Execute using LINQ to XML
List
"\\PaHekoItems.xml").Elements("item")
select (PaHekoAppItem)new PaHekoAppItem
{
acronym = c.Element("acronym").Value,
title = c.Element("title").Value,
icon = c.Element("icon").Value,
pic = new Bitmap(resPath + c.Element("icon").Value)
}).ToList();
return menuItems;
}
catch
{
return new List
}
}
}
}
namespace MOE.PaHekoData
{
[DataContract]
public struct PaHekoAppItem
{
[DataMember]
public string acronym;
[DataMember]
public string title;
[DataMember]
public string icon;
[DataMember]
public System.Drawing.Bitmap pic;
}
}
Bechir BejaouiPosted Feb 13, 2009, 5:56 PM
Grayson MitchellPosted Feb 19, 2009, 2:27 PM