Search This Blog

Monday, 7 March 2011

Could not load type ‘System.ServiceModel.Activation.HttpModule

Could not load type ‘System.ServiceModel.Activation.HttpModule :
If you install DotNet framework 4.0 on IIS server and then enable DotNet 3.0 or 3.5 WCF features, you might see following error when browse your application site made of ASP.NET 4.0 (or run on ASP.NET 4.0 application pool).
Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′.
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.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′.

Resolution

To resolve this issue, run the following from command line:
aspnet_regiis.exe /iru

Thursday, 24 February 2011

Saving changes is not permitted (SQL Server 2008)

While creating and editing a database in SQL server 2008 I soon ran into a brick wall, or a 'by design' feature of the Database Management Studio.
When you design a table in a database and then try to make a change to a table structure that requires the table to be recreated, the Database Management Studio will not allow you to save the changes.
This is caused by a configuration setting that default results in the following dialog:


Error dialog
This dialog states: "Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created."
You can only react clicking the Cancel button.
And than Management Studio shows this dialog:


So what you want to do to configure the setting with the value you want (IMHO should be the default setting!).
Go to: Tools > Options
 Tools menu choose Options
Select the tab Designers and choose Tables and designers

And uncheck the option: "Prevent saving changes that require table re-creation".
Once you now save changes it will work.

Tuesday, 22 February 2011

I am using WCF in my application while binding the records from the WCF to my application. the below error occours.

<
<
<
system.serviceModel>bindings>wsHttpBinding><binding name="WSHttpBinding_ISerProductLib" closeTimeout="00:01:00"openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"maxBufferPoolSize="524288" maxReceivedMessageSize="65536"messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
Answer:
Increase the size of maxbufferpoolsize and maxreceivedmessagesize in config file of client application. as bellow.

<
<
<
system.serviceModel>bindings>wsHttpBinding><binding name="WSHttpBinding_ISerProductLib" closeTimeout="00:01:00"openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"

Monday, 21 February 2011

Reset MS SQL password

hi,
To reset the password in ms sql, you please enter into the ms sql as windows authentication and move to the particular database and open sql editor and run the blow query.
SP_PASSWORD @NEW = 'New password', @loginame = 'sa'

After running the query just exist the ms sql and open and login the ms sql with new password