Entities not loaded after domainContext.Load(domainContext.GetUsers) in WCF RIA service

If you use LINQ to SQL and you’re entities are not loaded after you call a GetQuery on the DomainContext, you probably did not use a callback.

TTSDomainContext context = new TTSDomainContext();
LoadOperation op = context.Load(
context.GetTasksQuery(),
result =>
{
  if (!result.HasError)
  {
    //At this point the entities are loaded
       }
    },null); 

Get only the changed data from the database with Linq to SQL and .NET RIA Services in Silverlight 3

If you cache data in you’re Silverlight 3 application and want to sync (get the latest data from the database) the entities, you can use the Load function with the LoadBehavior.RefreshCurrent option. This will get the latest data from the database, but only the changed entities.

private EntitySet<TTUser> _userData;
        public EntitySet<TTUser> UserData
        {
            get
            {
                return _userData;
            }
            set
            {
                _userData = value;
            }
        }

private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            if (WebContext.Current.User.IsAuthenticated)
            {
                TTSDomainContext context = new TTSDomainContext();
                this.UserData = context.TTUsers;
                tasksDataGrid.ItemsSource = this.UserData;
                context.Load(context.GetUsersQuery(),LoadBehavior.RefreshCurrent,true);
            }
        }

 

You can use the Submitchanges() function to update the database.

Implementing custom authentication with .NET RIA Services and Silverlight 3, by using a Custom Membership Provider

I am creating a Silverlight 3 application that must work with a database that is used by a legacy ASP .net 1.0 system. The database contains tables for users and roles. The Silverlight 3 application should use forms authentication and use the “User” and “Role” table in the database.

First I tried to change the uthenticationService : AuthenticationBase<UserWeb> to inherit my “LINQ to SQL” domainservice, but then I got a exception:

The entity type ‘Ada.Tts.Toggle.Silverlight.Web.Company’ is exposed by multiple DomainService types. Entity types cannot be shared across DomainServices

I solved this problem by implementing a custom membership provider, the custom membership provider uses the Linq to SQL domainservice.

TTSMembershipProvider.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;

namespace Ada.Tts.Toggle.Web.BC
{
    public class TTSMembershipProvider : MembershipProvider
    {
        public override string ApplicationName
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }
        public override bool ChangePassword(string username, string oldPassword, string newPassword)
        {
            throw new NotImplementedException();
        }
        public override bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer)
        {
            throw new NotImplementedException();
        }
        public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
        {
            throw new NotImplementedException();
        }
        public override bool DeleteUser(string username, bool deleteAllRelatedData)
        {
            throw new NotImplementedException();
        }
        public override bool EnablePasswordReset
        {
            get { throw new NotImplementedException(); }
        }
        public override bool EnablePasswordRetrieval
        {
            get { throw new NotImplementedException(); }
        }
        public override MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
        {
            throw new NotImplementedException();
        }
        public override MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
        {
            throw new NotImplementedException();
        }
        public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords)
        {
            throw new NotImplementedException();
        }
        public override int GetNumberOfUsersOnline()
        {
            throw new NotImplementedException();
        }
        public override string GetPassword(string username, string answer)
        {
            throw new NotImplementedException();
        }
        public override MembershipUser GetUser(object providerUserKey, bool userIsOnline)
        {
            throw new NotImplementedException();
        }
        public override MembershipUser GetUser(string username, bool userIsOnline)
        {
            throw new NotImplementedException();
        }
        public override string GetUserNameByEmail(string email)
        {
            throw new NotImplementedException();
        }
        public override int MaxInvalidPasswordAttempts
        {
            get { throw new NotImplementedException(); }
        }
        public override int MinRequiredNonAlphanumericCharacters
        {
            get { throw new NotImplementedException(); }
        }
        public override int MinRequiredPasswordLength
        {
            get { throw new NotImplementedException(); }
        }
        public override int PasswordAttemptWindow
        {
            get { throw new NotImplementedException(); }
        }
        public override MembershipPasswordFormat PasswordFormat
        {
            get { throw new NotImplementedException(); }
        }
        public override string PasswordStrengthRegularExpression
        {
            get { throw new NotImplementedException(); }
        }
        public override bool RequiresQuestionAndAnswer
        {
            get { throw new NotImplementedException(); }
        }
        public override bool RequiresUniqueEmail
        {
            get { throw new NotImplementedException(); }
        }
        public override string ResetPassword(string username, string answer)
        {
            throw new NotImplementedException();
        }
        public override bool UnlockUser(string userName)
        {
            throw new NotImplementedException();
        }
        public override void UpdateUser(MembershipUser user)
        {
            throw new NotImplementedException();
        }
        public override bool ValidateUser(string username, string password)
        {
            bool result = false;
            TimeTrackerDataContext context = new TimeTrackerDataContext();
            var users = from u in context.TTUsers
                                    where u.UserName == username && u.Password == Protector.Encrypt(password)
                                    select u;

            if (users != null && users.ToList<TTUser>().Count > 0)
            {
                    result = true;
            }
            
            return result;
        }
    }
}


