Click here to Skip to main content
15,887,350 members
Home / Discussions / WPF
   

WPF

 
QuestionTwo-Dimensional Datagrid Help Pin
madusanka8931-May-16 3:13
madusanka8931-May-16 3:13 
AnswerRe: Two-Dimensional Datagrid Help Pin
CHill6031-May-16 5:11
mveCHill6031-May-16 5:11 
GeneralRe: Two-Dimensional Datagrid Help Pin
Gerry Schmitz31-May-16 5:37
mveGerry Schmitz31-May-16 5:37 
GeneralRe: Two-Dimensional Datagrid Help Pin
CHill6031-May-16 5:42
mveCHill6031-May-16 5:42 
QuestionThe name "employeeviewmodel" does not exist in the namespace "clr-namespace:testwpfvbapplication.viewmodel". Pin
indian14326-May-16 10:24
indian14326-May-16 10:24 
AnswerRe: The name "employeeviewmodel" does not exist in the namespace "clr-namespace:testwpfvbapplication.viewmodel". C:\users\abdul.aleem\desktop\testwpfapplication\testwpfvbapplication\view\mainwindow.xaml Pin
Richard Deeming26-May-16 10:55
mveRichard Deeming26-May-16 10:55 
GeneralRe: The name "employeeviewmodel" does not exist in the namespace "clr-namespace:testwpfvbapplication.viewmodel". Pin
indian14326-May-16 12:17
indian14326-May-16 12:17 
QuestionRequest Entity Too Large Pin
Mycroft Holmes25-May-16 21:57
professionalMycroft Holmes25-May-16 21:57 
We are getting this error on a WPF to WCF application, mostly when the user wants to upload a file, the files are generally fairly small 200-300kb. It happens mostly for a WAN connection but has happened locally as well.

I have synched the web config and the client values. They are all maxed to int.MaxValue. We have even resorted to setting the MaxItemsInObjectGraph for each method on the client and we still get the error intermittently.

I enclose the code for getting the service client. Any suggestions will be appreciated and followed up assiduously.
C#
     static NPAFinSvcClient GetNPAFinServiceClient()
        {
            string url = string.Empty;
~#if DEBUG
            url = "http://localhost:49223/NPAFinSvc.svc";
~endif
            NPAFinSvcClient client = new NPAFinSvcClient(GetBinding(), new EndpointAddress(new Uri(url, UriKind.RelativeOrAbsolute)));
            foreach (OperationDescription op in client.ChannelFactory.Endpoint.Contract.Operations)         {
                DataContractSerializerOperationBehavior dataContractBehavior = op.Behaviors.Find<DataContractSerializerOperationBehavior>() as DataContractSerializerOperationBehavior;
                if (dataContractBehavior != null)
                {
                    dataContractBehavior.MaxItemsInObjectGraph = int.MaxValue;
                }
            }
            client.Open();
            return client;
        }

        static BasicHttpBinding GetBinding()
        {
~if Release
            var binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);            
~else
            var binding = new BasicHttpBinding(BasicHttpSecurityMode.None);         
~endif
            binding.MaxReceivedMessageSize = int.MaxValue;
            binding.MaxBufferSize = int.MaxValue;
            binding.SendTimeout = new TimeSpan(2, 0, 0);
            binding.ReceiveTimeout = new TimeSpan(2, 0, 0);
            binding.ReaderQuotas.MaxArrayLength = int.MaxValue;
            binding.ReaderQuotas.MaxBytesPerRead = int.MaxValue;
            binding.ReaderQuotas.MaxDepth = int.MaxValue;
            binding.ReaderQuotas.MaxNameTableCharCount = int.MaxValue;
            binding.ReaderQuotas.MaxStringContentLength = int.MaxValue;
            return binding;
        }
Never underestimate the power of human stupidity
RAH

AnswerRe: Request Entity Too Large Pin
Gerry Schmitz26-May-16 7:45
mveGerry Schmitz26-May-16 7:45 
GeneralRe: Request Entity Too Large Pin
Mycroft Holmes26-May-16 14:28
professionalMycroft Holmes26-May-16 14:28 
GeneralRe: Request Entity Too Large Pin
Mycroft Holmes26-May-16 17:58
professionalMycroft Holmes26-May-16 17:58 
QuestionHow to bind a nested Property of an attached Property Pin
Member 808505724-May-16 4:47
Member 808505724-May-16 4:47 
QuestionWPF Binding Question Pin
#realJSOP24-May-16 4:12
mve#realJSOP24-May-16 4:12 
AnswerRe: WPF Binding Question Pin
#realJSOP24-May-16 5:02
mve#realJSOP24-May-16 5:02 
QuestionBinding the x,y location on a Canvas with a ItemsControl Pin
Kenneth Haugland19-May-16 17:38
mvaKenneth Haugland19-May-16 17:38 
AnswerRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Kenneth Haugland19-May-16 19:28
mvaKenneth Haugland19-May-16 19:28 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Meshack Musundi23-May-16 2:54
professionalMeshack Musundi23-May-16 2:54 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Kenneth Haugland23-May-16 11:26
mvaKenneth Haugland23-May-16 11:26 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Pete O'Hanlon25-May-16 0:56
mvePete O'Hanlon25-May-16 0:56 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Meshack Musundi25-May-16 1:27
professionalMeshack Musundi25-May-16 1:27 
QuestionRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Kenneth Haugland7-Jun-16 20:22
mvaKenneth Haugland7-Jun-16 20:22 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Meshack Musundi8-Jun-16 10:27
professionalMeshack Musundi8-Jun-16 10:27 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Kenneth Haugland8-Jun-16 10:41
mvaKenneth Haugland8-Jun-16 10:41 
QuestionGet Datagrid Selected cell value in ViewModel Pin
indian14315-May-16 12:48
indian14315-May-16 12:48 
AnswerRe: Get Datagrid Selected cell value in ViewModel Pin
Pete O'Hanlon15-May-16 23:26
mvePete O'Hanlon15-May-16 23:26 

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.