WCF / ASMX :: Doubt Regarding Connection?

Mar 25, 2010

I'm using WCF service in my project.my doubt iswhen i used WCF service in windows application after each time a sevice is called i need to close it otherwise it will gives an error.

serviceClient objService = new serviceClient();
try
{

[code]...

View 1 Replies


Similar Messages:

WCF / ASMX :: The Underlying Connection Was Closed: The Connection Was Closed Unexpectedly?

Oct 14, 2010

This error stopping my work in my crucial time. The error is "The underlying connection was closed: The connection was closed unexpectedly.".There are multiple WCF service I created in my project. But when I am requesting only one service this error is coming. I compare with other service, no difference. The service works fine in the morning, but afternoon it stops working and raising error.

I installed Silverlight 3.0 Tools for 2008 Sp1, Silverlight 3.0 Developer, WCF RIA Beta and Silverlight 4.0 runtime in my system in the morning. After getting this error I uninstalled WCF RIA Beta. But same issue.Could not find any solution. Please assist me how to solve this issue.

View 2 Replies

Web Forms :: Doubt About C# And VB.net / Put A New Page Written?

Apr 10, 2010

I've a project of a web application that all the code is in vb.net. If I want to put a new page written in C# is that possible ?

View 2 Replies

Web Forms :: Doubt Reg The Emails That Sent Across From The Server

Jul 9, 2010

i have a asp.net application which is currently working in LAN / intranet my is the development server in which i have all the files , images and other functionalities its confiured thr' IIS so that other clinets in the INTRANET can access the aoolication. i have a email module which works fine . using this e mil modules i sent emails conating images, hyperlinks text etc to the gmail, yahoo etc ids and accessed it from my debelopment system asweel from other systems in the network.all of them work fine but if i sent it to a person who access the email outside the INTRANET the images nor the hyperlinks are displayed.only the text matter is displayed.

View 26 Replies

Architecture :: Encapsulation Doubt In The Code?

Nov 26, 2010

I am using code like this in Business Logic.Can u explian the below whether i am using Encapsulation concept in the below code.Also tell me why i should use private for declaring variable _Region and public for the property Region


private string _Region;

public string Region
{ [code]....

View 5 Replies

WCF / ASMX :: Best Place To Close The Connection

May 9, 2010

we are using WCF web service. My job is to create the client WCF service.

Sample 1
try
{
Serviceclient client = new Serviceclient();
client.GetOrders();
[code]...

Which the best place to close the connection. Is it in Server side or Client side?

View 2 Replies

WCF / ASMX :: Way To Cache A Web Service Connection?

Oct 27, 2010

I have a web service that calls another web service (not my design).The wrapper web service is our code the underlying web service is 3rd party.The issue is that when one of our apps calls the web service wrapper.. it opens a new connection to the underlying web service and that login time is around 10seconds! (3rd party issue)... the calls after the login are fast in testing.SO we are trying to have ONE login for all the calls to the underlying services. However our wrapper service is called one by one..I was thinking if there was a way to store the underlying web service connection in a cache (netbean?) I could reuse it for all web service connections to the 3rd party...

View 1 Replies

WCF / ASMX :: Persistent HTTP - Connection For All Calls To A WS?

Apr 25, 2010

I need to connect to a WebService provided by someone else. This WS (all https) has three methods that are accessible without having logged on:

login, logoff, getVersion . All other methods require that the login-method has been called before. Nothing special unto this point. However, the docs state that I have to make sure that (quote):

"All method calls between login and logoff are to be carried out by means of the same persistent http-connection (key word: http persistent connections or http connection reuse"

I seem to be unable to figure out how that would work - all WS'es I ever utilized were either taking user/pwd combinations in each method call or the login-method returned something like a SessionID which was then used for each subsequent call to a given method (i.e. passed as a parameter). If I call the login-method and subsequently call any method that requires authentication, the call will fail with an exception telling me that I need to log in first.

View 1 Replies

Forms Data Controls :: How To Basic Doubt In GridView

Aug 2, 2010

I am very new to thegridview control. As while searching for sample coding to edit the Gridview datas during runtime,i got the following codings protected void Edit(object sender, GridViewEditEventArgs e)

View 4 Replies

Web Forms :: Doubt In Retriving Data From SQL Server Using XML And Passing It To Vb?

Oct 29, 2010

I have doubt in XML using in asp.netIn my project there are 15 forms and all are coded using C# and now I am going to add a new form using VB. And all the data using inside if that VB form from XML file.I have a Doubt How to write code inside to make connection with my SQL server 2008 and database.How to use Query String for retrieving data from data base and pass it to VB formPlease Do help me with small coding file with a little description.I am developing this form for to Create Event Calendar in ASP.net

View 1 Replies

WCF / ASMX :: Unable To Make Connection Between Client And Service

Apr 30, 2010

I receive the following error, when trying to consume Wcf service:

"An existing connection was forcibly closed by the remote host". Consuming the service works fine when the host and the client are on the same machine. When I move the client to Hyper-V virtual machine (I didn't try it on a real computer) - it throws the error. Both firewalls are turned off Do you know what can cause such behaviour? Here are the details:

Both the client (hyper-v) and the service are on Windows server 2008 R2

Service url - http://wcftest/CalculatorService.svc (wcftest is the website and is mapped in the hosts file to localhost)

Service config:

[Code]....

Client config:

[Code]....

Are there any configuration settings which I'm missing?

View 1 Replies

WCF / ASMX :: No Connection Could Be Made Because The Target Machine Actively Refused It Xxx:xxx:xxx:xxx:443

Nov 16, 2010

I'm calling a 3rd party web service from our network and I receive following error: No connection could be made because the target machine actively refused it 111.111.222.545:443

View 8 Replies

WCF / ASMX :: How To Secure A WCF Web Service / Using Traditional "connection String In Web.configâ€

Aug 2, 2010

How do you secure a WCF web service when you are using the traditional "connection string in the web.config"?

I have added a WCF service to an application which uses a JQuery post and returns JSON. The request happens on the client side. The purpose of this service is to return search information while the person is typing text into a textbox.

It works well, but there is a problem because the application will be used by a number of people and I am maintaining a role based security within the applications MS SQL database. The connection string to the database is in the web.config file.

In order to run the JQuery call to the web service the user must have at least read access directly to the database. I want to allow the application to control the access, but removing all security to the WCF service opens the application up for external access by unauthorized users.

View 3 Replies

WCF / ASMX :: Adding A New Contract To Existing Service Error - The Underlying Connection Was Closed

Feb 26, 2011

I have a WCF service which has 4 Operation contracts.

I have added a new contract and it gets the data from database and returns the result set.

I can access the new contract and the service get the correct result set. But while passing the result set to the client I get the error of The underlying connection was closed: The connection was closed unexpectedly.

What are the steps to follow after adding a new contract like new binding etc.

View 3 Replies

WCF / ASMX :: Intermittant Error: "A Connection Attempt Failed Because The Connected Party Did Not Properly?

Aug 19, 2010

I'm having a doozy of a problem, and can't find a solution. I have a WFC Web Service installed to a pair of servers, and accessed through a load balancer. I am accessing the service from an ASP.NET client app, also via WCF. The Client is not load balanced.I'm getting an intermittant error:

(Inner Most Exception) System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond x.x.x.x:80(Middle Exception) System.Net.WebException: Unable to connect to the remote server(Outer Exception) System.ServiceModel.EndpointNotFoundException: Could not connect to http://<MYSite>/<MYApp>/<MYService>.svc.TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond x.x.x.x:80.

I can reproduce this error with about 20% reliability if I execute the exact same page request on the client from 2 browsers at the same time. When the problem occurs, the successful page request returns in about 5 seconds, and the failed page request returns in about 30 seconds.I'm guessing that there is some additional latency when the load balancer decides to switch my session to another server, and that is making some timeout setting on my client to be exceeded. I need to research this performance characteristic... any thoughtsbut its not my core question.My core question is... Exactly what setting can I tweak to increase the "period of time" the "connected party" is allows to "properly respond".This is the basicHttpBinding configuration I am using on both sides of the communication:

<basicHttpBinding>
<binding name="LongerTimeout"
sendTimeout="03:00:00"
maxReceivedMessageSize="2147483647"
maxBufferPoolSize="2147483647">
<readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647"/>
</binding>
</basicHttpBinding>

I've seen some indication that setting the receiveTimeout value on the server may help, but I set this to 1 second in a test environment, and was unable to reproduce the problem, leads me to believe its not worth a production environment change to verify this.

View 3 Replies

Visual Studio :: Error Unable To Add Data Connection. ExecuteScalar Requires An Open And Available Connection. The Connection's Current State Is Closed?

Sep 13, 2010

I'm using Visual Studio 2008, and my database is SQL Server 2000.

I want to add a connection to the Server Explorer in VS. The Data source is Microsoft SQL Server (SqlClient). After entering in all my information and I click Test Connection, it is successful.

But when I click OK, I get the error:

Unable to add data connection. ExecuteScalar requires an open and available connection. The connection's current state is closed.

View 3 Replies

WCF / ASMX :: .NET Framework 4.0 Error - The Underlying Connection Was Closed: An Unexpected Error Occurred On?

Oct 22, 2010

I'm receiving the following error occasionally when calling web service using a .NET 4.0 web application."The underlying connection was closed: An unexpected error occurred on a send."All of the articles I've read regarding this issue are for the Framework 1.1.Is there any solution to this issue for using .NET framework 4.0?

View 1 Replies

WCF / ASMX :: Error - The Underlying Connection Was Closed: An Unexpected Error Occurred On A Send

Aug 23, 2010

I am consuming a third party web service wsdl using my .net aps.net page. And I am getting following error message. Cannt get to resolve it. Its working on my machine but not in my development machine. I have installed the certificate also in certificates on that machine.

Error --> The underlying connection was closed: An unexpected error occurred on a send.

View 3 Replies

Web Forms :: How To Access Connection Connection String From Sub Folder Web.config File

Mar 15, 2011

just for my testing purpose i know i can define both the connection's outside in a single web config file by different name's and access them in my front end according to it but what if i want to have seprate for both connection's web.config situation is like this see image so i want to access my connections from second web config file how i can do that.

[Code]...

i tired this but its giving error

[Code]....

View 1 Replies

Forms Data Controls :: SQL Error While Establishing Connection: 40 - Could Not Open A Connection

Jun 5, 2010

I previously used a datasource and a connection string to connect to my database on sql server and all orked fine. The connection string was saved in my web.config file and is: ....

View 1 Replies

Forms Data Controls :: ListView Connection Error - Database Schema Could Not Be Retrieved For This Connection?

Jul 23, 2010

I am using VS2008 and oracle 10g ODP.Net. The oracle database that I used in the connection is working and tested it using sql plus.The connection string when used in a GriDView works perfectly. Now when I created a new listview control with the same connection it gives an error.Database schema could not be retrieved for this connection. Please make sure connection settings are correct and the database is online

Object reference not set to an instance of an object at VSDataObjectSupport (478,6)

View 2 Replies

DataSource Controls :: Connection Pooling And Check Connection State?

Apr 7, 2010

In my DAL i have more than 100 methods/Function, each and every method am opening the sqlconnection and closing the connection, this is taking too much of time to establish the connection at every time. So what i expect is one common class will create the SqlConnection that will check if the connection is Broken or Closed then create the connection again else return the connection, how to do this(Also i would like to apply ConnectionPooling).

View 7 Replies

Web Forms :: How To Set Default Connection String Among Multiple Connection Strings

Jul 4, 2013

In my application there are 4 connection strings...from that i want one connectionstring should be default connection string.How to do ?

View 1 Replies

Visual Studio :: Error Adding Connection In Server Explorer - Unable To Add Data Connection. ExecuteScalar Require

Sep 30, 2010

I have VS 2010 professional. I am trying to open "ASP.Net Configuration" through Project -> ASP.Net Configuration.

It pops up the Notification about the ASP.Net Development Server localhost but doesn't open ASP.Net Configuration in the default browser.I clicked on the Root Url (by double clicking on the 'development server' at the right bottom from Notification Manager).

It throws following error

"An error was encountered. Please return to the previous page and try again."

Clicking on "How do i use this tool".It opened page with error.

Tool Has Timed Out

View 2 Replies

Making Ado.net Connection Class Or Connection String In Web.config?

Oct 18, 2010

I am preparing for an Access2007 db conversion at the beginning of the year and would like to know what the best process would be for connecting to the sqlserver2005 database. I have read about adding the connection string to the web.config file. I have also read about using ADO.NET and put the connection information into a class and not the web.config file.

I would like to hear from others as to what you have used, are using, or plan on using for a webapp (vs2010), and why so I can get an understanding.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved