|
I knew about thread safety, but i don't have any clear examples to understand concurrency modes , i run this code as client but it always goes sequentially.
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
<br />
<br />
namespace ConsoleApplication1<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
ServiceReference2.Service1Client c1 = new ConsoleApplication1.ServiceReference2.Service1Client();<br />
<br />
for (int i = 0; i < 5; i++)<br />
{<br />
<br />
<br />
Console.WriteLine(String.Format("Call {0} Start: {1}",<br />
i.ToString(), DateTime.Now.ToLongTimeString()));<br />
Console.WriteLine(String.Format("Call {0} : {1}",<br />
i.ToString(), c1.GetData(i)));<br />
Console.WriteLine(String.Format("Call {0} End: {1}",<br />
i.ToString(), DateTime.Now.ToLongTimeString()));<br />
}<br />
<br />
<br />
<br />
<br />
<br />
<br />
c1.Close();<br />
<br />
Console.ReadKey();<br />
}<br />
}<br />
}<br />
<br />
|
|
|
|
|
If you want to test concurrency, you need to have more than one thing attempting to hit the same code at the same time. Simply having one instance of a single threaded application running isn't going to do it I'm afraid. While the code at the far end may have multi-instance or single instance capability, you are calling it from a sequential loop.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
so do i have to execute my client.exe 5 times by double clicking on it . Please can u help me in checking the concurrency
Pete O'Hanlon wrote: you need to have more than one thing attempting to hit the same code at the same time
Above how can i do ??
|
|
|
|
|
When a request is send to service , then it means it comes in the form of thread . for ex
suppose,
MyService ser=new Myservice()
for(int i=0;i<5;i++)
{
ser.callMethod();
}
then do the above code comes as 5 seperate threads to service or if i click on client.exe 5 times then it comes as 5 thread ?
|
|
|
|
|
After working in Visual Studio 2008 with SP1 on my application, everything works sweet with visifire charts.
I then create an install for my application and deploy it to a seperate machine. Charts do not work, and we get system.exception with Eventype:clr20r3
Can visifire be run without VS 2008? I don't expect to install VS 2008 SP1 on every install instance of my app with visifire.
I'm using WPF, and am creating the chart dynamically through code. I'm using the latest stable/non-beta version of visifire, v2.1
|
|
|
|
|
|
Hi,
I have install the Microsoft .NET Framework 3.5 in the client machine but the application have a same error (system.exception).
Please i really need your help to fix this problem.
Regards
CUTUDI Didier
|
|
|
|
|
Do you have .NET 3.5 SP1 installed on that machine? Is it a different targettype than yours, e.g. you're running 32 bit and it's 64 bit?
What's the full event message?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
The error generate by Windows is :
The Eventype is clr20r3 P4:wpfvisfire.charts P5: 2.3.5.0
The error is system.exception. I run the application in 32bits processor. And i have make my software for 32bits processor.
modified on Wednesday, December 16, 2009 10:07 AM
|
|
|
|
|
Are any visifire assemblies required by the applications?
If so, are they available on the target machines?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
When i look with FILEMON, my application need wpfvisifire.charts.dll in a client computer. But tyhis dll is present in a same directory of application.
I have this error event type EventType:clr20r3 generate by Windows XP. I dont think is a mistake made by VISIFIRE but by Silverlight using to create a VISIFIRE dll.
Regards, Cutudi
|
|
|
|
|
After working in Visual Studio 2008 with SP1 on my application, everything works sweet with visifire charts.
I then create an install for my application and deploy it to a seperate machine. Charts do not work, and we get system.exception with Eventype:clr20r3
Can visifire be run without VS 2008? I don't expect to install VS 2008 SP1 on every install instance of my app with visifire.
I'm using WPF, and am creating the chart dynamically through code. I'm using the latest stable/non-beta version of visifire, v2.1
|
|
|
|
|
cutudi wrote: I'm using WPF
You've got the wrong forum. This is the silverlight one.
cutudi wrote: seperate machine
I suppose for visifire for WPF to run, you would need the full set of the CLR running on this machine.
Might be something you could look into.
There's nothing left in my right brain and nothing right in my left brain. |
|
|
|
|
|
Hi,everyone!
I got a problem with xbap application.
I have set the security in full trust.But while I published the application,it can only read from local file.
What can I do to write to local file?
I wonder if I can only write to IsolatedStorage. Is there any way to write to local files?
Thank You!
|
|
|
|
|
Silverlight makes use of Isolated Storage only. Even OOB applications use Isolated Storage for security reasons.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
hi guys ,
i want to print mydata grid , is there any way? so that i could change view of the data inthe grid and print it as it is in the format .
regards.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
See here[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I am try to upload files from my computer to a server machine using WCF in Silverlight. Often i can achieve this but sometimes there occurs a problem and stops uploading. Silverlight error is: "The remote server returned an error: NotFound." and at the status bar of the web page there is a black exclamation mark in yellow triangle says error at page. This is details of it: unhandled error in silverlight 2 application at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallBack beginMethod, Object state) at Syste.Net.Browser.BrowserHttpWebRequest.EndGetResponse (IAsyncResult asynResult) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse (IAsyncResult result) at ....
And after i found where error occurs
(wsUploader is my WCF and svluploader is silverlight project.)
public svlUploader.wsUploader.UploadResponse EndUpload(System.IAsyncResult result) {
object[] _args = new object[0];
svlUploader.wsUploader.UploadResponse _result = ((svlUploader.wsUploader.UploadResponse)(base.EndInvoke("Upload", _args, result)));//<b>error occurs in this line</b>
return _result;
}
So help me....
modified on Monday, December 14, 2009 3:37 PM
|
|
|
|
|
If you haven't already, maybe try turning on the
includeExceptionDetailInFaults service behavior
option in the web.config...
<serviceDebug includeExceptionDetailInFaults="true" />
If you can't catch the exception in the debugger, you may need
to use something like Fiddler to capture the fault response with
the exception info in it.
Regardless, it's hard to guess without more detailed error info...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Connect directly to your wsdl and confirm that you do not have problems with your wcf service itself.
NotFound is a really poor messaging error which means basically "something's screwed up" and has nothing to do with something not being found.
|
|
|
|
|
I am needing some help with the second part of my application. I have uploaded these files for you to look at. These are at:
http://www.4shared.com/file/172290058/6db0136e/Noe_S2_Web.html,
http://www.4shared.com/file/172290145/bd834a5/3cI_noe.html,
http://www.4shared.com/file/172290211/7384baa0/Test_Data.html
Basically, what I am wanting to do is filter the contents of two text boxes into two other textboxes above and below a range that a user has entered into a textbox. So, for example, if someone where to enter the S2 value in the box of ("0.75"), then the programme would return all values above and below this range from the noe richtextbox. So it is basically taking the value in the S2 data range, the residue (Res) and matching it with the corrosponding NOE value. Within the S2 file, ignore all the other values other than S2 and Res. This means, that for each line in the noe file:
assign (segid HRV and "resid 168" and name HN) (segid HRV and "resid 137" and name HD2) 5.500 3.7 0.0 ! hinnoesy.96 or (segid HRV and resid "168" and name HN) (segid HRV and resid "137" and name HE2)
assign (segid HRV and "resid 167" and name HN) (segid HRV and "resid 167" and name HG#) 5.500 3.7 0.0 ! hinnoesy.110 or (segid HRV and resid "167" and name HN) (segid HRV and resid "167" and name HB#) assign (segid HRV and resid 126 and name HN) (segid HRV and resid 126 and name HA) 5.500 3.7 0.0 ! hinnoesy.350 or (segid HRV and resid 126 and name HN) (segid HRV and resid 130 and name HA)
...You would enter a S2 value into the textbox within range, and it would match up the residue value with the corrosponding noe data, as well as sort according to the parameters in the textbox. So, it would need to output the whole sorted noe file line into the high and low range textboxes. I.e. the first residue is 1, with a value of 0.273. Any value above and below this with the resid within the noe file will take the whole line and place in the corrosponding textbox.
I am very stuck with how to do this, so if someone could please have a go, it would be much appreciated. Thanks.
|
|
|
|
|
Hi, I want to create Tabcontrol like one in PDF file.In PDF,in left side we can see tabs liek bookmark,signature etc., as image and we can expand it and collpase it.I want exactly like tht.
As im new to WPF,i referred some samples and i creted tabcontrol.
Till now i achieved tabcontrols with image as Tab header.
But i don know how to add that collapse button in tabitems.And also each tab page should contains lot of iamge buttons and textbox.I do not know how to do that.
In VC++,just we add three dialogs as property sheet.But i dont knwo how to do that in WPF.
Pls help me..And provide some samples for that.
Thank u in advance
Anu
|
|
|
|
|
I am very new in multithreading. I tried to read some topics but confused with different synchronization techniques used in .net multithreading like Mutex class, semaphore, critical section, event, wait handle and monitor.
Can any body guide me or can we do online conference or is there any in-depth video tutorial in multithreading ?
|
|
|
|
|
This question is far too general. If you need to learn multi-threading then find a tutorial or book that covers the subject in detail. This forum is for answering more specific questions, but does not have the facitlity for teaching you a new subject. My personal recommendation would be to make sure that you are fully skilled in the language of your choice before you try to apply multi-threading techniques to your programs.
|
|
|
|
|
For simplicity I have a 6 color cube (Every side has different color) and viewing with a camera. I would like to show same cube from opposite angle with diffrent camera. Both views are visible at the same time. First view works fine but when I want to add the cube in second view where different camera is installed, I get the error that the cube is already added to another view (which is true). I am unable to add one object to 2 views. Any idea how this can be done in WPF? Your help will be very much appreciated.
Best regards
Agha Khan

|
|
|
|