Skip to main content

Posts

Certain authenticated sharepoint users get "Access Denied" error

When we add our Active Directory groups into Sharepoint site groups, some of the group members receives Access Denied message. This is the problem faced in sharepoint 2007 and doesn't resolve even  individual members of the group are added. So, to get rid of it, just try through following steps: add users in DomainName/UserName format, instead of using just UserName. Avoid adding AD groups directly if you have hosted your site on port 80, and using different name apart from machine name as http://ABC, in this case don't forget to make a entry of your site in Alternate Access Path, under operations tab in central administration. Hope, this post is helpful to you :)

Lazy initialization – Lazy (.NET 4.0)

With lazy initialization, the memory for an object is not allocated until it is needed. This mainly used to improve performance, reduces unnecessary computations and also reduce memory requirements . This can be useful in following scenarios: When creation of object is expensive and we want to deferred the creation until it is used. When you have an object that is expensive to create, and the program might not use it. For example, assume that you have in memory a  Customer  object that has an  Orders  property that contains a large array of  Order  objects that, to be initialized, requires a database connection. If the user never asks to display the Orders or use the data in a computation, then there is no reason to use system memory or computing cycles to create it. By using  Lazy<Orders>  to declare the  Orders  object for lazy initialization, you can avoid wasting system resources when the object is not used. Example: class MyClass { public string MyData { get; s

Use of .NET Framework 4 Client Profile

The .NET Framework 4 Client Profile is a subset of the .NET Framework 4 that is created specifically for client applications(including WinForm, WPF, WCF, and ClickOnce). This enables faster deployment experience by having smaller download sizes and quicker install times. An application that targets the .NET Framework 4 Client Profile has a smaller redistribution package that installs the minimum set of client assemblies on the user's computer, without requiring the full version of the .NET Framework 4 to be present. When you deploy an application that targets the .NET Framework 4 Client Profile, you only need to deploy the .NET Framework 4 Client Profile. If you are deploying using ClickOnce, you can select the .NET Framework 4 Client Profile as the .NET Framework Launch Condition.  If you deploy the .NET Framework 4 Client Profile and your application targets the .NET Framework 4, the user will be prompted to install the .NET Framework 4 when he or she tries to run your

Running applications of earlier versions of .Net framework on framework 4.0

The .NET Framework 4 does not automatically use its version of the CLR to run applications that are built with earlier versions. To run older applications with .NET Framework 4, one must compile their application with the target .NET Framework version specified in the properties for your project in VS, or you can specify the supported runtime with the   <supportedRuntime> Element   in an App.Config

Named Parameter feature of C#.Net 4.0

Lets assume, your constructor definition looks like this: public Employee( string firstName, string lastName, DateTime dateOfBirth) In that case, you have no other option in C# 3.0 other than to invoke the constructor like this: Employee employee = new Employee ( "Shweta" , "Jain" , new DateTime(1990, 1, 1)); So, now in this case, it is not clear about what is being assigned in the constructor (e.g., that third DateTime parameter might be date of birth, might be date hired, who knows).   In C# 4.0, you can invoke the constructor like this: Employee employee = new Employee(firstName: "Shweta " , lastName: "Jain" , dateOfBirth: new DateTime(1990, 1, 1)); This expresses the intent clearly and makes the code more understandable. 

Certificate Signing

Signing a message, means authentifying that you have yourself assured the authenticity of the message (most of the time it means you are the author, but not neccesarily). The message can be a text message, or someone else's certificate. To sign a message, you create its hash, and then encrypt the hash with your private key, you then add the encrypted hash and your signed certificate with the message. The recipient will recreate the message hash, decrypts the encrypted hash using your well known public key stored in your signed certificate, check that both hash are equals and finally check the certificate.