|
I think , you use TCPIP remoting.
Control your windows service is running stable and than if server ,which windows service running on,firewall program is on than open related port that your application use for remoting.
|
|
|
|
|
Yeah, I always forget Critical details I using TCPIP remoting. That was the first thing that i thought of but there is no firewall on the server. My hosting Service is the one that can't access the remote Object.
|
|
|
|
|
Is your uri or class name correct?
|
|
|
|
|
Hi all,
I want to change the default paper size in internet explorer and print preview...
For example I want to have A5 size when some page in going to be previewed...
Please help me.
thanks.
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
What does that have to do with C#???
Everything makes sense in someone's mind
|
|
|
|
|
Well, you'd have to see sharp to read an entire web page when printed on an A5.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Weak. Very weak.
Everything makes sense in someone's mind
|
|
|
|
|
Hi.
I´ve been googling for a while, but cant find the right place to start, so I thought some of you people could point me in the right direction
I need to retrieve, add and edit Outlook 2007 calendar information. This information should be accessed/edited from a standalone C# application, and has therefore nothing to do with a Outlook plugin.
So do i need to use VSTO? Or where do I start?
Thanks alot! 
|
|
|
|
|
I think that Outlook Interop[^] is probably where you need to start.
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in.
Apathy Error: Don't bother striking any key.
|
|
|
|
|
Thanks alot! 
|
|
|
|
|
I have an HTML file in a local directory which will have an a tag
I want to remove the checked part from the above tag & save the file back from my c# desktop application so that whoever accesses the html will not see the checkbox checked by default.
I dont want to use 3rd part parsers like Html Agility Pack. I have been struggling with Microsoft.mshtml & DOM in loading the HTML, getting the Tag by Id.
Appreciate your help.
Thanks!!
|
|
|
|
|
Try loading it into a System.XML.XMLDocument . You should be able to find the tag using SelectSingleNode , update the node and save the XMLDocument back to the FileSystem.
|
|
|
|
|
had tried to load using XMLDoc but it fails to load because of html xml diffrences ..
|
|
|
|
|
Are you creating the HTML in the first place? It is certainly possible to make HTML pages that are valid XML. Start with checked="checked". All attributes should have quoted values.
Check out DTDs[^] and the W3 Validator[^]
|
|
|
|
|
As you found you can't treat it as XML and use an XML parser. Though it is brute force, the best method may be to simple read the contents into a string and use string.replace.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
All .. thanks for the replies .. it did help .. While XML doc didnt work .. string replace didnt sound very reliable (at least in my case). So had to look back at Html Agilty pack (though in 1st place I didnt want to use a parser .. a 3rd party one) which sounded the best bet (also since its from codeplex). That was quite easy to use.
|
|
|
|
|
I am sending game score to the web service and saving it there to xml file by using the following code:
XmlTextWriter myWriter = new XmlTextWriter("highScores.xml", null);
myWriter.WriteStartDocument();
myWriter.WriteStartElement("highestScore");
myWriter.WriteValue(score);
myWriter.WriteEndElement();
myWriter.WriteEndDocument();
myWriter.Close();
I want to add to this function a condition to save the score only if it's higher than the score which already is in the xml.
I was also trying to make another function to get this highest score from the xml, and return it to the Client.
My problem is that I have no idea how to get this int (as an int) from the xml, I've tried few times on different ways bu still have no idea how to do this. Please help.
|
|
|
|
|
when you read a value from xml you get a string.
to convert it to int use int.TryParse method.
life is study!!!
|
|
|
|
|
Parse method worked. Thanks.
|
|
|
|
|
You should be clearer in what you are trying to say.
0) Shouldn't you already know whether or not the score is the high score?
1) Why not store the date and time as well as the score?
|
|
|
|
|
i want delete image file.
very well insert image file to listbox.
but, does'nt delete image file ,
plz, take me a error,,
---
c#, wpf, .net3.5
/....
source code
attched project files,
source file download
//////////error code////
//image insert to listbox///
private void button1_Click(object sender, RoutedEventArgs e)
{
savepath = System.Environment.CurrentDirectory.ToString();
foreach (string f in Directory.GetFiles(savepath + "/image", "*.jpg"))
{
BitmapImage my;
my= new BitmapImage();
my.BeginInit();
my.CacheOption = BitmapCacheOption.OnLoad;
my.UriSource = new Uri(f, UriKind.RelativeOrAbsolute);
my.EndInit();
listBox1.Items.Add(my);
}
}
/////////delete image file ///
private void button2_Click(object sender, RoutedEventArgs e)
{
string makestr1, item1;
item1 = listBox1.Items[0].ToString();
makestr1 = item1.Substring(8, item1.Length - 8);
listBox1.Items.Remove(listBox1.Items[0]);
if (System.IO.File.Exists(makestr1))
{
System.IO.File.Delete(makestr1); //<--error point
}
else
MessageBox.Show("Nothingfile");
}
//error message..
modified on Tuesday, May 18, 2010 7:31 AM
|
|
|
|
|
I understand that English isn't your native language, but your question is rather difficult to understand. This is not helped by the use of txtspk abreviations such as Plz instead of please!
Please provide the specific code where you are attepting to delete the file along with any exceptions you are receiving. - now included
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
modified on Tuesday, May 18, 2010 8:09 AM
|
|
|
|
|
He did supply the entire code in a zip file, I think... 
|
|
|
|
|
He edited the post to include it - fair enough
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
If you have loaded an image from a file, the file will be locked as long as your image hasn't been disposed of. Maybe that is your trouble, I can't be bothered to download and investigate your code...
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|