Yes. It is "0", which indicates that the start parameters are being ignored.
One odd thing I did notice is that after selecting "OK" for the service and
upon returning to the properties the value is missing. Like maybe it won't
even save the properties from that window. And yes I am using a config file
like yourself; the only thing is that there are multiple instance of SQL
running on the save server (DEV and QA) and there are different connection
strings for each. I want to say pass in "DEV" or "QA" on the start
parameters so that I can tell the service to pick a specific instance to run
against. I can manually edit the config file before I start the service, and
it works fine when a switch the dsns around. I just wanted to get away from
the editing and possible "fat finger" problems when I type. :)
Thanks.
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
"Al" <Al@discussions.microsoft.com> wrote in message
news:2C**********************************@microsof t.com... Although it is not recommended to use the Start Parameters for a service,
I
am wondering why i get an IndexOutOfRange error when i try to access the
args[] in the OnStart method. I place say, "Hello" in the field on the
services Start Parameters text box, and then write to the EventLog to make
sure that the value is being passed properly. Thoughts? Thanks.
Did you check the Length property?
I have never ever used it, I do use the config file heavily though.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation