Wednesday, May 14, 2014

Could not load type System.Data.Entity.DynamicProxies

Server Error in '/' Application.

Could not load type 'System.Data.Entity.DynamicProxies.Employees_31D5D8E22BDA1BDE7633258E0B872E10BE53EA325E44C778D3924FDEDFBCE14F' from assembly 'EntityFrameworkDynamicProxies-CTS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.TypeLoadException: Could not load type 'System.Data.Entity.DynamicProxies.Employees_31D5D8E22BDA1BDE7633258E0B872E10BE53EA325E44C778D3924FDEDFBCE14F' from assembly 'EntityFrameworkDynamicProxies-CTS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.



Solution:

In your entity datasource, set the value EnableFlattening="False"

Example:

<asp:EntityDataSource ID="EntityDataSource1" runat="server"  ConnectionString="name=XXXXXEntities" DefaultContainerName="XXXXXEntities" EnableFlattening="False" EntitySetName="Employees" Include="Nationalities,Locations" EntityTypeFilter="Employees" OrderBy="it.[EmployeeID]">

</asp:EntityDataSource>

Sunday, November 18, 2012

Unable to start debugging on the web server

Error :

Error while trying to run project: Unable to start debugging on the web server. Server side-error occurred on sending debug HTTP request.

Make sure the server is operating correctly. Verify there are no syntax errors in web.config by doing a Debug.Start Without Debugging. You may also want to refer to the ASP.NET and ATL Server debugging topic in the online documentation.

Solution:

Try the following:

1. Restart the PC.

(IF ABOVE SOLUTION NOT WORKS, THEN MOVE AHEAD)

2. Reset the iis from command prompt. i.e., iisreset

(IF ABOVE SOLUTION NOT WORKS, THEN MOVE AHEAD)

3. From Internet Information Service  (IIS Manager). Right click the project and click remove button to remove the project. And then click create button to create it again.

(IF ABOVE SOLUTION NOT WORKS, THEN MOVE AHEAD)

4. Uninstall the IIS from the command prompt as shown below:

%SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe –u

and then install it again

%SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe –i

(IF ABOVE SOLUTION NOT WORKS, THEN MOVE AHEAD)

5. Backup the project and then from Internet Information Service  (IIS Manager). Right click the project and click delete so that the project will delete physically from the IIS root directory.
Then reset the IIS using iisreset command in the command prompt.
Then copy the backup folder to the root directory and right click project and then click create button to create the project. Then check it,  sure it will work perfectly.

Sunday, October 7, 2012

Refresh the parent and close the popup window


The below code is for asp.net, to refresh the parent window and close the popup window at the same time.

            Dim strScript As String = "window.opener.location.reload(); self.close();"
            ScriptManager.RegisterStartupScript(Me, Me.GetType, "ALERT", strScript, True)

Sunday, June 10, 2012

What type of applications can we develop using .NET?


Following list will give us an idea about various types of application that we can develop on .NET.

1. ASP.NET Web applications: These include dynamic and data driven browser based applications.
2. Windows Form based applications: These refer to traditional rich client applications.
3. Console applications: These refer to traditional DOS kind of applications like batch scripts.
4. Component Libraries: This refers to components that typically encapsulate some business logic.
5. Windows Custom Controls: As with traditional ActiveX controls, you can develop your own windows controls.
6. Web Custom Controls: The concept of custom controls can be extended to web applications allowing code reuse and modularization.
7. Web services: They are “web callable” functionality available via industry standards like HTTP, XML and SOAP.
8. Windows Services: They refer to applications that run as services in the background. They can be configured to start automatically when the system boots up.

Wednesday, May 2, 2012

Use Windows PowerShell to restore a farm


Use Windows PowerShell to restore a farm

You can easily restore the farm using Windows PowerShell. Please follow the below steps as shown below:

1. On the Start menu, click All Programs.
2. Click Microsoft SharePoint 2010 Products.
3. Click SharePoint 2010 Management Shell.

4. To view the backups for the farm, type the following command:



Get-SPBackupHistory -Directory {BackupFolder} -ShowBackup [-Verbose]


5. At the windows PowerShell command prompt, type the following command:


Restore-SPFarm -Directory {BackupFolder} -RestoreMethod Overwrite [-BackupId ]

For More details : http://technet.microsoft.com/en-us/library/ee428311.aspx
 

Wednesday, April 18, 2012

Be nice to the people on the way up because you might meet them again on the way down!