How to Compare Schema or Data of two Database Created in MS SQL SERVER 2008 using Visual Studio 2010

30. November 2012

During my work i encounter this problem of different versions of Database one on my local development machine and one on my web hosting server . Now to check whether they are same or not i searched a bit and found a way to do so . 

All you need is a Visual Studio 2010 ultimate / Premium - you can check here which version can do this thing http://msdn.microsoft.com/en-us/library/dd193250.aspx

Steps you have to go through - 

1. Open the VS 2010 and add both the databases in Server Explorer under Data Connections . 

2. Right click on the primary DB you want to compare to with the secondary one and click on Compare Schema/Compare Data which ever you want to do . 

3. Next a new popup window will open and it will ask you to set the primary database and secondary database . Click OK after selecting appropriately . 

4. A new Tab will open and your schema/data will be compared with all the description as in what is equal and what is not . 

 

MSSQL 2008

Error: Cannot write configuration file due to insufficient permissions when trying to change .Net trust level from IIS Manger

29. November 2012

Error: Cannot write configuration file due to insufficient permissions

This error usually comes when you are using source control over your project and you have explicitly not check out your file for modifications . Try check out in source control software you are using and then copy the file to inetpub and try again the process of modifying .Net trust level from IIS manager , it should work now . 

IIS

SecurityException: That assembly does not allow partially trusted callers while using itextsharp dll

29. November 2012

When you are using itextsharp library on a shared web hosting server then you might get this type of error because of .net trust level being set to Medium . 

 

Now in order to resolve this issue you will have to rebuild the original dll source that is itextsharp source with a slight change in AssemblyInfo.cs 

You will have to Insert this Statement in it 

[assembly: System.Security.AllowPartiallyTrustedCallers]

And rebuild the same and reference the new dll and there wont be any error anymore . If you donot have source for itextsharp then you can download from this link - http://sourceforge.net/projects/itextsharp/?source=dlp

If you are not able to resolve this issue then a descriptive explanation is also provided on this blog post - http://www.ben-morris.com/allow-partially-trusted-callers-asp-net-shared-hosting-environments

OR

Click Here 

iTextSharp ,

How to Add Header and Footer to a PDF file using iTextSharp library in .net

28. November 2012

Below is a link to a very descriptive and easy to use code for adding Header and Footer in a PDF file while using the iTextSharp library . 

http://www.mazsoft.com/blog/post/2008/04/30/Code-sample-for-using-iTextSharp-PDF-library.aspx#

 

iTextSharp

Getting Started with asp.net MVC

19. November 2012

You can start your learning process through this link with an option provided to download free Visual Studio 2012 Express Edition with MVC 4 :

http://www.asp.net/mvc

ASP.NET MVC ,

Error in blogengine.net when placing it in sub directory of your hosting

6. November 2012

 

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS. 

Causes : That basically means the web.config file supplied with BlogEngine.NET includes some settings that are application-level. The fact that you are seeing the error means that you have the blog off of the root directory of your site, probably like the following? When you place your blogengine.net code in a sub folder like yourdomain.com/blogs then it will throw an error 

Now in order to resolve this issue you will have to goto your hosting control panel and and select IIS Management . There will be an option to create a new AppPool . Create a new one and point it to your sub folder which is /blogs . After the creation process is done just reload your webpage on which you have blogengine.net and it will start working . 

 

 

BlogEngine.NET

How to add From Display name in web.config for smtp

6. November 2012

We will have to enter the below code in web.config . Just add the text you want to add in place of <name> :

 

<smtp from="<name>&lt;<[email protected]>&gt;">
<network host="<hostname>" port="25" userName="" password="" />
</smtp>

smtp , ,

Welcome to Mymezon

6. November 2012

I will post my day to day encounters while i code my latest project www.sitrep.co.in