Skip to main content

Posts

Test method AddItemRankTest threw exception: System.ServiceModel.ActionNotSupportedException: The message with Action 'urn:xxx.com:xxx /AddItemRank' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and …

This summary is not available. Please click here to view the post.

LINQ Errors: “The Type arguements for method cannot be inferred from the usage. Try specifying the type arguments explicitly ” & for the data context object “There is no implicit reference conversion from XXX RepositoryContainer(ReportContext) to System.Data.Objects.ObjectContext”.

Day before yesterday, we faced minor problem in compiling our wcf service which is using LINQ for DML operations.  It’s continuously yielding in giving the errors like “The Type arguments for method cannot be inferred from the usage. Try specifying the type arguments explicitly ” & for the data context object “There is no implicit reference conversion from XXX RepositoryContainer(ReportContext) to System.Data.Objects.ObjectContext  ”.

Implement Serverside ViewState

If you think your website is running slowly and you need to improve performance by 150% in short time . This may help you a lot. ASP.NET ViewState is a great mechanism that simplifies the life of ASP.NET developers. But, as everybody knows, the .NET Framework saves the ViewState data as a hidden field on your ASPX page. If your page has only a few controls, this is not a problem. But, if your page has some Panel s and/or some DataGrid s, with the technique demonstrated on this article, you could reduce dramatically the load time of the page.

Using IsInRole() with Forms Authentication

A Little background…. Page object provides User [ System.Security.Principal.IPrincipa l ] in order to access to the information about the current authenticated user. User is having following two important members. These members provide way to implement Role-based authorization programmatically. Identity [Property] [ System.Security.Principal.IPrincipal.Identity ] – This property provides important members like AuthenticationType, IsAuthenticated, Name. IsInRole [Method] [ System.Security.Principal . IPrincipa l ] – This method takes single parameter that is string value of Role for which to check the membership.

Basic Differences between Abstract class and Interface

 Behaviour Abstract Class Interface Multiple Inheritance Not Possible Possible Inheritance Chain(of same type) Possible Not Possible (does not fall under the inheritance chain of same type) Concrete Functionality Possible Not Possible Private Members Not Possible Possible Type can be declared as method input parameter Not Possible (because instance could not be created) Possible (acceptable with fully implemented instance is being passed) Structs can implement Not Possible Possible Every member needs to be implemented No Yes