Friday, January 25, 2008

Problem with IE autocomplete

I tried to enable AutoCompetion for my Login control in DotNetNuke but IE just refused to remember by password (username was stored). However, when I tried it in Firefox it worked like charm.

I search some forums and found out that IE has problem with AutoCompletion when there is more than 2 textboxes on a page.

I solved the problem by editing the Login.ascx and Login.ascx.vb files in DotNetNuke to remove unnessesary textboxes and I also removed the search textbox by editing the skin.

After those changes IE manages to remember the password aswell as the username.

Thursday, October 25, 2007

DotNetNuke 4.6 custom provider

Today I started developing a custom provider for DotNetNuke 4.6. The new provider shall authenticate users against a Lotus Notes Directory instead of an active directory.
My approach is to inherit the new Active Directory provider that has been developed for DNN 4.6 and override the necassary methods:

public class LDAPAuthenticationProvider: DotNetNuke.Authentication.ActiveDirectory.AuthenticationProvider
{
public override Array GetAuthenticationTypes()
{
throw new NotImplementedException();
//Provider.Membership.LDAPProvider.LDAPAuthenticationProvider
}
public override System.Collections.ArrayList GetGroups()
{
throw new NotImplementedException();
}
public override string GetNetworkStatus()
{
throw new NotImplementedException();
}
public override DotNetNuke.Authentication.ActiveDirectory.UserInfo GetUser(string LoggedOnUserName)
{
throw new NotImplementedException();
}
public override DotNetNuke.Authentication.ActiveDirectory.UserInfo GetUser(string LoggedOnUserName, string LoggedOnPassword)
{
throw new NotImplementedException();
}
public override bool IsAuthenticationMember(DotNetNuke.Authentication.ActiveDirectory.GroupInfo AuthenticationGroup, DotNetNuke.Authentication.ActiveDirectory.UserInfo AuthenticationUser)
{
throw new NotImplementedException();
}
}


in the web.config I'll add the the provider:

add name="LDAPLDAPAuthenticationProvider" type="Provider.Membership.LDAPProvider.LDAPAuthenticationProvider" />

If I can tie it all together I'll probably share the code on codeplex or such.
/J.

Call a wcf service from DotNetNuke

Lately I've been working on a DotNetNuke (open source CMS) module that shall call a WCF service to retrieve data.
The problem I've been struggling with is that I don't want to make any changes in the web.config for the WCF call.
As far as I've know a call to a WCF service requires some settings in the applications web.config and since I develop a plugg-able module I can't insert any settings in the web.config. To avoid making changes I made the call to the WCF service by creating a proxy class using the old wsdl tool, intended for web services, and using that proxy class for the WCF call.

I've to look further into the possibility to set all the settings for the WCF proxy in code.

Tuesday, October 23, 2007

OWC connectionstring problem

Today I experienced a strange problem with office web components. My intention was to connect to a SSAS 2005 machine located on another domain by sting username and password in the connectionstring. Notice that this is done without using a HTTP-connection. The connectionstring I entered was: "ConnectTo=9.0;Provider=MSOLAP.3;Password=password;Persist Security Info=True;User ID=domain\username;Initial Catalog=MyTestDB;Data Source=10.10.10.10".

When I tried this I recieved an error: The peer prematurely closed the connection
So I created a javascript function that returned the currently set connectionstring and it returned "ConnectTo=9.0;Provider=MSOLAP.3;Password=password;Persist Security Info=True;User ID=domainusername;Initial Catalog=MyTestDB;Data Source=10.10.10.10"

The "\"characted had been lossed so I added another "\" to the user id and it all worked smoothly.
"ConnectTo=9.0;Provider=MSOLAP.3;Password=password;Persist Security Info=True;User ID=domain\\username;Initial Catalog=MyTestDB;Data Source=10.10.10.10"