19 November 2014

X-Frame-Options & SAMEORIGIN

Refused to display 'http://extremedev.example.com' in a frame because it is set 'X-Frame-Options' to 'SAMEORIGIN'

This is an error that can appear when you want to display a site through an iframe of another site. It will not allow for the site within the iframe to be displayed.

So what to do in this case?

There are several articles on the internet that are suggesting that you need to add some headers that will allow the display of the site through the iframe from different domains. For example: https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options

22 October 2014

Generic Method for wrapping around any code

Hey all,,
We often need to run something before some code logic and after it was executed.

As a simple example we can take the try-catch block, everybody has this in their application and is using it more then two times for sure.

What we can do in this case is to write a generic method that will allow to run our code inside a try-catch statement. This method will look like this:


Code:
public static void TryDo(Action action, ILogger logger, string messageDescription)
{
    try
    {
        action();
    }
    catch (Exception)
    {
        // Do some logging stuff here
    }
}

29 March 2011

Custom Insert/Update on LinqToSql and ASP.NET Dynamic Data

ASP.NET Dynamic Data brings major usability and RAD development changes to the existing ASP.NET data controls. RAD development is significantly increased by the use of a rich scaffolding framework.

If you want to create a custom insert or update for ASP.NET Dynamic data and LinqToSQL then you will have to perform the following steps:
1) Create a partial class for the entity you want to make the insert/update custom. For example if you had a table name employees then your code would look like this:
[ScaffoldTable(true)]
public partial class Employees
{
}

01 January 2010

Do you have any Unsolved Problems on which I could help, Ideas or Suggestions for me? Or you need some consultation in one of these areas?

Do you have any Unsolved Problems on which I could help, Ideas or Suggestions for me? Or you need  some consultation in one of these areas?


Then go ahead and write a comment with the idea or suggestion you have and I will try to answer to your comment as soon as possible.

If you have any unsolved problems in any technologies in which I have experience: C#, ASP.NET, Javascript, CSS, HTML, ASP.NET Dynamic Data, T-SQL, XSLT,.... Then write a comment. ... I will try to help to find a solution.

I can also provide some consulting help if someone needs that.

Let's do life easier for others, in case they have the same problem !!!

Need more? Leave comments and subscribe to my blog.

.