So the last version of Visual Studio that built MSI installers is 2010
I was using 2010 to build an installer for a 2012 Service
The MSI files were created, and they did copy the EXE files
However, the service install dialog did not occur
I did not do a step that I needed to do
On the menu for the installer project, there is a gear button
It allows you to invoke a custom action for each of the 4 states of an installer
(Install, Repair, Commit, Uninstall)
I had to add the service exe to each of those steps
Once I did that, voila, the service did what using installutil does on a development machine
Problem solved
Scott's Technical Lessons Learned
A place to keep my technical lessons learned
Monday, April 13, 2015
Wednesday, February 4, 2015
The thing I always forget to reformat my c# code
Visual Studio WITH C# KEY BINDINGS
To answer the specific question, in C# you are likely to be using the C# keyboard mapping scheme, which will use these hotkeys by default:
Ctrl+E, Ctrl+D to format the entire document.
Ctrl+E, Ctrl+F to format the selection.
You can change these in Tools > Options > Environment -> Keyboard (either by selecting a different "keyboard mapping scheme", or binding individual keys to the commands "Edit.FormatDocument" and "Edit.FormatSelection").
If you have not chosen to use the C# keyboard mapping scheme, then you may find the key shortcuts are different. For example, if you are not using the C# bindings, the keys are likely to be:
Ctrl + K + D (Entire document)
Ctrl + K + F (Selection only)
To find out which key bindings apply in YOUR copy of Visual Studio, look in the Edit > Advanced menu - the keys are displayed to the right of the menu items, so it's easy to discover what they are on your system.
Friday, August 1, 2014
Restful web services and WebDAV dont play nice together - blocks PUT and DELETE
We relearned a lesson at work that I want to capture
We are using a lot of RESTful services in our current development
If you have WebDAV enabled in Windows, it gets added to the default web site
WebDAV consumes verbs that restful services like to use
There are two ways to turn it off
1) In the web.config file, it can be removed in the handlers section
2) in IIS, under the application modules (Feature view) you can remove it from each application
Ugh!
We are using a lot of RESTful services in our current development
If you have WebDAV enabled in Windows, it gets added to the default web site
WebDAV consumes verbs that restful services like to use
There are two ways to turn it off
1) In the web.config file, it can be removed in the handlers section
2) in IIS, under the application modules (Feature view) you can remove it from each application
Ugh!
Tuesday, July 1, 2014
Biztalk how to use two copies of a schema
So I had a fun problem at work implementing Biztalk processing where I was using two versions of a schema with the same root name - a HIPAA transaction. We were using the version that splits into subdocuments, but for one part I wanted to use the version where it doesn't do the split
Biztalk does not like it when you deploy a schema with the same root name and target namespace, because it cant figure out how to route the message.
What I had to do was change the target namespace, then make sure the party agreements used the altered namespace.
Captured for my future headaches in Biztalk :-)
Biztalk does not like it when you deploy a schema with the same root name and target namespace, because it cant figure out how to route the message.
What I had to do was change the target namespace, then make sure the party agreements used the altered namespace.
Captured for my future headaches in Biztalk :-)
Wednesday, August 28, 2013
How to get rid of a dead exchange 2013 server from Active Directory
So if you are a nerd like me, its entirely possible you have a home domain
I created one, and installed exchange 2013.
Sadly, I installed it on a virtual and the host box had an issue
The vhdx for the mail server was on the drive that failed
I hadnt gotten to backing it up yet
Anyway, I now had an orphan set of structures in the active directory
You will find out when you go to create the new mail server, and it starts nagging you for a recovery
It thinks you will be able to restore it.
Wasn't happening
So you can recover from this without recreating the entire domain, which is a hassle
You have to remove all remnants of exchange from the ad directory stuff
There is a great article on how to do it
Go here - http://blog.dargel.at/2012/11/20/complete-remove-exchange-2013-using-adsiedit/
However, thats not all of it
I had a few accounts that had mailboxes created for them on the old server
They showed up in the new server, but it was whining about the mailbox database being corrupt and lost
Which is correct.
So the last steps you need to do is to get rid of the accounts in exchange using ecp
You can do it for the non-privileged accounts by just disabling the account in exchange
This will clean up all the entries
When you try to do this on administrator, it wont work
There isn't enough privilege on the ecp web site to do it
You have to do it by hand with ADSI Edit
Go through all the administrator properties and clear out the ones that have to do with exchange
They usually start with msExch
However, there are some non-obvious ones
They are not in the msExch range
The way I found them was to compare a user without a mailbox created to one that is
Its a pain, but it works
The final kicker, ADSI Edit doesnt know how to edit everything
Eventually you will have to use powershell to clear out the remaining attributes with the set-aduser cmdlet
There is one for msExchPolicy and msExchWhenMailboxCreated that wouldnt clear except this way
But its possible!
I created one, and installed exchange 2013.
Sadly, I installed it on a virtual and the host box had an issue
The vhdx for the mail server was on the drive that failed
I hadnt gotten to backing it up yet
Anyway, I now had an orphan set of structures in the active directory
You will find out when you go to create the new mail server, and it starts nagging you for a recovery
It thinks you will be able to restore it.
Wasn't happening
So you can recover from this without recreating the entire domain, which is a hassle
You have to remove all remnants of exchange from the ad directory stuff
There is a great article on how to do it
Go here - http://blog.dargel.at/2012/11/20/complete-remove-exchange-2013-using-adsiedit/
However, thats not all of it
I had a few accounts that had mailboxes created for them on the old server
They showed up in the new server, but it was whining about the mailbox database being corrupt and lost
Which is correct.
So the last steps you need to do is to get rid of the accounts in exchange using ecp
You can do it for the non-privileged accounts by just disabling the account in exchange
This will clean up all the entries
When you try to do this on administrator, it wont work
There isn't enough privilege on the ecp web site to do it
You have to do it by hand with ADSI Edit
Go through all the administrator properties and clear out the ones that have to do with exchange
They usually start with msExch
However, there are some non-obvious ones
They are not in the msExch range
The way I found them was to compare a user without a mailbox created to one that is
Its a pain, but it works
The final kicker, ADSI Edit doesnt know how to edit everything
Eventually you will have to use powershell to clear out the remaining attributes with the set-aduser cmdlet
There is one for msExchPolicy and msExchWhenMailboxCreated that wouldnt clear except this way
But its possible!
Thursday, June 27, 2013
Visual Studio settings needed for a fault contract to work in WCF Services
Having lost a day to this, I have to write this solution up
In order for the service side exception to pass over to the client side in WCF, two settings in the debugging section of the Visual Studio IDE have to be turned off
1) Just My Code
2) The Exception Assistant
Grrr
In order for the service side exception to pass over to the client side in WCF, two settings in the debugging section of the Visual Studio IDE have to be turned off
1) Just My Code
2) The Exception Assistant
Grrr
Monday, May 13, 2013
The equivalent to InvokeRequired in WPF
In WPF, this was moved out of the Control/UIElement hierarchy, and into the dispatcher.
You should be able to do:
if (someControl.Dispatcher.CheckAccess())
UpdateUI();
else
someControl.Dispatcher.Invoke(new Action(UpdateUI));
Subscribe to:
Comments (Atom)