Web.config

<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data Source=.;Initial Catalog=TimeTracker;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!-- 
Set compilation debug="true" to insert debugging 
symbols into the compiled page. Because this 
affects performance, set this value to true only 
during development.
-->
<roleManager enabled="true"/>
<globalization culture="auto"/>
<membership defaultProvider="TTSMembershipProvider">
<providers>
<clear/>
<add
name="TTSMembershipProvider"
type=" Ada.Tts.Toggle.Web.BC.TTSMembershipProvider, Ada.Tts.Toggle.Web"/>
</providers>
</membership>
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<!--
The <authentication> section enables configuration 
of the security authentication mode used by 
ASP.NET to identify an incoming user. 
-->
<authentication mode="Forms">
<forms name=".Ada.Tts.Toggle_ASPXAUTH" />
</authentication>
<!--
The <customErrors> section enables configuration 
of what to do if/when an unhandled error occurs 
during the execution of a request. Specifically, 
it enables developers to configure html error pages 
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<profile>
<properties>
<add name="FriendlyName"/>
</properties>
</profile>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<httpHandlers>
<add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="DomainServiceModule" type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<!-- 
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0.  It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="DomainServiceModule" preCondition="managedHandler" type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
</system.serviceModel>
</configuration>

 

For more information on implementing a custom roleprovider, see:

http://davidhayden.com/blog/dave/archive/2007/10/17/CreateCustomRoleProviderASPNETRolePermissionsSecurity.aspx

Microsoft Windows 7 and pressing single or double quotes on keyboard

I installed Microsoft Windows 7 with the keyboard layout

English (United States)
    Keyboard
        US

When you press a single or double quote with this keyboard layout, the quotes will only appear after pressing another key.
If you want the quotes to appear directly change the keyboard layout to US in the control panel:

Start > Control Panel > All Control Panel Items > Region and Language > tab keyboard and languages > Change keyboards


image_thumb[2]

 

After changing the keyboard layout, restart the program you’re where typing in, because the keyboard layout might be cached.

Making the Silverlight 3 .NET RIA Services Business Application, authenticate to SQL Server and not SQLServerExpress

If you’re are using SQL Server Developer edition to develop a Silverlight 3 .NET RIA Services Business Application you might encounter an exception during login:

Load operation failed for query ‘Login’.

