|
Thanks Navaneeth,
Why you remove my string class member?
regards,
George
|
|
|
|
|
Base class Exception provides a member Message which can be used.
|
|
|
|
|
Thanks Navaneeth!
This constructor is called when an instance of type MyException is deserialized from a stream? So, the constructor is used in de-serialization process, not serialization process?
MyException (SerializationInfo info, StreamingContext context)
regards,
George
|
|
|
|
|
George_George wrote: This constructor is called when an instance of type MyException is deserialized from a stream?
I don't think so. Deserialization has to take place outside of the exception class and pass that SerializationInfo to this overload which will fill the necessary fields of this exception.
|
|
|
|
|
Thanks Navaneeth,
I am confused about -- "Deserialization has to take place outside of the exception class and pass that SerializationInfo to this overload which will fill the necessary fields of this exception." Especially confused about what means "take place outside of the exception class"? Could you show me some simple pseudo code please?
have a good weekend,
George
|
|
|
|
|
Im trying to send some GET and POST request to a website with the HttpWebRequest control.
The problem is that the server is giving me blank reponses when i try to do a post, and this is because the cookie i send doesnt have utma, utmz and utmc values, but i have no idea how to setup this variables, i tought they were gonna be set automatic like in the browser cause as far i know is for session tracking, but no
heres an example of the cookie values i dont know how to get/generate, sniffed from mozilla 3.0.3
__utma=56969722.1488837505.1226268589.1226445794.1226522343.8;__utmz=56969722.1226268589.1.1.utmccn= (direct)|utmcsr=(direct)|utmcmd=(none);__utmc=56969722;");
and heres my c# code
Code:
try
{
req = (HttpWebRequest)WebRequest.Create("http://www.domain.com/");
myWebHeaderCollection = req.Headers;
myWebHeaderCollection.Set("Accept-Language", "en-us;q=0.5,en;q=0.3");
myWebHeaderCollection.Set("Accept-Encoding", "gzip,deflate");
myWebHeaderCollection.Set("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
req.KeepAlive = true;
req.ServicePoint.Expect100Continue = false;
req.Referer = "";
req.UserAgent = "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)";
req.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
req.Method = "GET";
req.CookieContainer = cookieContainer;
response = (HttpWebResponse)req.GetResponse();
sr = new StreamReader(response.GetResponseStream());
getOutput = sr.ReadToEnd();
sr.Close();
foreach (Cookie cook in response.Cookies)
{
cookieContainer.Add(cook);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
Any ideas how i could get this cookie?
|
|
|
|
|
what defferences between:
public void function1() and
public object function1()
Thanks
|
|
|
|
|
hunghero wrote: what defferences between:
public void function1() and
public object function1()
The first one doesn't return anything, the second one returns an object reference.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
when should we use a function or an object?
Thanks
|
|
|
|
|
first you must understand some types of method
1. a method that doesn't have any returns and parameters, in C# i.e : void methodname()
2. a method that pass parameters by value, this method doesn't change the parameters value after execute i.e : void methodname(object par1[, ...object parN])
3. a method that pass parameters by reference. This method will change the parameters value after execute i.e : void methodname(ref object par1[, ...ref object parN])
4. a method that return a value with or without parameters (either pass by value or by reference) object methodename([object par[, ref object var]]
in some programming language these method are divided into two that is procedure and function. A Procedure (Sub in VB) is a method that doesn't have a return value. A Function is a method that returned a value.
hunghero wrote: when should we use a function or an object?
when you needed
hope it helps
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
Seriously, pickup a beginners book on C# and work through it. You're asking questions that would be covered in the first couple of chapters.
|
|
|
|
|
Dave Kreskowiak wrote: Seriously, pickup a beginners book on C# and work through it.
Ditto that.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I have two very simple report in my winform project.
Development machine is windows vista home premium, vs 2005 sp1 and crystal report sp1 for vs 2005.
I read the printer name from a config file and use that printer name in code
crReportDocument.PrintOptions.PrinterName = PaletteLabelPrinter;
PaletteLabelPrinter is a string holding the printer name from config file.
When I deploy my app to server 2003 R2, I simple have an error for report printing if I have a different printer name at the server than at my development machine.
Crash (exeption) happening right at the line like below
crReportDocument.PrintOptions.PrinterName = PaletteLabelPrinter;
Error is as follows
Error in File C:\DOCUME~1\alc.......... The request could not be submitted for background processing
Besides, even though I installed the crystal report sp1, vs2005 just stop running when I select from
menu as following
Crystal Report -> Design -> Printer Setup, do something change and press OK then VS2005 simple
stop working.
Please help
Thanks to everybody
Muharrem
|
|
|
|
|
Don't double post.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hi everyone,
I have been researching this topic for a few hours now and have not found any good sources of information. Basically, I have a windows service and a windows form application. The winform app can control the service (start, stop, pause...). However, the service runs long processes, and I would like for it to report progress that can be displayed by the winform, when the winform is running. The progress should be reported by raising events that the winform will subscribe to.
I know I will have to have a shared library that contains an interface or class that the server extends or inherits. I am not sure how to the whole thing would be structured though.
If anyone has any experience with this and can share a very simple example, I would really appreciate it. Links to related articles are also very welcome.
Thanks in advance,
-----------------
Picazo
|
|
|
|
|
Have you looked into .NET Remoting?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes. I would like to use the IPC channel since the service and the winform will live on the same machine. I have used IPC before, but never with winservices or events. That is the part that I would like some advice or assistance with.
Thanks,
-----------------
Picazo
|
|
|
|
|
|
I have an update which is further aggravating. If you open Outlook Express. Create a new message, then save the message, close the message and execute the message, you will see there is no "Send" button. We originally thought the issue was a problem with headers and might still be.
|
|
|
|
|
Is there any possibilites to customize the tooltip of the propertygrid. By default, when you hover it shows a horizontal box. I am looking to customize it so the words wrap up instead of a showing a long horizontal kind of tooltip.
thanks
|
|
|
|
|
netJP12L wrote: Is there any possibilites to customize the tooltip
Yes. However, the responsibility of customizing falls to software developers.
So for copy-paste drag n drop queens like yourself, no.
led mike
|
|
|
|
|
Ouch? Unwarranted? Am I missing something here?
|
|
|
|
|
EliottA wrote: Am I missing something here?
History. You can look at a members last posts ( like 200 or something) from in their profile page.
led mike
|
|
|
|
|
I tried looking for tooltip event but couldn't find. Is there any resource you could think of that might give me the right direction
Thanks
|
|
|
|
|
netJP12L wrote: Is there any resource you could think of that might give me the right direction
Starting from where? You don't appear to know anything and are incapable of using documentation to learn anything. You just come and post questions here. Maybe this might help[^], but I doubt it.
led mike
|
|
|
|