|
What happens if you try to print that page using Internet Explorer 6?
|
|
|
|
|
I implemented same call in my program few days ago and it works nice so it must be your host have problem with IE or something...
|
|
|
|
|
Hi All,
Iam using this multi threading concept to load an xml file from web to a dataset.
Here iam generating lot of threads say around 10. In this few threads where not completed till the end, when i checked the thread status it is still alive.
So what should i do to overcome this problem.
Thanks in Advance,
Justin
Justin
|
|
|
|
|
Here are some facts:
By themselves, threads stay alive as long as they have something to do; most likely this
means they are inside a loop (could be a message loop as inside Application.Run, and
in Form.ShowDialog) or they are waiting on something that has not happened yet (such as
Thread.Join).
From outside the thread, a thread could get aborted or killed, to make it stop.
When Thread.IsBackground is true, then that thread will not prevent the app from exiting.
And some suggestions:
- watch your CPU activity (Windows Task Manager, Processes, column: CPU); if not near zero,
your app is still busy (calculating, or looping, anything that exceeds waiting)
- if CPU is near 100% you are probably stuck inside a loop that contains no wait, and also
no delay (something like a polling loop without a Thread.Sleep; a very bad idea!)
- add logging to your threads
- make sure you do not eat Exceptions; they are there for a purpose, act on them, dont
just catch and ignore them
- use Visual Studio to observe and debug your app
- try and avoid potential deadlocks (you know, the situation where multiple threads need
access to the same resources, which are protected in some way, say by locks;
thread 1 grabs resource 1 then tries to grab resource 2, whereas thread 2 grabs
resource 2 then tries to grab resource 1.). If this is too mysterious, find yourself
some articles on the subject (and again add logging to your app, with logging you pretty soon
should notice a deadlock if and when it happens.
Cheers
Luc Pattyn
|
|
|
|
|
Hi all,
I've created a usercontrol library (VS2005) and when I use one of its controls in an app I'd like to change some properties of the controls that are contained in the usercontrol. By default, when I drag a usercontrol to the app form, its controls remain locked and I just can change the general properties of the UC.
Is it possible to change the container controls properties?
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Hello,
If the properties are public and the ReadOnly Attribute is not set to "true", it should work.
All the best,
Martin
|
|
|
|
|
Hello,
Martin# wrote: If the properties are public and the ReadOnly Attribute is not set to "true", it should work
how do you make that control public? I mean: the control that I want to change is a Button and in some Apps I'd like to make it visible and in some others no. Can I do this in the Form DEsigner or by code at runtime?
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
You can change the attributes of a Control in Designer; look for "Modifiers"
in the Control's Properties list.
Now if your UserControl really has two states (say "simple", and "full") I think it would
be much better to make that explicit feature of your UserControl:
keep the internal Controls private, but give the UserControl one more Property
(say bool "reducedFunctionality"); with this property you can choose, either at build-time
with the Designer while putting it on your Form, or programmatically at run-time
(by assigning a value).
Luc Pattyn
|
|
|
|
|
Hello !
When an object is marshalled by ref (through .net remote client call),
all references it hold also get marshalled too--except those new inside itself.
Is this the correct statement?
Technically,
<br />
class MyService : MarshalByRefObject {<br />
MyObject myObj = new MyObject();
MyObject hisObj = someOneElse.Object;
...<br />
}<br />
Thanks,
sovann
|
|
|
|
|
I have done one desktop application in visual c#, i want to give
online updations for that software . i need .net coding for this
need.
we are in illusionary life
|
|
|
|
|
There is no .NET code for this - deploy with clickonce.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Consider the following code example
class Program
{
static void Main(string[] args)
{
StudentInfo stud = new StudentInfo();
stud.Name.FirstName = "zai";
stud.name.FirstName = "zai";
}
}
class NameInfo :ICloneable
{
private string firstname;
public string FirstName
{
get { return firstname; }
set { firstname = value; }
}
public object Clone()
{
NameInfo n = new NameInfo();
n.LastName = this.lastname;
return n;
}
}
class StudentInfo:ICloneable
{
public NameInfo name = new NameInfo();
public NameInfo Name
{
get
{
if (name != null)
return (NameInfo)name.Clone();
else
return null;
}
set
{
if (value != null)
name = (NameInfo)value.Clone();
else
name = null;
}
}
public object Clone()
{
StudentInfo s = new StudentInfo();
s.Name = this.Name;
return s;
}
} the following statement fails when accessing firstname thru Name property
stud.Name.FirstName = "zai";
while the one below is ok
stud.name.FirstName = "zai";
why??
if I was not using an IClonable interface both of them work....but im not sure its an IClonable issue...
is there any rule that says that we souldnt access inner variables through a property of that object?
|
|
|
|
|
stud.Name.FirstName = "zai"; doesn't work because of the getter for the Name property. There you clone the field name and return this newly created instance. Afterwards you assign a new first name to the clone instance, which cannot reflect in the field of your StudentInfo instance as your operating on another instance of Nameinfo.
So if you clone a field inside a getter before returning it, you actually protect it from be changed by any outside code.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi. I'm developing a client application that sends xml files as DIME attachments to a web service. I use WSE 2.0 for that.
In order to fix some bugs it is almost imperative to me to see how the whole SOAP request looks like(the SOAP envelope and the attachmets), and also the SOAP response from the server.
I did some research and found out that WSE 3.0 has just such a feature, to write incoming and outgoing SOAP messages to trace files on the disk. But unfortunatelly I am forced to use WSE 2.0 because the web service can only handle DIME attachments and WSE 3.0 has no support for DIME.
So, what other ways are there to view the SOAP request/response contents?
Any ideea would be greatly apreaciated.
Thanks.
LATER EDIT: It turns out that WSE 2.0 also has this tracing facility, but I can't use it because my project must also use WSE 3.0 and even though references to both Microsoft.Web.Services2 and Microsoft.Web.Services3 are added to my Visual Studio 2005 Project if I right click the project name in Solution Explorer, at the bottom of the context menu I only have "WSE 3.0 Settings" (no WSE 2.0 whatsoever).
Is there any way to get the SOAP request context programatically using some of the classes in WSE?
What can I say... Life is complex and has so many aspects.
-- modified at 2:25 Wednesday 10th January, 2007
|
|
|
|
|
Hi,
In Windows Application .Net2.0.
if i create a form object.
so how to check form object created or not .
arrgent.
Thannks
|
|
|
|
|
How do you mean ? If it's been shown, or if the class exists ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
iam working in c# 2005
i have mdi form when i try to open child form in it it's open in maxmizied state instead of i chane it's properites to windows state=maxmizied
and in the form load i write this code
"this.WindowState = FormWindowState.Maximized;"
notes
the form right to left =yes "it's client requirement" even if i chane this properites the same problem occurred
what is the soulations ?!!!!!!!
ma_refay
|
|
|
|
|
I'm not sure of what you're asking. You can set the initial state in the properties in the designer.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
i initial state form windows state in the properties in the designer but it's execute it it's take the size when apper in the desgin view not maxmizied it even if i set it's properites in designer
ma_refay
|
|
|
|
|
Hello!
I am having a problem with .net remoting.
I have searched Microsoft documents, but got no hints.
When the server is accessed by remote client, it turns to be proxy : OK
All instances <b>new inside the server class</b> stay native--direct call : OK
All references <b>passed to the server class</b> turns to be TransparentProxy : Why ? Is it because the reference is outside the server object memory segment ? But they are in the same app domain--real object out there.
Technically,
<code>
class Server : MarshalByRefObject {
ListBox myList = new ListBox(); // stay native--direct call
ListBox hisList; // turns to TransparentProxy
public Server(ListBox list) {
hisList=list;
... // open port, listen to client request
}
}
class MyForm : System.Windows.Form {
public MyForm() {
...
new Server(listBox); // start the server
}
}
</code>
Your comments would be very helpful. Thanks.
Sovann
|
|
|
|
|
When you start a file conversion process in iTunes (programatically, through the COM interface), it hands you back a status object. You can poll that status object for progress data, or you can create event handlers and that object will raise progress events for you. Hence:
iTunesConvertOperationStatus itcoStatus = null;<br />
...<br />
<br />
itcoStatus = iTunesApp.ConvertFile2(strPath);<br />
...<br />
<br />
itcoStatus.OnConvertOperationCompleteEvent +=new (shortened)_OnConvertOperationCompleteEventEventHandler(itcoStatus_OnConvertOperationCompleteEvent);
My question is: once I've bound the event handler to the instance of the object, can I call:
itcoStatus = iTunesApp.ConvertFile2(strPath)
over and over without first releasing the handler? Or do I have to wait for the Complete event, release the handler, call ConvertFile2(), and rebind the handler each time?
|
|
|
|
|
As long as the iTunesApp object is instantiated and you don't create a new instance of it each time, the event handler will stay bound until you release it.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
do you mean the itcoStatus object? The event handlers (in this case) aren't bound to the iTunesApp object.
Which bring up my point: if I simply keep overwriting the itcoStatus object with a new instance (not explicitly releasing the old instance) are the handlers bound to the new instance? Or did they become defunct when the old instance was stomped?
I realize my terms aren't very technical here, which reveals my real lack of knowledge about "instances"...
|
|
|
|
|
JoeRip wrote: do you mean the itcoStatus object?
Yes, I did mean the itcoStatus object. I guess I wasn't paying close enough attention to your example code.
JoeRip wrote: if I simply keep overwriting the itcoStatus object with a new instance (not explicitly releasing the old instance) are the handlers bound to the new instance? Or did they become defunct when the old instance was stomped?
Yes, if you overwrite the existing instance of the object with a new instance (by repeatedly calling itcoStatus = new iTunesConvertOperationStatus() you will loose the event handlers. Each time you call new you are creating an entirely new instance of the object.
In your example code, the first line:
iTunesConvertOperationStatus itcoStatus = null;
defines a variable named itcoStatus whose data type is a itunesConvertOperationsStatus object. When you then run code like this:
itcoStatus = new iTunesConvertOperationStatus()
you create a specific instance of that object in memory. The itcoStatus variable holds a reference (essentially a pointer) to the memory used by that instance. Each time you call new you get a new instance, which means you potentially get a different portion of memory so the itcoStatus variable ends up with a different reference.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Dear all ,
i am making web application using C#, asp.net2.0(visual studio 2005) and sql2000, i want to know how can i securly pass password value from
client to server. PLease guide me.
Thanks
regards
imran khan
|
|
|
|