моя система была в "американской" культуре.Теперь я изменил свою культуру на "Турция".
Пожалуйста, посмотрите на следующий код
Это служебный файл service1.svc.cs
[ServiceBehavior]
public class SPPChatService : IService
{
public string getValue()
{
return "Gcid";
}
}
Это мойasp.net code
private IService CreateNewChannel()
{
#region Define WCF Binding
//Binding
WSHttpBinding bindingSupportChatService = new WSHttpBinding(SecurityMode.None, false);
//Reader Quotas
XmlDictionaryReaderQuotas readerQuotas = new XmlDictionaryReaderQuotas();
bindingSupportChatService.ReaderQuotas = readerQuotas;
#endregion
#region Define Endpoint object
string chatServiceURL = WebConfigurationManager.AppSettings["ChatServiceURL"];
EndpointAddress endpointSupportChatService = new EndpointAddress(chatServiceURL);
#endregion
//create a channel to the service
ChannelFactory<IService> channelFactorySupportChatService = new ChannelFactory<IService>(bindingSupportChatService, endpointSupportChatService);
channelChatService = channelFactorySupportChatService.CreateChannel();
return channelChatService;
}
page_load method()
{
channelService = CreateNewChannel();
//calling webservice method here
(channelService as IService).getValue();
}
// Поскольку моя система основана на культуре Турции, я получаю кое-что еще.Как я могу получить именно "Gcid", даже если это в любых региональных настройках..net 3.5 и VS 2010 - это моя среда