|
information about the host?
i use hostingrightnow.com hosting with .Net 2.0
relationship with the specified website?
no relationship but this web site any one can open it (normal web site) as yahoo gmail and in my local host i can open without any CredentialCache but i see it mircrosoft web site and in use it
Palestine
|
|
|
|
|
Tareq Abuzuhri wrote: my local host i can open without any CredentialCache but i see it mircrosoft web site and in use it
In this case, since the end result is that the app will be hosted on a web site you probably don't want to do this. All having that line does is enable NT and Kerberose authentication. Since this is a public website you don't need to add that line.
I'm not sure why you are getting that error then. The only explanation I can come up with is that http://www.elections.ps/afindcenter.aspx is actively denying your host. I don't know of any good way to determine if that is the case or not though.
Jared Parsons
jaredp@beanseed.org
http://spaces.msn.com/members/jaredp/
|
|
|
|
|
On my form (MainWindow) I have a TabControl called MonitorTabs. I programmatically add a tab to it for each user I want to monitor. Then I add a user control called Monitor that contains a group of controls including a timer (RefreshTimer) to that tab.
From MainWindow, I call a function that needs to reset the interval on RefreshTimer on the currently selected tab. The number of RefreshTimers is dynamic, one for each User Control/Tab, and I don't know how to access any of them let alone the one that is currently selected. The timer is set to public, and still nothing shows up.
Can anyone help?
|
|
|
|
|
What you are asking is how to access the currently selected tab? If yes, the following line of code popups a MessageBox with the text of the currently selected tab:
MessageBox.Show(this.tabControl1.SelectedTab.Text);
If I understood otherwise, please try being a bit more specific with your question
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Sorry I wasn't clear enough.
On each tab is a user control called Monitor. So if I have three tabs, then there are three Monitors. Monitor has various elements including a timer, a datagridview, a treeview, etc... since they are part of the same user control, they are all named the same.
So for example, I want to set refreshTimer on Monitor on tab 2 (the currently selected tab). How would I access that refreshTimer.
I have tried the following without success
MonitorTabs.SelectedTab.Monitor.refreshTimer<br />
MonitorTabs.SelectedTab.refreshTimer<br />
MonitorTabs.TabPages[MonitorTabs.SelectedIndex].Monitor.refreshTimer
Thanks
|
|
|
|
|
Hmm... if I get it right, I would keep track of each Monitor's instance name on each tab (e.g. I would add "Monitor1" on tab1, "Monitor2" on tab2 and so on. Then, in order to access them, I would locate them by their names).
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
That makes sense but I've never tried that before (somewhat new at this), could you demonstrate please? This is my current code.
TabPage newMonitorTab = new TabPage(TabTitle);<br />
MonitorTabs.TabPages.Add(newMonitorTab);<br />
<br />
MonitorTab monitor = new MonitorTab();<br />
newMonitorTab.Controls.Add(monitor);
Thanks!
|
|
|
|
|
You could write something like this:
TabPage tab1 = new TabPage("Tab 1");
MonitorTabs.TabPages.Add(tab1);
MonitorTab monitor1 = new MonitorTab();
tab1.Controls.Add(monitor1);
TabPage tab2 = new TabPage("Tab 2");
MonitorTabs.TabPages.Add(tab2);
MonitorTab monitor2 = new MonitorTab();
tab2.Controls.Add(monitor2);
This way, you know that tab1 has monitor1 on it, and tab2 has monitor2. So if the selectedTab is tab1 then you access monitor1 by writing something like this.monitor1
Hope this makes sense.
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Its getting closer, I have added them and can access them to a point using the following:
MonitorTab monitor = new MonitorTab();<br />
monitor.Name = "Monitor" + MonitorTabs.TabPages.Count.ToString();
But I still can't access that control except using a foreach looping through the controls on the tab, which doesn't allow me to access the timer. Any suggestions?
|
|
|
|
|
You can also make an hashtable, like [Tab] - [Monitor]:
private HashTable monitors = new HashTable();
MonitorTab GetMonitor(TabPage tab) {
return (MonitorTab) monitors(tab);
}
void AddTab() {
TabPage newMonitorTab = new TabPage(TabTitle);
MonitorTabs.TabPages.Add(newMonitorTab);
MonitorTab monitor = new MonitorTab();
newMonitorTab.Controls.Add(monitor);
monitors.Add(newMonitorTab, monitor);
}
MonitorTab selectedMonitor = GetMonitor(this.tabControl1.SelectedTab);
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
That worked great! Thank you both! *sigh of relief*
|
|
|
|
|
Hi, can anyone help I need a string manipulation to do the same as Len(in VB) or strlen()in C as well as Mid$ in VB or strstr()in C. This is to allow me to pick off bits in a string to send them to the RS232
Doh!
-- modified at 15:17 Friday 9th December, 2005
|
|
|
|
|
|
I tried that it comes up with LEN which I can't get to work, or is it something like string.LEN, I am a little desperate!
Glenn
Doh!
|
|
|
|
|
What!? Where? No where in the linked page is there a LEN() or string.LEN
string myString = "Some text";
myString.Length
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
GlennP. wrote: I tried that it comes up with LEN which I can't get to work
What are you talking about? Where on the link I posted did it mention LEN? It did quite clearly mention Length and Substring which can be used in place of Len and Mid from VB. So what's the problem?
|
|
|
|
|
I am sorry I was using the MSDN that came with the version of .NET which is different from the from the online version, All I can say is a nights sleep is required at least once a week!! sorry!
Doh!
|
|
|
|
|
The one that can with Visual Studio .NET doesn't mention LEN either! Are you sure you were looking at the .NET version or the older VB6 version?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If you use VC++ 2005, you can access the .NET libraries as well as use your favorite C and C++ stuff (like strstr or std::string).
|
|
|
|
|
I did, but "C# is a new language and will be supported longer" is it just me or our ******t clients said that to me I only do as they ask!!
Glenn
Doh!
|
|
|
|
|
Hi, I'm actually working on a school assignment and need some help. The assignment is a world simulation. On this world you can add animals and stuff. The application is already working remotely. Each pc acts as client and server. What I still need to do is to make sure that when a (server)pc (a world) is shut down or crashes, that one of the other pc's in the network becomes the server with the data.
Can someone point me in the right direction or does anybody know where I can find a sample of something similar?
Any help is appreciated.
Thanks in advance.
|
|
|
|
|
iits pretty simple. google for it. theres lots of examples
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Thank you Ista for your reply. I've have already tried google. But I don't know exactly what to search for. I did find some simulation, but I didn't find anything that has to do with when a server shutdown/crashes and one of the other pc's in the network has to take it's place. Anybody know where I can find a sample or something?
Thanks in advance.
|
|
|
|
|
add a little pinging routine that checks to see if the server is alive, if not cycle through the next item in the array.
You just need a simple loop.
You will also need to open channels programmtically.
I would diagram the problem out and list the possible scenarios so you can come up with a possible solution.
But basically if you try and open a chennel and it doesn't work then the server is dead.
You could do this: Create a class that channels the requests through and picks the server to contact. It would be imitation of load balancing. Check out "design patterns" on google till you find one that meets your situation.
Nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I have a dll that I've written that uses a class to store settings that is serialized to an xml file so it can be easily edited by the end user. This works just find with a simple C# tester program, the settings can be serialized and deserialized without any problems. However, I need to call this dll from a LabView program and there it will not work. I've narrowed the problem down specifically to the deserialization of this settings file which throws an invalid cast exception. Anybody have any ideas why the deserialization would work fine when the library is called from a C# program and not when its called from LabView?
|
|
|
|