.net 1.1 And .net 2.0 In Terms Of Webservices And Remoting?
Mar 12, 2010what is the difference between .net 1.1 and .net 2.0 in terms of web services and remoting
View 5 Replieswhat is the difference between .net 1.1 and .net 2.0 in terms of web services and remoting
View 5 RepliesI have a shared object through net remoting. The problem is that this object has some EntitySet and EntityRef attributes. When I try to run the program I get an exception telling me that EntitySet is not marked as Serializable. If I mark it as Serializable everything seems to be ok, but when I try to access from outsied to the attribute represented by the EntitySet, I am not able to use it.
BTW, Does anyone know how change the default binary serialization of tcp channel?
First, let me explain a little bit about my setup. My server is setup as a Marshaled singleton object:
RemotingServices.Marshal(lsServer, ServerObject.objectUri);
In order to have two-way communication from the server to the client, the client activates a ServerObject, then passes in its own ClientObject (which is also a MarshalByRefObject) the server uses the ClientObject to talk back to the client:
var lsClient = new ClientObject();
var lsServer = (ServerObject)Activator.GetObject(typeof(ServerObject), url);
lsServer.attach(lsClient);
When the attach method is called, the server takes the ClientObject and stores it in a List:
public void attach(ClientObject client) {
clientList.Add(client);
}
The server can then call a method on the ClientObject called "SendMessage" to communicate to each client in its list:
foreach(var c in clientList) {
c.SendMessage("Hello");
}
This works great until a client is encountered that has disconnected. In this case, an error is thrown about the client refusing the connection. I can catch the error, but the problem is I cannot remove the reference to the ClientObject from the server's List. The following re-throws the "connection refused" exception anytime a client has been disconnected:
clientList.Remove(badClient);
So a couple of questions:
1- Is there a way to detect the connection state of a client without having to catch an error?
2- When I do detect a client that has disconnected, why does the attempt to remove the object from the server's list appear to "communicate" with the client (thus causing the exception to be thrown again?)
EDIT
As Patrick pointed out below, doing a Remove from a list causes the List to iterate my objects and do a comparison on them (calling .Equals) - this is what caused my ClientObject to attempt to communicate again and thus throw the exception. To resolve it, I instead changed the List to a dictionary keyed off a unique ID supplied by my Client at the time of attaching to the server. Then I used that unique ID to remove the client. I never did find a direct way for determining if a client had disconnected other than catching the error.
I'm building a Remoting Demo, and here's my scenario:
There are 4 projects:
ServicedCOM: This project I've built a ServicedComponent, this component using for access data from database.
RemoteLoader: I using this to load ServicedCOM to RemotingServer.
RemotingServer: This is an console application, and this application can be running from another computer.
WebApp: Client, this is inteface using for End User.
and my results: I can access and retrieve data with function is called SpeakHello (test function), but I cannot do the same thing to get sectors using this model, I think I'm doing something wrong. and here's my code snippet:
1. I have a ServicedCOM and a function to get Sectors is called GetSectors (I test OK)
[Code]....
[Code]....
2. I have a Remote loader
[Code]....
3. And here's RemotingServer
[Code]....
4. And the last is Client
[Code]....
I'm so excited about the webmatrix, because it makes all the works to be easier than ever before, so I make a try, but I met a problem when I deployed the project membership db to remoting host (I chose the cytanium.com), and I had deployed the project files and another database sucessfully, only the membership related database failed, the error message is below:
[Code]....
I thought that the problem source is about the collation of the database, so I change my database collation from "Chinese_PRC_CI_AS" to "SQL_Latin1_General_CP1_CI_AS", but the problem is the same, I had search a lot of articles, but I didn't find a way to resolve this issue.
When using .net remoting, does the server limit incoming client remoting calls?
I find a particular remoting call (during ASP.NET page rendering) to take from 200ms to 1500ms. While the underlying data call is only 50ms. Factoring in remoting overhead of 150ms per call, the only difference between the two cases is that the latter scenario has about a dozen more parallel remoting calls in progress. So my guess is that when too many remoting calls are happening, some will get queued up? I also doubt system resource is the cause of the delay because it is not nearly saturated.
Searching MSDN, I find the below:
http://msdn.microsoft.com/en-us/library/ms973907.aspx
clientConnectionLimit: specifies how
many connections can be simultaneously
opened to a given server. The default
is 2. This is exactly the same as the
connection limit on ServicePoint in
the net classes.
That seems awfully low to me and if were the case, my app's performance would have been much worse. Can someone confirm if there is indeed a connection limit or some other throttling in .net remoting?
I am working on personal Web starter kit for creating a personal webiste and i would like to know what are the terms and conditions of using Personal Web starter kit ?Do i have to mention on the website something like " Powered by personal Starter kit" or something like that ?Can i write Copyright by name of the person for whom i am creating the website ? knnow the Microsoft mentioned here about it : http://msdn.microsoft.com/en-us/cc533486.aspxi read that already but it is net very clear that anyone can use Personal Web starter kit as personal webiste or not, can anyone write copyright by (person name )
View 2 RepliesWe're modifying an existing ASP.NET application. We added a Terms and Conditions page with an "Accept" button that stores that choice in the user's account data. We want to prevent the user from accessing any page when the user has not accepted the Terms and Conditions.
I think we want to do this by looking up the "accepted terms" value upon login and storing it in the session. Then we need to intercept every request and check for that session value. (If it's not there, we redirect the user to the Terms and Conditions page.)
Is the PreRequestHandlerExecute method the right place to put this check? This method also gets called on requests for stylesheets and images, so it doesn't seem like it was intended for this purpose.
i have a query that select random records in access database in terms of time : "SELECT TOP 10 * FROM Tbl ORDER BY Rnd(-10000000*TimeValue(Now())*[ID])" now i wish to convert this query for using in sql server 2005 such that return random records in term of time
View 5 RepliesIs there a way to get load information on Application Server? How much memory or CPU is being used at a given point? I want to either 1. Limit users to use specific functionality of ASP.NET 3.5 application or 2. Deny users from accessing the application saying "Server is busy at the moment"
View 4 RepliesFor Asp.Net Charts i m able to show value by setting the property as
Chart.Series(Series1).IsValueShownAsLabel=True
I want the shown values to be formatted in terms of decimal places and a thousand separator
Chart.Series(Series1).LabelFormat = "0:#.##" is Not Working
I am trying to differentiate between a debugging session on the localhost and a live environment in terms of calls to the WS.
View 5 RepliesWhat are class relations. explain relation between a content page and master page in terms of OOP?
View 3 RepliesI am working on an asp.net application (.net 4 framework) design and was wanting to know what are the pros and cons and best practices for using webservices vs WCF techology? This application will eventually be used by outside clients to consume data. When would you use WebServices and when would you use WCF? Is one more scalable than the other?
View 1 RepliesI am using webservice and Javascript, and in my javascript function, there's a function called onComplete(data).Now my problem is, I want to get 2 datas instead of one data argument in that oncomplete, is it doable? That "data" is the result of call from my webservice. So I am looking for something like this: onComplete(data1, data2) so that I can display it back to my aspx page
div1.text = data1
div2.text = data2
we consume .net web services in php or not.if yes then please tell me how can we do it. i am to create a web service which takes values and save it in database also it will take values and reply some data as a standard xml format.i know how to create web service and how to use it in asp.net but don't know how to use/call it from php.thing is that i will not be writing code in php to consume but wants to know that do i need to take care of any special thing or need to do some extra code to make it available and use by php developers.
View 1 Replieshow we can serialize a datareader in webservices.
View 1 RepliesHow to serialize the DataReader in webservices in asp.net?
View 4 RepliesIs there tool/way to convert webservices into WCF services? like .net frame work application 1.1 to 2.0 provided by MS visual studio.
View 2 RepliesI want to know can php client consume asp.net web services with
1: returning basic types int, string etc.
2: returning DataSets
I was wondering what the major differences are between controllers and webservices. I understand webservices can receive postbacks via ajax while controllers cannot. Also, when you put a webservice in a MVC site, what file structure do you use to store it? Just create a single services folder?
View 4 RepliesI am trying to consume a webservices which are located at https://TestServices/ServiceList.asmx. When I try to add a service reference to my C# library class project my app.config file looks like below:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="TestServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
[code]...
Am new bee to Webservices.I have declared complete BLL in the class library.
Can call those methods defined in Class library class files(.cs file) in .asmx file.
We have a web service running on the server. We want to use the service in local machine. Could some one kindly give all the steps to get the methods availble in the client.
We have created web methods in the server. And trying to access the same thing on the client. I can literally access those methods using the refernce variable of the server. but when I try to run it , it comes up with run time exception unable to connect to remote server.
I am developing an ecommerce app that is using the UPS shipping webservice. I have read that it is good to create a singleton so there is only one instance of a webservice at any time. My code for that is below.
[code]...
In the line above in the construtor I have to set the UPSSecurityValue of the service. Then later I will call the ProcessShipment function. My question is; Since the webservice is being traeted as a singlton could different instances of the app share that same UPSSecurityValue and could it change between when I set it and when I call ProcessShipment?