Geeks With Blogs

Michael Freidgeim's Blog MS .Net Development March 2006 Entries
DotNetNuke Register form with minimal fields.

Provided by core Register form (\admin\Security\Register.ascx.vb) shows many fields, including address details and adminsitrator can make them optional, but not hide them.  
I was requested to show only minimal (Firstname/surname/username/email/passwords) and hide other fields from register screen, but leave them visible when  user profile is opened.

The changes I've done are posted here.

Posted On Friday, March 31, 2006 6:56 AM

Uninstall DotNetNuke SQL database changes
I wanted to delete DotNetNuke related tables from my database, which were created during accidental instalation of DotNetNuke(I accidentally provide connection to the wrong database). I decided to use UnInstall.SqlDataProvider script file from Providers\DataProviders\Sql... DNN 4.0.2 installation. However there were a lot of errors when running the script. There were also a few objects that I had to delete manually using Enterprise Manager (They probably were created by individual modules). ......

Posted On Thursday, March 30, 2006 2:02 PM

Parameters for WebConfigurationManager.OpenWebConfiguration(RootVDir, SiteNumber)
I needed to open web.config file from the external application(setup utility). I decided to use WebConfigurationManager.Ope... function. In the documentation it is not clear, that path should started with “\“ , e.g “\MyWebApp“.Passing “MyWebApp“ without leading “\” causes error. If I want to use metabase site path (e.g "/LM/W3SVC/1") instead of name of the application Web site, I can to pass “1“ as site parameter and it is fully acceptable(but not documented) ......

Posted On Tuesday, March 28, 2006 12:27 PM

MetaBuilders.ComboBox compile with Visual Studio 2005
I am using MetaBuilders.ComboBox[^] (see my previos posts here and here) and now compiled it with VS 2005.New compiler is more strict . It showed couple compiler errors “Cannot access protected member 'System.Web.UI.WebControls.... via a qualifier of type 'System.Web.UI.WebControls.... the qualifier must be of type 'MetaBuilders.WebControls.C... (or derived from it)“ for code linescontainer = new WebControl(); andbutton = new WebControl(); Fortunately ......

Posted On Friday, March 24, 2006 10:06 AM

Access 2003 Package Wizard - a big step BACK.
I am supporting Access XP(2002) Project application and recently found problems with SourceSafe 2005. Because I've got a new machine, I decided to install the latest Access 2003. The ADP file was retrieved from SourceSafe and I didn't have any major problems with upgrading. However when I wanted to create Setup Project, I found that the old MOD 2002 Packaging Wizard is not available any more, but a new Access 2003 Developere Extensions Package Wizard should be used. I found the following issues with ......

Posted On Wednesday, March 22, 2006 7:17 AM

FreeTextBox editor requires IE permission "Allow Paste Operation via script" to support Paste with Control-V.
Many sites including DotNetNuke are using FreeTextBox ASP.NET HTML Editor. I've noticed that on my Windows Server 2003 machine running IE I am not able to do Control-V to paste text to the editor, even if I can right-mouse click and select “Paste” . It was quite annoying. Accidentally I found that IE permission "Allow Paste Operation via script" is disabled on this machine. I've enabled it and now I can use Control-V to paste. I am not sure which security risks are envolved with enabling ......

Posted On Thursday, March 16, 2006 6:47 AM

DotnetNuke Changes to Promote User to SuperUser
I implemented mixed Authentication for DotNetNuke ( Use Windows Integrated Authentication for seamless logon intranet logon and use Forms authentication for users unable to use Windows Integrated authentication), similar to as I did it before for my ASP.NET application . See my previous post about some problems that I had. It is also required to promote imported from Active Directory Administrator user to SuperUser. The current DNN core doesn't support this.It only allows to create a new SuperUser. ......

Posted On Thursday, March 16, 2006 6:02 AM

Unexpected Changes in AxInterop.SHDocVw.dll
I had an existing .Net code that used WebBrowser Active-X control using AxInterop.SHDocVw.dll. I am not sure was it generated by VS or downloaded as primary interop. There were a few calls in the VB code with not specified optional third parameter like this: frmENQ.Web.ExecWB(SHDocVw.O... SHDocVw.OLECMDEXECOPT.OLECM... , z) Recently I tried to re-build the code and found the errors: Argument not specified for parameter 'pvaIn' of 'Public Overridable Sub ExecWB(cmdID ......

Posted On Wednesday, March 15, 2006 7:31 AM

