|
I have attached the debugger to the window service and ran in debug mode.
It is still not picking any thing from the app config file. File is named like as you said but still it is not picking any value from the config file.
I haven't install the service with window installer, but instead used installutil.exe.
So i assume that config file should be in bin folder of the service.
|
|
|
|
|
nitin_ion wrote: So i assume that config file should be in bin folder of the service.
Like I said, the config file MUST reside in the same folder as the .EXE you InstallUtil'd.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks,
file is in the same folder as the exe is but still it is not reading the values.
|
|
|
|
|
Without seeing your code and what's in the config file, it's pretty difficult to go any further with this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Function to read config tag
Private Function ReadConfigTag(ByVal Tag As String) As String
Dim objTag As ConfigurationSettings
Dim strTagValue As String = objTag.AppSettings("Tag")
Return strTagValue
End Function
Config File
<appSettings>
<add key="Request" value="C:\"/>
</appSettings>
I just want to read the value of the key.
|
|
|
|
|
nitin_ion wrote: Dim strTagValue As String = objTag.AppSettings("Tag")
Ummmm...You're trying to return the value of the "Tag" key, which doesn't exist in your configuration file, and not the tag name in the Tag variable. You want your code to read like this: (you also don't need the declarations...)
Public Function ReadConfigTag(ByVal Tag As String) As String
Try
Return ConfigurationSettings.AppSettings(Tag) ' No quotes!!!
Catch ex As Exception
' An exception show never be thrown, but, just in case...
Throw New InvalidOperationException("Unable to read application config file!", ex)
End Try
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I have a dataset populated in a datagrid, it is my report form. I am trying to convert it to xls file so that user can write some comments on it and print. Is there anyway or hints how can I convert this dataset data into xls file. Pls Help.
Thanks In advance
Regards
|
|
|
|
|
You never said if this was a Windows Forms app or a Web app, so, the best suggestion is to go over this[^] Google result set and see what fits your situation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Any resources/Tutorial avaiable on design pastterns used in VB.net with Basic concepts.
|
|
|
|
|
You might want to look at http://www.dofactory.com/[^] and pick up the book.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi. I'm Mario from Italy.
I've got a problem with timers.
My application has 8 timer. Well my application implements an OCX for Radio Management. The changechannel OCX function has got a problem because (as the manufacturer of the radio told me) the timers suspend the background processes (as changchannel).
Well now I should change the timers, but how can I do it ?
Help me help me !
-- modified at 5:34 Friday 17th March, 2006
|
|
|
|
|
Your question isn't very clear at all. There's a bunch of information missing.
What version of VB are you using? VB6, VB.NET 2002, 2003, 2005?
Your app has 8 Timers in it? What kind of Timers? Forms based??
Timers don't suspend background processes, so I have no idea what he's talking about.
You said your ChangeChannel function has a problem, but you never said what that problem was. You also never said what you need this function to do.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
you're right !
I'm using VB6
My app has 8 forms based timer
The ChangeChannel function changes the channel on the radio.
But when I put this statement in the timer, it doesn't have any effect on the radio.
My app is a really perticulary app.
It's a radiocontrol allarm event management ...
|
|
|
|
|
Forms based Timers do not block background processes or threads from running. The code in the Tick event runs on the same thread as the rest of the UI.
The problem appears to be in the OCX code that changes the channel, but since we have nothing to look at, it's difficult to tell.
What MIGHT be happening is that your making a change to the control, the control is supposed to update somehow, but can't because the thread is busy doing other things in your code. You might want to add a DoEvents() call to the line immediately after your channel change code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I've a loop (while) just after the the changeChannel function, whit DoEvents.
The while loops until the radio channel has not changed. You see I've a loop, because the channel has not changed.
While radio Channel <> channel request
DoEvents
wend
|
|
|
|
|
Do any one has the idea of tunneling in visual basic 6.0. The basic idea behind this is accessing the restricted websites through proxy server from a client machine
Mangilipelli
|
|
|
|
|
That depends on what you mean by "tunneling through a proxy". Are you asking how to get around the proxies blocked site restrictions? If so, you can't do it, not in any language...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
As i have seen this concept of tunnel in Visual Basic 6.0, one of my colleague has done this but didn't want to mention the API's he has mentioned in his program
Mangilipelli
|
|
|
|
|
Yeah, and he's lying through his teeth.
Since your entire networks only path out to the Internet is through that proxy, there's nothing you can do on your machine to get around that. That is, of course, unless someone left a way around the proxy on your network, or he knows something about your proxy server that he really shouldn't know.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Everybody,
I am new to .Net Tech. I just want to know benefits of .Net from Developer point of view and from end user point of view.
Thanks & Regards,
Chandan Kumar
|
|
|
|
|
How about asking Microsoft about it...Visual Studio Developer Center[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In my application,
I have a listbox to list out the image in a directory,
when the client click the file,
a picture box will display the file by setting the image from the file,
I sure that I have dispose the image and set it to nothing.
But while I system.io.directory.delete(DIRPATH),
Error shown that the file in the directory is using by other application.
How can I track back where is the image still using in my application??
|
|
|
|
|
It's being used by the same Image object that you used to display the image. This is a known "feature" since using Image.FromFile holds the image file open for the lifetime of the Image.
Load your Image into a PictureBox, or whatever, as described in this[^] KB article on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hai
like is there any alternative for this?
suppose i have some 100 buttons and the same functionality when clicking them
usually we write
private sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.click,button2.click,.........
//some code
end sub
so is there any alternative instead of writing button1.click,button2.click,.........button100.click
thanks in advance
|
|
|
|