Geeks With Blogs

Michael Freidgeim's Blog MS .Net Development February 2006 Entries
Different Web Setup Projects should have different output directories in Visual Studio 2005
I have 2 similar Setup Projects in Visual Studio 2005 solution. Actually second project was copied from the first one and some changes were done. The first project has ouput file set as “Release\Project1.msi... and the second ““Release\Proje... I expected that “build solution“ will create both .msi files in the output directory. However the second project cleans the output directory during build , and the Project1.msi was deleted. The solution was to ......

Posted On Friday, February 24, 2006 2:07 PM

Dynamic Web Services reference URL in Visual Studio 2005
I am using dynamic URLBehavior for some web services and during Setup change web services URLs to appropriate value (based on MSDN article). According to MSDN2: If you set the URL behavior of the Web reference to dynamic, the application obtains the URL at run time from the appSettings element of your application's configuration file. However I've noticed that app.config file has entries for the same URL in both appSettings and <applicationSettings>. After reading the generated code (Reference.vb/cs) ......

Posted On Friday, February 24, 2006 9:01 AM

"default collation" for a SQL Server 2000 database
Some our clients reported “'Cannot resolve collation conflict for equal to operation'” error. As it is explained here, it could happen if the tempdb database collation differs from the user database collation. I was curious where "default collation" for a SQL Server 2000 database is stored - in the database itself or in master system tables. I didn't find any good documentation for SQL Server 2000, but according to SQL Server 2005 doc http://msdn2.microsoft.com/... ......

Posted On Thursday, February 23, 2006 7:35 AM

What DotNetNuke IsAdminControl function does.
The class \DNNLibrary\Components\Skin... (and some others) call DotNetNuke.Common.Globals.I... function. There is no description in the function, and the code has too many negatives, that it is not obvious. Once I figured it out, I decided to write it here. The function returns True, if QueryString has “MID“ or “CTL“ parameter. I am not fully understand, why it means an Admin contol. There is some clarification in the document: http://www.yourephotostore.... ......

Posted On Wednesday, February 22, 2006 2:20 PM

MS Access Project uses incorrect SQL if RecordSource starts with leading space.
I had a MS Access 2002 VB code Form.RecordSource = " Select * from dbo.[TempBarcodesList] where SessionID= " & Quoted(hdnSessionID) with a leading space before Select in SQL statement. Profiler showed that the following SQL was send to the database exec sp_executesql N'SELECT * FROM Select * from dbo.[TempBarcodesList] where SessionID= ''2006-02-22 12:07:06.327'' WHERE "SessionId" = @P1 AND "AutoID" = @P2', N'@P1 varchar(23),@P2 bigint', '2006-02-22 12:07:06.327', 22 and it obviosly had sintax ......

Posted On Wednesday, February 22, 2006 8:36 AM

"Visual Studio 2005 is very slow" -some tips for ASP.NET projects
I am very disappointed with performance of VS 2005, in particular when building ASP.NET web site projects. I've tried a lot of suggestions. 1.Workaround Description: Delete windows.prf & windowsidx.prf from C:\Documents and Settings\\Application Data\Microsoft\Visual Studio\8.0\ . Seems has no effect. 2 Uncheck Navigation bar. 3.Disable wordwrap at: Tools>Options>TextEditor >C#>General4. My project had referenced DLLs located on shared folder on remote computer. When I moved DLLs ......

Posted On Tuesday, February 21, 2006 8:14 AM

ContainerSrc location in exported DotNetNuke Portal Template
The DotNetNuke Portal Template document (in the DotNetNuke 4.0 download) has a few places where [G] notation is used ,e.g. [G]Skins/DNN/Skin.ascx, buf there is no explanation, how it is used. From reading the code, I understood that it is used as a placeholder for current portal location of the specific folder. So template should have entries with this notation [G](or [L] -?) but SOMETIMES existing Template export function does export the full hardcoded path. e.g. <module> <containersrc>/FSDNN/... ......

Posted On Monday, February 20, 2006 12:41 PM

Visual Basic function IsDate depends on Current Culture.
I was puzzled when VB function IsDate(20/02/2006) returned false( in Australia date format is dd/mm/yyyy). After investigation using Reflector I found that it uses Thread.CurrentThread.Curren... and my ASP.NET application wasn't set to use AU culture by default. Using CurrentCulture does make sense, but it is not documented in MSDN. ......

Posted On Monday, February 20, 2006 11:29 AM

DotNetNuke "Upload Custom Module" command sometimes does nothing.
I've noticed a few times that when in DotNetNuke 4. "Upload Custom Module" page I had a custom module in the list, “upload new file“ link does nothing instead of importing module. It seems related to caching issue (see problem here). I suspect that even if the file is shown in the list, it still not in cache. It will be more reliable to check list control directly instead of cache. And why the list to upload should be saved to cache? Additionally even if the list is empty, it is better ......

Posted On Monday, February 20, 2006 8:55 AM

Backup source files using MSBuild project.

I wanted to create batch to backup source files from my Projects folder, but also exclude some folders that I do not use.

I was amased how quickly I was able to do it using MSBuild project without any previous experience with the tool.

I've posted details  here. 

Posted On Friday, February 17, 2006 2:09 PM

Support of multiple module definitions in DotNetNuke import/install.
Current version of DNN(4.0.2) doesn't support multiple module definitions when importing templates. The issues are listed on DNN support site. By some reason comments for the issue are not allowed. So I will post here my suggestion how to resolve problem 3 (the imported result the page will contain duplicate modules, one for each moduledefinition). DNN portal Template XML has <definition> element in the section. However it does saves ModuleName instead of ModuleDef.Name. To fix a problem the ......

