The DBML editor in Visual Studio 2008 tends to create a nasty name in the settings file for your database connection string. We have our databases named with the associated environment e.g. Product_dev or Product_test. When the DBML editor saves the connection string you get a nasty name such as: ClassLibrary1.Properties.Settings.Product_devConnectionString.
This is fixed by creating the setting for the connection string first and giving it a pleasant name such as: ProductDb.
Make sure you create the setting of type (Connection String) and save the settings. After this you will need to edit your .config file and assign a providerName attribute to the connection string that was created.
After this, open your DBML file and your ProductDb connection string will show in the dropdown.
So I started an application as a WPF Browser Application (XBAP – Xaml Browser APplication) and quickly noticed that I needed to do some things that really should be in a stand alone app for CAS reasons. I found a blog entry by Karen Corby that showed how to do this way back in ‘06. She wrote a cool Visual Studio project template that would let you target XBAP vs. Stand Alone.
In 2009 this is still applicable. Here is what she said to edit in your CSPROJ file to accomplish the change.
You can do this by manually editing the .csproj or .vbproj.
There are three main tags involved in making something an “XBAP”:
Other tags are required for the “XBAP” debug experience, etc:
If you comment out all of the above tags and add…
…your app will run as a standalone.
This blog page will end up being a series. Here I will discuss what happened to certain features and elements of WPF and Visual Studio.
In Windows Forms we used Anchoring to allow a control to stretch while a form is resized.
<Frame HorizontalAlignment="Stretch" Name="frame1" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch"
Margin="177,0,0,0" HorizontalContentAlignment="Stretch" />
One caveat is that by default the controls have a Width and Height property. When you set the Alignment and ContentAlignment properties to stretch you must remove the Width and Height properties from the XAML or you will end up with a centered control that does not stretch.
Intellisense fails to recognize namespaces of a referenced project.
Adding a previously compiled project reference to a WCF project does not show intellisense. Even after waiting several minutes.
Visual Studio Team System 2010 Beta 1
Operating System Language
Steps to Reproduce
Solution file with a WCF Service Application and a Windows Class project.
Generate a DBML file and place it in the class project.
Add the class project as a 'project reference' to the WCF project.
Reference shows up in References, object viewer shows the object and all it's classes.
Try entering code in the default/template DoWork() method and the Namespace does not show in Intellisense. Manually type the fully qualified namespace+class name; e.g. MyCompany.SubNS.Class1 class1 = new MyCompany.SubNS.Class1();
Gets Red error underline.
Trying to add namespace to using declarations results in same red underlines.
Compile -> successful. Subsequent use of intellisense works properly now.
Referenced classes and namespaces do not show in intellisense until the first time you compile the referencing app.
Referencing application should show referenced classes and namespaces without having to compile the referencing application first. This is behavior in VS2008 already.
Brian Apps wrote a tiny application that lets you set a window to a specific size. The app is a measly 17k and works like a champ. Oh, and it is free.
So it has been a while since I needed to write a legacy ASPX application. I updated my Telerik controls to the latest version which changed the manner in which the design time control code is referenced. As it turns out Telerik has gone full circle with their controls as far as how the assemblies are distributed. They used to put each control in its own assembly then tidied it up a bit by placing everything into one assembly. With the latest revision they separated the design time code from the redistributable.
As it turns out Visual Studio 2008 RTM had a problem where design time controls would not load if the DTC was GAC’ed. SP1 fixed this issue and all is OK in the world of Design Time Control references from the GAC.
This is a key piece of functionality. As a developer that has needed to build controls with designers so that developers could consume my work… I understand how frustrating this can be. A software rev (Visual Studio) breaking long working functionality.
We update your Visual Studio if you are using legacy ASPX pages/controls and you are having Designer Rendering issues.
Download details- Visual Studio 2008 Service Pack 1
Application manifests work differently between XP and the 2003/Visa cores. On Windows XP the external manifest is searched for and utilized first.
On Server 2003 and later the Internal manifest is read first. See Junfena Zhang’s post on this topic. This explains a lot. I have written several shrink wrapped apps that are installed across a nonstandard install base and this has been my problem in the past.
I like the blog title: “If your only tool is a hammer…” I have said that so many times. Developers learn one trick and want to apply it to every situation. Sometimes Tool-A is better than Tool-B. I suppose that is what separates an Architect from a developer. Loren does a great job explaining the differences.
When you enable WS-Atomic Transaction support on Server 2008 the installation gives you an info message in the installation log that states something to the effect:
<Informational>: To configure WS-Atomic Transactions, run the wsatconfig.exe utility in C:\Windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation using the following certificate thumbprint for the SSL certificate: 4EA4E7A5BE979E1039D2F6F51D77230843BED0D2
When you run the command it tells you to run you receive an error:
C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation>WsatConfig.exe -endpointCert:4EA4E7A5BE979E1039D2F6F51D77230843BED0D2
Microsoft (R) WS-AtomicTransaction Configuration Utility
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.648]
Copyright (c) Microsoft Corporation. All rights reserved.
Cannot update the WS-AT configuration when WS-AT network support is disabled.
The solution is simple.
Reboot after enabling the WS-Atomic Transaction feature and then run the wsatconfig application again.
Use the full command line:
WsatConfig.exe –network:enable -endpointCert:4EA4E7A5BE979E1039D2F6F51D77230843BED0D2
Obviously replace the thumbprint with the one listed in your log.
Interestingly enough, Server 2008 spits out the message:
The certificate could not be used..
So a subsequent execution of the same command rendered:
Could not find the specified SSL certificate.
I will be converting from the Community Server platform to BlogEngine.net shortly. I will build a data converter for the rollover and have my blog ported over very soon, hopefully with some of my own custom Silverlight elements.
Morten has a great little article with supporting source code explaining how to display a context menu with mouse gestures such as shift-click, double click, right-click..etc. The code is very useful. Good job!
So for those of you that do not know, Splendid CRM is a (sorta) free CRM product based on Sugar CRM (another sorta free). Both products are great CRM codebases. The SplendidCRM version is re-written in C# and .NET. The community version which is a free download contains the source tree.
I had some problems getting the csproj file included in the source tree to work so I figured I would help out the community by publishing my final conversion that builds properly. I had to manually edit the project file in order to get it into a workable 2008 project. I also had to fix some VS2005 reference issues to make the project work with .NET 3.5.
Here is the link to SugarCRM:
…and Splendid CRM
…and finally, the Project file. Replace the csproj file in the community edition with this one and you should be ok.
One issue I noticed with RIA services is that LINQ to SQL DBML classes do not show in the Available Data Context drop down until you have compiled the dbml at least once. This is for obvious reasons but it would be nice to have a warning message or something.
Solution: Compile your project that contains the DBML file and your data contexts will show in the New Domain Service Class dialog.
I was searching for an AntiVirus product for my development servers for a while. I found some great AV products that are free for a workstation but charge a ridiculous price for their server versions even though they do pretty much the same thing as the free desktop version. I was not looking for a bunch of additional garbage. Just basic AV.
I finally found an open source AV product named ClamWin. I initially shrugged it off because the name it a bit weak in my opinion. However it is a great product.
There is a document that links to a spreadsheet which lists all the licensing modules which relate to the cubes in SSAS. This is a very long winded way to get your cubes trimmed up so that they will process. The documentation for this ‘best practice’ way is listed below. Have fun it will take you a week of monotonous cross referencing and cube surgery. When you are defeated, cruise back over here and follow this 10 minute procedure ;)
(You also need the xlsx file, as that shows you which licensed modules relate to the entities in the cube you need to remove.)
Follow page 10 of the ConfigureDefaultCubes.xps document on the SQL Server / SSAS server. This gets you an imported BI project from the deployed SSAS Cubes. FYI if you don’t have the cubes deployed yet you will need to manually install the cubes by following my blog post here:
Now that you have your BI project created you must place the project target database in Enterprise Server mode or you will have other issues. To do this follow these steps:
1) Right click on the root node of the solution explorer and select properties:
2) Change the Deployment Server Edition to Enterprise. (Yes, even if you are using STD.)
3) Right click your Accounts Payable Cube and choose Process.
4) You will get a TON of errors in the error log. Start at the top of the error log. Double click the error and in the solution explorer a dimension will be highlighted that is causing the error.
Delete the error. The reason that this error occurred when you try to process the cube is because the table or column in the Axapta database did not exist. As you go through and delete the invalid dimensions the error list will get smaller and smaller. When you have deleted all of the invalid dimensions you will have completed the tedious chore in a few minutes.
5) You should now be able to deploy the project back to the server to update the cubes on the SSAS server. Note that if you are using a cluster you will need to update the DataSource to point to your SSAS cluster resource name (usually your SQL cluster resource name) because by default it tries to hit the localhost and with Windows Failover Server 2008 this does not work at localhost.
In short: You must manually deploy the SSAS cubes to your SSAS 2008 server.
On your Dynamics AX 2009 installation media locate the following folder:
[MEDIA ROOT]:\support\Analysis Services\Scripts
Locate the DynamicsAX.xmla SSAS deployment script. This file contains all the information to create the SSAS database, all the dimensions, and all the cubes.
To install this script you must open SQL Server Management Studio 2008 and connect to the Analysis Services server.
Next, right click on the SSAS server root node and choose New Query | XMLA.
This will open a new XMLA query window. Drag the DynamicsAX.xmla script into this window and execute it. This will create the SSAS database for Dynamics AX.
Add a reference to a WCF service to your Silverlight 3 application. The proxy client is created but the binding and endpoint configuration fails to write to the ServiceReferences.ClientConfig file.
Checkout the .ClientConfig file prior to making changes to the service references.
Ha! Kudos to Joseph Albahari for a cool tool!
I have had this issue since the RTM of Visual Studio 2008 and posted a bug report about it. After a year the problem has been fixed even though several developers on the Visual Studio Dev team claimed they could not reproduce the issue. That is such a ‘developer’ thing.
And finally the fix: