12/15/12

SharePoint Designer 2010 how to change the current user

www.og-bit.com When using SharePoint Designer 2010 to connect to a SharePoint and SharePoint online website, the application prompts the user to login for the first time. After the user has logged on once, the application caches this information and automatically logins to the website the...

11/10/12

Office 365 Public Website Branding

Office 365 provides by default a public website which is usually located at an URL similar to this: og-bit.com http://mydomain.com/pages/default.aspx The pages folder is already set up with public permissions. This allows the site to be visited by non-authenticated users. The pages on this site are created with the root.master page. This master page can’t be modified to brand our site. The...

11/5/12

The type was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically

When trying to serialize a complex object using the XmlSerializer, we can encountered a Type was not expected exception. This exception is generated as a result of a property declared as a base type, but the actual reference is done with a child class instance. For example: og-bit.com Class Declaration: public class Account { int number { get; set; } } public class Client { public...

11/1/12

There was no endpoint listening - WCF Certificate Policy

When using WCF with transport security, you may encounter this error: og-bit.com “There was no endpoint listening at https://servername/Service1.svc that could accept the message. This is often caused by an incorrect address or SOAP action” This is often caused because we tend to use a dev or expired certificate which is actually not valid and causes an invalid certificate exception that...

WCF Service Configuration Visualized

I created this diagram that attempts to help us visualize how a WCF service configuration is constructed. The diagram does not display every single attribute that can be added to a configuration, but the goal is to show the main settings and their associations.  The diagram is divided into two...

10/22/12

The site template requires that the feature be installed in the farm or site collection.

The site template requires that the feature be installed in the farm or site collection This message is usually generated when we try to create a new site from a site template, but the site template was built as a Sandboxed solution and depends on a site scope feature which may not be active or...

10/4/12

Database First Development with ASP.NET MVC Scaffolding and Entity Framework

With ASP.NET MVC and Scaffolding, we are able to code first and create the database objects from the model. This approach basically allows us to create the model classes (implementation). We can then use Scaffolding to create the controller, view and database objects with code generation.  This...

10/3/12

Unable to load the specified metadata resource

Exception Description: og-bit.com Exception Details: System.Data.MetadataException: Unable to load the specified metadata resource. Resolution: This error is often generated when we are using the Entity Framework for database access. The error means that there is a problem with finding the metadata information to allow the Entity Framework to work properly and translate queries against the...

9/20/12

MVC WebGrid Helper

If you are using Razor views and need to build a grid to show data, you can leverage the WebGrid  HTML helper. This helper can let us build a grid with several features like custom styles, sorting, paging and AJAX reload.    This helper is found in the System.Web.Helpers.dll which...