Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / December 2005

Tip: Looking for answers? Try searching our database.

Web service invoke

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jaiganesh - 06 Dec 2005 13:16 GMT
Whar are the different ways that a web service can be invoked ?
GCR - 08 Dec 2005 12:36 GMT
Could you be more specific in your question?

> Whar are the different ways that a web service can be invoked ?
Jaiganesh - 08 Dec 2005 14:50 GMT
I have a web service which synchronizes data between 2 data bases by passing
the connection strings to a web method.This web service will be hosted in a
server and utilized by more than 30 different applications hosted in
different servers.It is working fine initially but after some time as the
requests  
from these applications increases web service is not responding or not
processing its job.When I tried to browse the web service I am getting the
error "Exception of type System.OutOfMemoryException was thrown".Currently I
am calling the web method asynchronously.

Please help me in solving this problem.

Thanks in Advance,
Jaiganesh

from

> Could you be more specific in your question?
>
> > Whar are the different ways that a web service can be invoked ?
GCR - 08 Dec 2005 15:43 GMT
OK, I see your problem, and it dosen't has to do with web service calls! You
are creating database connections based on the connection strings delivered
as web method parameters, and use these connections for database
synchronization. Since these operations usually take some time to complete,
and since you have a lot of consumers, you quickly get into the situation of
having some hundreds of open database connections with sync operations
running over them, which is quite expensive in terms of memory and processing
time.
I would guess that the web service gets only a limited number different
connection strings, so I would put them in the web.config. Then I would use
the Application_Start event handler in global.asax to initialize one instance
for each of these connections, and taking care that the connections are
pooled. Then I'd change the web method, so insetead of the connection string,
I'd have an identifier for the connection pool. The web method implementation
would select the apropriate connection pool from the Application, based on
the provided identifier, and use the pool as you do it now. Las, I'd place
cleanup code in the Application_End event handler to close the connection
pools.
This way you use just a limited number of connections, which are also pooled.
Hope it helps!

> I have a web service which synchronizes data between 2 data bases by passing
> the connection strings to a web method.This web service will be hosted in a
[quoted text clipped - 16 lines]
> >
> > > Whar are the different ways that a web service can be invoked ?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.