at System.Web.DomainServices.ReflectionDomainServiceDescriptionProvider.ReflectionDomainOperationEntry.Invoke(DomainService domainService, Object[] parameters)
   at System.Web.DomainServices.DomainOperationEntry.Invoke(DomainService domainService, Object[] parameters, Int32& totalCount)
   at System.Web.DomainServices.DomainService.Query(QueryDescription queryDescription, IEnumerable`1& validationErrors, Int32& totalCount)
   at System.Web.Ria.Services.QueryOperationBehavior`1.QueryOperationInvoker.InvokeCore(Object instance, Object[] inputs, Object[]& outputs)

This is because the providers make use of the connectionstring with the name [LocalSqlServer] from you’re machine.config by default this contains the .\SQLServerExpress instead of MSQLServer, you can change this by editing the web.config:

<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer"  connectionString="Data Source=.;Initial Catalog=YoureTestDb;Integrated Security=True"    providerName="System.Data.SqlClient"/>
</connectionStrings>

Note:

Make sure the “YoureTestDb” contain the “aspnet_…” authentication tables, by using: C:\Windows\Microsoft.NET\Framework\v2.0.50727>Aspnet_regsql.exe

To install all functionality on a specific database use:
“C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet_regsql.exe” -S MyServer -E -d MyDatabase -A all

If you only want to add membership and roles use:

“C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet_regsql.exe” -S MyServer -E -d MyDatabase -A mr

Don’t forget to do an iisreset

see: http://msdn.microsoft.com/en-us/library/x28wfk74.aspx

How to sum TimeSpan in LINQ with C#

If you want to sum TimeSpan properties in LINQ with C#, use:

            List<TimeSpan> list = new List<TimeSpan>             {
new TimeSpan(1),
new TimeSpan(2),
new TimeSpan(3)
};
// TimeSpan.Zero is the initial offset, in this case 0 ticks
// subtotal is used to sum to items in the list
// t is the current item in the list
TimeSpan total = list.Aggregate(TimeSpan.Zero, (subtotal, t) => subtotal.Add(t));
Console.WriteLine(total.Ticks);
// Result: 6

 

 

Thanks to: http://stackoverflow.com/questions/970178/c-how-to-use-the-enumerable-aggregate-method

Short cut for pasting unformatted text, with the default paste options in Microsoft Office 2010

In most cases when I copy text from a source document or website and want to paste this text in Microsoft Office Outlook or Microsoft Office Word, I want the text to be formatted like the destination document (pasting as unformatted text). Previously I used two methods to accomplish this:

  • Paste > Paste Special > Unformatted Text > OK ( 4 clicks)
  • Notepad ctrl+a then ctrl+v the ctrl+a and then ctrl+c (1 click but many key presses)

Paste special dialog

image

In Microsoft Office 2010 (and perhaps in older Microsoft Office versions) you can now set default paste options to unformatted text. The pasted text will be formatted like the destination document

In Microsoft Office Word 2010

  • File > Options > Advanced > [Cut, copy and paste] section > Keep Text Only

image

In Microsoft Office Outlook 2010

  • Open a new mail message
  • File > Options > Mail > Editor Options > Advanced > [Cut, copy and paste] section > Keep Text Only

image

When you paste text in you’re mail or word document, it will be formatted like the mail or document.

 

Microsoft Office 2010 OneNote

  • In Microsoft Office 2010 OneNote, you can use the [Contenxt Menu Key] + T, instead of [CTRL + V] to paste unformatted text.
  • Or use alt + h + v + t

Set initial sorting on a Telerik RadGrid column

If you want to set an initial sorting on a column on a Telerik RadGrid, use the “NeedDataSource” event and add a GridSortExpression to the MasterTableView.SortExpressions

        protected void RadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
// Set datasource here…

if (!IsPostBack)
{
                // Clear the current sortexpressions
this.RadGrid.MasterTableView.SortExpressions.Clear();
// Create "Date" sorting
GridSortExpression expression = new GridSortExpression();
expression.FieldName = "Date";
expression.SortOrder = GridSortOrder.Descending;
// Set initial sortexpression to the [Date] column
this.opdrachtenRadGrid.MasterTableView.SortExpressions.AddSortExpression(expression);

            }
}

In the aspx page:

              <telerik:GridDateTimeColumn
DataField="Date"
HeaderText="Date"
SortExpression="Date"
UniqueName="Date"
FilterControlWidth="70px"
ShowFilterIcon="false"
DataType="System.DateTime"
CurrentFilterFunction="EqualTo"
PickerType="DatePicker"
AutoPostBackOnFilter="true"
HtmlEncode="false"
DataFormatString="{0:dd-MM-yyyy}"
meta:resourcekey="Date">
<ItemStyle Width="70px" />
</telerik:GridDateTimeColumn>


Or you could use the “SortExpressions” tag in the MasterTableView tag:

<telerik:RadGrid ID="RadGrid1" runat="server"> <MasterTableView> <SortExpressions> <telerik:GridSortExpression FieldName="Name" SortOrder="Ascending" /> </SortExpressions> <Columns> <telerik:GridBoundColumn AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" DataField="Name" FilterControlWidth="200px" meta:resourcekey="CustomerNameColumn" UniqueName="Name" SortExpression="Name" ShowFilterIcon="true"> <ItemStyle Width="200px" /> </telerik:GridBoundColumn>

……

How to solve: IE 8 new tab hang on Connecting… on Windows 7 x64

The solution posted on: http://social.answers.microsoft.com/Forums/en-US/InternetExplorer/thread/e312e580-1cbc-496b-8c6b-b69b8535a7bb solved my problem

