|
hi,
how i can apply transaction on a dataset ?
|
|
|
|
|
neerajxp wrote: how i can apply transaction on a dataset ?
A dataset is a disconnected set of data. There is nothing to transact against.
|
|
|
|
|
I have successfully used binary remoting with an object containing generic signatures on its public methods on XP development machines.
I am trying to implement the client web site and the serving remoting site on a Windows 2003 server.
I am finding that methods without generics work fine, but ones with generics are failing.
There appears to be a problem with handling the declared class instance as T. Again, on an XP machine this works fine.
Here is an excerpt from my remoting web config.
"
<system.runtime.remoting>
<customerrors mode="Off">
<application>
<channels>
<channel ref="http">
<serverproviders>
<formatter ref="binary">
<service>
<wellknown mode="Singleton" type="MyApp.DataServices.DataService, MyApp.DataServices" objecturi="DataService.rem">
"
Here is an excerpt from the web client web config
"
<system.runtime.remoting>
<application>
<client>
<wellknown url="http://localhost:##/MyRemotingVirtualDirectory/dataservice.rem" type="MyApp.DataServices.Interfaces.IDataService, MyApp.DataServices.Interfaces">
<channels>
<channel ref="http" usedefaultcredentials="true">
<clientproviders>
<formatter ref="binary">
"
Here is the code that makes the remoting call
"
IDataService obj = RemotingServices.Connect(typeof(IDataService),
ConfigurationManager.AppSettings[WebConfigContants.REMOTINGSERVERURL]) as IDataService;
"
The exception I get back on the web site client is to the effect
"
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.Remoting.RemotingException: The argument type 'MyDomain.MyDomainClass' cannot be converted into parameter type 'T'.
at System.Runtime.Remoting.Messaging.Message.SoapCoerceArg(Object value, Type pt, Hashtable keyToNamespaceTable)
at System.Runtime.Remoting.Messaging.MethodCall.SetObjectFromSoapData(SerializationInfo info)
at System.Runtime.Remoting.Messaging.MethodCall.SetObjectData(SerializationInfo info, StreamingContext context)
at System.Runtime.Remoting.Messaging.MethodCall.RootSetObjectData(SerializationInfo info, StreamingContext ctx)
at System.Runtime.Remoting.Messaging.SerializationMonkey..ctor(SerializationInfo info, StreamingContext ctx)
--- End of inner exception stack trace ---
Server stack trace:
at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.RuntimeMethodHandle.SerializationInvoke(Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler handler, ISerParser serParser)
at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream, HeaderHandler handler)
at System.Runtime.Remoting.Channels.CoreChannel.DeserializeSoapRequestMessage(Stream inputStream, Header[] h, Boolean bStrictBinding, TypeFilterLevel securityLevel)
at System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
"
Any suggestions would be most welcomed.
Luke Hammond
|
|
|
|
|
Remoting web config should read
<system.runtime.remoting>
<customerrors mode="Off">
<application>
<channels>
<channel ref="http">
<serverproviders>
<formatter ref="binary">
<service>
<wellknown mode="Singleton" type="MyApp.DataServices.DataService, MyApp.DataServices" objecturi="DataService.rem">
Client web site config should read
<system.runtime.remoting>
<application>
<client>
<wellknown url="http://localhost:##/MyRemotingVirtualDirectory/dataservice.rem" type="MyApp.DataServices.Interfaces.IDataService, MyApp.DataServices.Interfaces">
<channels>
<channel ref="http" usedefaultcredentials="true">
<clientproviders>
<formatter ref="binary">
|
|
|
|
|
O.K. I need to use preview and figure out what is happening to my text
Here is the remoting config
system.runtime.remoting
customErrors mode="Off"/
application
channels
channel ref="http"/
serverProviders
formatter ref="binary"/
/serverProviders
/channels
service
wellknown mode="Singleton" type="MyApp.DataServices.DataService, MyApp.DataServices" objectUri="DataService.rem"/
/service
/application
/system.runtime.remoting
And here is the web site client config
system.runtime.remoting
application
client
wellknown url="http://localhost:##/MyRemotingVirtualDirectory/dataservice.rem" type="MyApp.DataServices.Interfaces.IDataService, MyApp.DataServices.Interfaces"/
/client
channels
channel ref="http" useDefaultCredentials="true"
clientProviders
formatter ref="binary"/
/clientProviders
/channel
/channels
/application
/system.runtime.remoting
|
|
|
|
|
Hi all,
I have to make a application for synchronous and Asynchronous socket communication so right now i am able to Asynchronous socket by AsyncCallback
function but i am unable to synchronous socket so please tell how can i cretae synchronous socket in .net framwork.
if any body have idea please share with me.
thanks
bankey
|
|
|
|
|
I have a requirement to draw a rectangle and a line on a the
container control and sometimes as i move the mouse the drawing must
occur on top of user controls and other controls, which are placed in
the container control...
I'm using System.Drawing namespace (C#) to perform the drawing.
But as i move the mouse and draw the rectangles, the drawing takes
place behind the user controls....I have a requirement to draw the
shapes on top of the controls...
Please helppppppp
|
|
|
|
|
The controls will always be drawn on top of your rectangle because your drawing on the container the controls are in.
What you need to do is draw on the controls themselves when appropriate.
You can do this by handling the controls paint event.
Simon
|
|
|
|
|
I can call JavaScript functions from my C# dll, but I was hoping I could send information via function calls from the javascript back to me C# dll.
I can not find anyway to do this. Please let me know where this information would be at in this great web of ours.
Thanks
|
|
|
|
|
Hello
You can call C# functions from javascript using XMLHTTP calls ...I think you can use Mschwarz ajax library( http://weblogs.asp.net/mschwarz/ )
Cheers
Navaneeth!!
|
|
|
|
|
As has already been suggested, you can use AJAX, but if you just want to post back user input, you can also just set the value of hidden fields using your javascript code. Just register a hidden field in your form by some name that will be known both in your javascript and your server side C# code. Then have javascript obtain that field by using document.getElementById and set its value to whatever you want. Then, when the page gets posted back, you will have access to the value that was placed in that field.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
It works like a champ! Thanks of the info.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Hi,
I have developed a windows form application.Now,i am using task manager to monitor its perfomance,i got that the cpu usage is lower(but sometime will raise to 9) ,but when i look at the memory usage(In Processes),i was used about 40000k memory to 60000k memory, sometime even higher than these values.I will very appreciate if anyone can tell me my application is consider high perfomance or low perfomance? (How to evalute?)
If my post is place wrongly,please guide me where should i get my answer.
thanks
cocoonwls
|
|
|
|
|
Hi,
to me performance is measured in functional results per unit of time, so it does not involve CPU load or memory footprint. Functional results could be
transactions/second in a database, pages/minute printed in a report tool, etc.
I can not tell you whether your app is hi or lo performance. Do you consider a
10 page/minute printer fast or slow ??
You can compare with two kinds of things:
- the performance of another program with similar functionality;
- your own expectations.
In either case, you (or your customers) will be the judge.
Having the same performance at a lower cost (less CPU load, smaller memory footprint)
can be an added bonus. It could become relevant if your app is being ran by
several concurrent users on the same machine (especially if a server app).
Hope this helps.
Luc Pattyn
|
|
|
|
|
hi Luc Pattyn,
Thanks for reply.Actually my application is using for monitory[include displaying data in chart format(in real time,display 30 charts at the same time with using thread ),generate log file and save into database & textfile, and report view function] certain information which get from third party device through seriall port. Each 3 sec will get request a data from third party device.
May be i should change my question,it should be "Isn't a good quality application which develop by using c#?"
Anyway,you have gave me a good answer on it.Thanks
regards
cocoonwls
|
|
|
|
|
Hi, I like it when the question can change and the answer can remain the same...
Luc Pattyn
|
|
|
|
|
hi, I am welcome and appreciate if you would like to answer the question "Isn't a good quality application which develop by using c#?"
cocoonwls
|
|
|
|
|
I am not sure I understand the question. If you mean to ask "Can we develop quality
software in C# ?" the answer is yes (you can in any language, some make it easier
to achieve quality and/or productivity, and C# certainly is amongst them).
If you mean to ask "Can we develop the highest performance app with C# ?" then
I would say you can achieve good performance with C#, but you also can waste a lot
of performance using it. And you might get somewhat better (or even much better) perfo
when staying closer to the hardware (anything from C++ downto assembly code,
e.g. when you want to exploit the vector processing capabilities known as MMX and SSE
on Pentium).
Luc Pattyn
|
|
|
|
|
According to both of your answer.I have my own result,my application is low performance...
Thanks!
|
|
|
|
|
Is it ? I'll ask a lot of questions now, you dont have to provide the answers, I just
want to make you think a bit more about it.
By how much, i.e. what kind of speed up would you want ?
Do you think that is achievable ?
If so, why dont you have it right now, i.e. where are you loosing it ?
Is there a particular part of your app responsible for its (lack of) performance ?
I recall your CPU load was low, so this seems to indicate you are mainly waiting
on something. Any idea what ? (the database ? the network ? running out of sockets ?
having a resource leak ? swapping virtual memory all the time ?)
Is the UI responsive all the time (if not you definitely did something wrong) ?
Hope this helps.
Luc Pattyn
|
|
|
|
|
I would have not defined it any better!!! Thumbs up!
|
|
|
|
|
What you're seeing is the working set and this should not be trusted. If you're truly interested in your managed application's performance, you should take a look at using various .NET performance counters in your perf monitoring tool (perfmon in Windows) and add those counters.
Additionally, on MSDN you'll find links and articles to various performance tools that peer inside of managed applications and show you allocations or even profile your code to show you where your heaviest calls are, or where your application spends the most time. Optimizing based on profiling is an extremely useful tool.
As far as the working set for managed Windows Forms applications goes, if you minimize and then restore your app you'll most often notice that number go down. A lot of this is just how the memory manager allocates memory, and how and when the GC collects. Again, you can find lots more data about all that in MSDN at http://msdn.microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
My Software is installed on a terminal server. So 5 users connect to it at the same time.
I want to refer each user that an instance of the programm he wants to start is already running.
Now i have the Problem that the first user starts the programm and all users after him get the message they've already started.
I thought, comparing the owner of the process with the current user would make it better, but i still get the processes for all users(depending on the machine) and not for the current windows user.
i hope somebody can parse what i want with this
|
|
|
|
|
Hi,
you could create a Mutex with a name that includes your process name (in order not to interfere with other programs that might do similar things) AND the user's name
(e.g. from Environment.UserName). And then try a WaitOne on it:
string name="myProgName"+Environment.UserName;
Mutex m=new Mutex(false, name);
if (myMutex.WaitOne(1,true)) {
... this is my first instance
} else {
... I already have an instance running
}
You should keep m as a global variable so its life spans your app's life.
I typically have a class that does such singleton test before I create my main form,
hence in the static void Main() method.
PS: you could use Environment.GetCommandLineArgs()[0] to obtain your prog name
(actually its exe's file name).
Hope this helps
Luc Pattyn
|
|
|
|
|
Hi ,
I am using vs.net 2005
i run a windows application after running
My problem is when i click the top of the form th form is noveable.
i want to fixed it .
i set minize box= true
and maximize box=true
plz help me
|
|
|
|