Posted On Friday, February 17, 2006 6:25 AM

DotNetNuke Install deletes zip files from Install resources subfolders

I was surprise that after successfull installation of DotNetNuke custom module ZIP files from Install\Modules sub-directory were deleted.

I've checked the code - it's done by design.

But it should be documented in DotNetNuke Installation Guide.pdf

Posted On Wednesday, February 15, 2006 1:02 PM

DNN 4.0 loads Provider classes with case-sensitive names.
I've rebuild ''DotNetNuke.Modules.Html.S... from the downloaded source code and started to receive errors: System.TypeLoadException: Could not load type ''DotNetNuke.Modules.Html.S... from assembly ''DotNetNuke.Modules.Html.S... at System.RuntimeTypeHandle._G... name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) at System.RuntimeTypeHandle.Ge... ......

Posted On Wednesday, February 15, 2006 12:32 PM

DotNetNuke Install should have better error reporting.
I am using “Publish web Site” which copies almast all content of the development site including Portals\0\portal.css file. Then when DNN Installer tries to create a new portal, it fails with “Error: The file 'C:\inetpub\wwwroot\DNNWebO... already exists.“and doesn't create portal alias. Any attempts to open the site failed with [NullReferenceException: Object reference not set to an instance of an object.] DotNetNuke.Entities.Portals... ......

Posted On Tuesday, February 14, 2006 1:54 PM

"Export Template" doesn't export custom module definitions

I thought that when I do "Export Template", the custom modules, installed on the exporting portal, will be exported as well.

But it is not the case.

The template has only page layout and references to module definitions that are located on the page.

To make imported template working, you need to import each custom module to the new portal first.

Alternatively new modules can be added to install folder to be installed as a part DNN install. 

 

Posted On Monday, February 13, 2006 9:47 AM

Using appSettings external file with "Publish Web Site" option - add exclude extension.
In ASP.NET 1.1 i've used appSettings file="DevSettings.config" to specify an external file that contained custom application configuration settings. DevSettings.config wasn't included in the project and was not copied to the production sites. In VS 2005 all files are included in the project and "Publish Web Site" command copies to production all files , including those that I don't want to copy. But there is a simple solution - change the name of the file DevSettings.config to DevSettings.config.exclude. ......

Posted On Thursday, February 9, 2006 11:09 AM

Using exported Portal Template in DotNetNuke
Scott McCulloch has a nice article "Exporting And Importing DotNetNuke Portals”. I want to add that exported portal can be used to replace existing portal using Wizard. It also can be used as a default portal by changing Install\DotNetNuke.install.... file by specifying <portals> <portal><templatef... It is assumed that NewPortal.template and NewPortal.template.resources files are located in \Portals\_default folder. ......

Posted On Thursday, February 9, 2006 10:08 AM

Using VS 2005 Web Setup Project Web Site porject - not user friendly process.
If you are working with Web Site porjects, VS 2005 Web Setup Project out-of-the-box is almost useless. The only option is to add content (including source code files). The recommended solution is to publish web project to create precompiled web application. Then you can add Procomiled site content to Web Setup Project. Note that you will see VS warning that precompiled Web Site is not recommended to be added to solution. When you will build Web Setup Project, the error will be shown Error 1 This ......

Posted On Friday, February 3, 2006 8:48 AM

Error "Unrecognized attribute 'requirePermission'" after publishing Web Site.
I had a working DotNetNuke project 4.0.2 with .Net 2.0 that I wanted to publish to Windows Server 2003. However when I opened the published web site, I've got an error: Parser Error Message: Unrecognized attribute 'requirePermission'.Source Error: Line 4: <sectionGroup name="dotnetnuke"> Line 5: <!-- the requirePermission attribute will cause a syntax warning - please ignore - it is required for Medium Trust support --> Line 6: <section name="data" requirePermission="false" type="DotNetNuke.Framework.... ......

Posted On Friday, February 3, 2006 5:57 AM

Parsing web.config with XmlDocument.SelectSingleNode
I have an utility that modified ASP.NET web.config using code like this: XmlDocument document = new XmlDocument();document.Load... nodeParent = document.SelectSingleNode("... I found that this code doesn't work with VS 2005 (SelectSingleNode returns null) because configuration element has xmlns <configuration xmlns="http://schemas.micro... . I was able to delete xmlns attribute without any visible side effects to make ......

Posted On Thursday, February 2, 2006 1:17 PM

Using VS 2005 Web Setup Project with custom actions
I've used VS 2003 Web Setup Project with custom actions and Installer class. that did some changes. After moving to VS 2005 I found that it is not possible to invoke custom action for DLL because only content output is available. The post suggested to use VS 2005 Web Deployment Project . However in my case compile failed with the very helpful Aspnet_merge.exe Exited With Code 1. Some posts explain that the error comes from duplicate class names in the project, even if the name comes from different ......

Posted On Thursday, February 2, 2006 12:02 PM

Namespace can't be shared between 2 assemblies in Visual Studio 2005
I have VB library that references C# library. C# library has a few classes with namespace FSWeb. And a few VB modules called this classes without any problem. When I've added to the VB Project a new class with the same namespace specified, the c# classes became invisible in all VB classes for both compiler and intellisence with the errors like: Error 231 'Search' is not a member of 'FSWeb'. Error 230 Type 'FSWeb.LoginHelper' is not defined. When I type “FSWeb.” intellisence shows only ......

Posted On Thursday, February 2, 2006 7:16 AM

Copyright © Michael Freidgeim | Powered by: GeeksWithBlogs.net | Join free