For Win 7 64 bits :
1 – Create a new notepad document and paste this text :
@echo off
echo.
echo IEREREG Version 1.07 for IE8 27.03.2009
echo by Kai Schaetzl
http://iefaq.info
echo installs and registers (if suitable) all DLLs known to be used by IE8.
echo should only take a few seconds, but please be patient
echo.
REM ******************************
echo registering IE files
REM IE files (= part of setup)
regsvr32 /s /i browseui.dll
REM regsvr32 /s /i browseui.dll,NI (unnecessary)
regsvr32 /s corpol.dll
regsvr32 /s dxtmsft.dll
regsvr32 /s dxtrans.dll
REM simple HTML Mail API
regsvr32 /s “%ProgramFiles(x86)%\internet explorer\hmmapi.dll”
REM group policy snap-in
regsvr32 /s ieaksie.dll
REM smart screen
regsvr32 /s ieapfltr.dll
REM ieak branding
regsvr32 /s iedkcs32.dll
REM dev tools
regsvr32 /s “%ProgramFiles(x86)%\internet explorer\iedvtool.dll”
regsvr32 /s iepeers.dll
REM Symptom: IE8 closes immediately on launch, missing from IE7
regsvr32 /s “%ProgramFiles(x86)%\internet explorer\ieproxy.dll”
REM no install point anymore
REM regsvr32 /s /i iesetup.dll
REM no reg point anymore
REM regsvr32 /s imgutil.dll
regsvr32 /s /i /n inetcpl.cpl
REM no install point anymore
REM regsvr32 /s /i inseng.dll
regsvr32 /s jscript.dll
REM license manager
regsvr32 /s licmgr10.dll
REM regsvr32 /s msapsspc.dll
REM regsvr32 /s mshta.exe
REM VS debugger
regsvr32 /s msdbg2.dll
REM no install point anymore
REM regsvr32 /s /i mshtml.dll
regsvr32 /s mshtmled.dll
regsvr32 /s msident.dll
REM no reg point anymore
REM regsvr32 /s msrating.dll
REM multimedia timer
regsvr32 /s mstime.dll
REM no install point anymore
REM regsvr32 /s /i occache.dll
REM process debug manager
regsvr32 /s “%ProgramFiles(x86)%\internet explorer\pdm.dll”
REM no reg point anymore
REM regsvr32 /s pngfilt.dll
REM regsvr32 /s /i setupwbv.dll (not there anymore!)
regsvr32 /s tdc.ocx
regsvr32 /s /i urlmon.dll
REM regsvr32 /s /i urlmon.dll,NI,HKLM
regsvr32 /s vbscript.dll
REM VML renderer
regsvr32 /s “%CommonProgramFiles%\microsoft shared\vgx\vgx.dll”
REM no install point anymore
REM regsvr32 /s /i webcheck.dll
regsvr32 /s /i /n wininet.dll
REM ******************************
echo registering system files
REM additional system dlls known to be used by IE
REM added 11.05.2006 Symptom: Add-Ons-Manager menu entry is present but nothing happens
regsvr32 /s extmgr.dll
REM added 12.05.2006 Symptom: Javascript links don’t work (Robin Walker) .NET hub file
regsvr32 /s mscoree.dll
REM added 23.03.2009 Symptom: Find on this page is blank
regsvr32 /s oleacc.dll
REM added 24.03.2009 Symptom: Printing problems, open in new window
regsvr32 /s ole32.dll
REM mscorier.dll
REM mscories.dll
REM Symptom: open in new tab/window not working
regsvr32 /s actxprxy.dll
regsvr32 /s asctrls.ocx
regsvr32 /s cdfview.dll
regsvr32 /s comcat.dll
regsvr32 /s /i /n comctl32.dll
regsvr32 /s cryptdlg.dll
regsvr32 /s /i /n digest.dll
regsvr32 /s dispex.dll
regsvr32 /s hlink.dll
regsvr32 /s mlang.dll
regsvr32 /s mobsync.dll
regsvr32 /s /i msieftp.dll
REM regsvr32 /s msnsspc.dll #no entry point
regsvr32 /s msr2c.dll
regsvr32 /s msxml.dll
regsvr32 /s oleaut32.dll
REM regsvr32 /s plugin.ocx #no entry point
regsvr32 /s proctexe.ocx
REM plus DllRegisterServerEx ExA ExW … ?
regsvr32 /s /i scrobj.dll
REM shdocvw.dll hasn’t been updated for IE7 and IE8, it still registers itself for the Windows Internet Controls
regsvr32 /s /i shdocvw.dll
regsvr32 /s sendmail.dll
REM ******************************
REM PKI/crypto functionality
REM initpki can take very long to run and is rarely a problem
REM if there are problems with crypto, SSL, certificates
REM remove the three following REMs from the lines
REM echo We are almost done except one crypto file
REM echo but this will take very long, be patient!
REM regsvr32 /s /i:A initpki.dll
REM ******************************
REM tabbed browser, do at the end, why originally with /n ?
regsvr32 /s /i ieframe.dll
REM ******************************
echo correcting bugs in the registry
REM do some corrective work
REM Symptom: new tabs page cannot display content because it cannot access the controls (added 27. 3.2009)
REM This is a result of a bug in shdocvw.dll (see above), probably only on Windows XP
reg add “HKCR\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0\win32” /ve /t REG_SZ /d %systemroot%\system32\ieframe.dll /f
REM ******************************
echo all tasks have been finished
echo.
pause
2 – Close all your IE windows and processes.
3 – Save your document on your Desktop by example, with the .bat extension. Right-click on it, and select “Run as administrator”.
4 – Test if this tip resolved your issue by openning IE. If you use a Windows 32 bits version, please replace %ProgramFiles(x86)% by %ProgramFiles% in your .bat file.