ObjectHydrated pattern in DotNetNuke UserInfo is not good
DotNetNuke UserMembership class (as well as some others) hasObjectHydrated property as a flag is object loaded or not. In my opinion implementation of this pattern is fragile and not reliable. Get Membership Property of UserInfo tries to load data from UserMembership, which is not good, because Get (read-only) property should not change state of the object.It can cause different behavior in Debug and Release modes, if any code like Debug.WriteLine(ObjUser.Mem... will be used. Also assigning ......

Posted On Wednesday, March 15, 2006 6:16 AM

Handle duplicate parameters in DotNetNuke UrlRewriteModule.
In my application based on DotNetNuke 4.0.2 I've noticed that sometimes I have url with duplicate parameters, e.g "PortalID=0&PortalID=0" I didn't fully investigate why it happens and is it DNN core issue or my custom code, but the current UrlRewriteModule code doesn't handle it properly. I've created the function that will read only the first parameter and ignore the rest. 'call PortalId = GetIntFromQueryString(Request, "portalid", PortalId) '14/3/2006 Shared Function GetIntFromQueryString(ByVal ......

Posted On Tuesday, March 14, 2006 8:31 AM

How to precompile-in-place ASP.Net 2 web site, that has been deployed with "Updatable precompilation" ?
I have a scenario. Developer choose Updatable precompilation for deployment that retained the markup in Web UI content pages but moves source vb/c# code to bin dlls. Production administrator wants to avoid the performance hit on the first request and wants to run in-place pre-compilation to forces all pages in the application to compile. The problem is that aspnet_compiler fails to pre-compile “in-place”, reporting that the site is already pre-compiled. I am looking for any workaround ......

Posted On Monday, March 13, 2006 6:05 AM

DotNetNuke Windows Authentication and SuperUser permissions
I've tried to work with DotNetNuke Windows Authentication to extend it to work in mixed mode ( Use Windows Integrated Authentication for seamless logon intranet logon and use Forms authentication for users unable to use Windows Integrated authentication), as I did it before for my ASP.NET application . I found that since I activated Windows Authentication, I can logon only as my domain account user,which does not have DNN portal host or admin roles. So I unable using DNN web interface to administrate ......

Posted On Sunday, March 12, 2006 6:12 AM

How to find my own old blog entry for editing?
I have more then 70 entries im my blog, and I want to edit some old entry. My question is: What is the best procedure to find the old entry? How I am doing now: 1. Search in the Google with “site:geekswithblogs.... and keywords about the article. 2.Open the article or just note the date in the link url of the post. 3. Open my blog in Admin mode(EditPosts.aspx) 4.Estimate in my mind on which page the entry is located and open the page. 5.If I select the page correctly, open “edit“ ......

Posted On Sunday, March 12, 2006 4:13 AM

DotNetNuke Core Framework Library API Reference
UPDATE:The aricle is old.Links are not available anymore. Some time ago I looked for DotNetNuke 4.0 API Reference Help File . For some time online help and offline version was available at, but not anymore. Mark in comments pointed to http://classbrowser.subzero... Also there is no description for many methods (and even classes). It will be good if DNN core team will improve descriptions of the classes and methods. I understand, that it is a big and quite boring ......

Posted On Saturday, March 11, 2006 5:34 AM

Can't assign text to DotNetNuke LabelControl in Page_Load event.
I wanted to assign text of the LabelControl , so in the user control Page_Load function I've added code like this: If Page.IsPostBack = False Then If bSetCaptionInCode Then Me.plUsername.Text = "Your User NAME:“ end if End If Unfortunutely, it didn't work and the label was not changed. After some research I found , that LabelControl's text is populated from resources during LabelControl's Load event , which is later than container UserControl Load event. So if I want to overwrite text from ......

Posted On Wednesday, March 8, 2006 2:33 PM

Set defaultProxy configuration Element for Proxy Server
Some customers of our application have ISA Server that requires Proxy Authentication. When ASP.NET applcicationed called external web services (e.g. Google APIs) it caused the error: The request failed with HTTP status 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. ). In .Net 1/1.1. it was required to set in code myProxy.Credentials = CredentialCache.DefaultCred... . Now in .Net 2. there is a new defaultProxy ......

Posted On Wednesday, March 8, 2006 11:19 AM

Access 2002(XP) is not working with Visual SourceSafe 2005

I installed Visual SourceSafe 2005 on the machine where I have Access XP development, that worked fine with VSS 6.0D.

When open Access ADE, it showed strange errors, and didn't check out files.

So I had to return back to VSS 6.0 by running “regsvr32.exe ssscc.dll" command in the VSS
binaries folder, as it is suggested here.  

Posted On Monday, March 6, 2006 11:41 AM

Running DotNetNuke as a file-system Web site- Specify a Port

If you are running DotNetNuke as a file-system Web site in Visual Studio 2005 using ASP.NET Development Server (aka Cassini),  you must specify a Port.

Otherwise it will be assigned dynamically and no corresponding entries in PortalAlias table will be found.   

Posted On Friday, March 3, 2006 6:34 AM

Function to Clone DataView with new sort column(s)
I have a filtered DataView and I wanted to search it using different keys that was used for sorting. Ther is no function out-of-the-box, so I created a helper method public static DataView CloneDataView(DataView vwSource,string newSort) { return new DataView(vwSource.Table ,vwSource.RowFilter,newSort... ; } Another function to create new DataView with extra filter: public static DataView NewDataViewWithExtraFilter(... vwSource, string newFilter) { string sFilter = vwSource.RowFilter; ......

Posted On Thursday, March 2, 2006 1:20 PM

Change NullValue behavior for generated Typed Datasets in Visual Studio 2005.
Update: I found that the issue with similar solution is already discussed in “Setting NullValue property for typed dataset” blog In generated Typed Datasets attempt to access field with DBNull value by default throw an exception. It is usually not convinient, and I prefer to change nullValue annotation to _null, as it was suggested here However I didn't find a way to change the default(Anyone knows???). I have to open each column in desigher and change the nullValue to _null. Alternatively I have ......

Posted On Thursday, March 2, 2006 9:23 AM

Partial classes in .Net 2.0 do not allow to split property into different classes

I've started to use partial classes features and wanted to add set property to the read-only property (with get only) generated by VS.

But it is not allowed, which is fair enough.

So to add “set” functionality I have to create method or property with different name.

Posted On Thursday, March 2, 2006 7:15 AM

Copyright © Michael Freidgeim | Powered by: | Join free