473,388 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Timeout when using VS 2005-generated proxies to access WCF web ser

I'm just now beginning to experiment with WCF, and I've run into an odd
hiccup right at the beginning. I presume it's just something I'm doing
wrong, but I can't figure it out.

I've created a simple "Hello World" service, hosted in a console app, and if
I call that service via a ChannelFactory<generated proxy, life is good:

using (ChannelFactory<IHelloWorldhelloFactory = new
ChannelFactory<IHelloWorld>("MyClient"))
{
HelloInterface.IHelloWorld proxy = helloFactory.CreateChannel();
Console.WriteLine(proxy.SayHello());
Console.ReadLine();
}

However, if I reference the web service in VS 2005, allow it to generate the
proxies for me, and then call the method, it hangs on the method call until
it times out:

helloworld.HelloWorld hello = new helloworld.HelloWorld();
Console.WriteLine(hello.SayHello()) // Here is where it hangs.
Console.ReadLine();

I believe that I've got my config file setup correctly, since if the service
isn't running, or is listening on a different endpoint, or with a different
encoding, it throws an exception immediately, instead of timing out. Still,
just for the record, here's my server config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="HelloService.HelloWorld"
behaviorConfiguration="metadataSupport">
<endpoint address="" binding="wsHttpBinding"
contract="HelloInterface.IHelloWorld" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/helloworld" />
</baseAddresses>
</host>
</service>
</services>

<behaviors>
<serviceBehaviors>
<behavior name="metadataSupport">
<serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
</behavior>
</serviceBehaviors>
</behaviors>

</system.serviceModel>
</configuration>

And here's my client config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings"
type="System.Configuration.ApplicationSettingsGrou p, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="HelloClient.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>

<system.serviceModel>
<client>
<endpoint address="http://localhost:8080/helloworld"
binding="wsHttpBinding" contract="HelloInterface.IHelloWorld" name="MyClient"
/>
</client>
</system.serviceModel>

<applicationSettings>
<HelloClient.Properties.Settings>
<setting name="HelloClient_helloworld_HelloWorld"
serializeAs="String">
<value>http://localhost:8080/helloworld</value>
</setting>
</HelloClient.Properties.Settings>
</applicationSettings>
</configuration>

Any thoughts on what I'm running into? I'm sure it's a basic mistake, but
danged if I know what it is.

Ken

Jan 30 '07 #1
2 3907
You need to use Add Service Reference or generate the proxy with svcutil,
the standard Web Services don't interoperate with WCF by default (You need
put specific configuration).

http://msdn2.microsoft.com/en-us/library/ms735103.aspx
http://msdn2.microsoft.com/en-us/library/ms751433.aspx
http://www.microsoft.com/downloads/d...displaylang=en

"smithkl42" <sm*******@discussions.microsoft.comwrote in message
news:23**********************************@microsof t.com...
I'm just now beginning to experiment with WCF, and I've run into an odd
hiccup right at the beginning. I presume it's just something I'm doing
wrong, but I can't figure it out.

I've created a simple "Hello World" service, hosted in a console app, and
if
I call that service via a ChannelFactory<generated proxy, life is good:

using (ChannelFactory<IHelloWorldhelloFactory = new
ChannelFactory<IHelloWorld>("MyClient"))
{
HelloInterface.IHelloWorld proxy = helloFactory.CreateChannel();
Console.WriteLine(proxy.SayHello());
Console.ReadLine();
}

However, if I reference the web service in VS 2005, allow it to generate
the
proxies for me, and then call the method, it hangs on the method call
until
it times out:

helloworld.HelloWorld hello = new helloworld.HelloWorld();
Console.WriteLine(hello.SayHello()) // Here is where it hangs.
Console.ReadLine();

I believe that I've got my config file setup correctly, since if the
service
isn't running, or is listening on a different endpoint, or with a
different
encoding, it throws an exception immediately, instead of timing out.
Still,
just for the record, here's my server config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="HelloService.HelloWorld"
behaviorConfiguration="metadataSupport">
<endpoint address="" binding="wsHttpBinding"
contract="HelloInterface.IHelloWorld" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/helloworld" />
</baseAddresses>
</host>
</service>
</services>

<behaviors>
<serviceBehaviors>
<behavior name="metadataSupport">
<serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
</behavior>
</serviceBehaviors>
</behaviors>

</system.serviceModel>
</configuration>

And here's my client config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings"
type="System.Configuration.ApplicationSettingsGrou p, System,
Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="HelloClient.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false" />
</sectionGroup>
</configSections>

<system.serviceModel>
<client>
<endpoint address="http://localhost:8080/helloworld"
binding="wsHttpBinding" contract="HelloInterface.IHelloWorld"
name="MyClient"
/>
</client>
</system.serviceModel>

<applicationSettings>
<HelloClient.Properties.Settings>
<setting name="HelloClient_helloworld_HelloWorld"
serializeAs="String">
<value>http://localhost:8080/helloworld</value>
</setting>
</HelloClient.Properties.Settings>
</applicationSettings>
</configuration>

Any thoughts on what I'm running into? I'm sure it's a basic mistake, but
danged if I know what it is.

Ken
Jan 30 '07 #2
Thank you -- that fixed it. Nice to know it was just a rookie mistake.

Ken

"Mariano Omar Rodriguez" wrote:
You need to use Add Service Reference or generate the proxy with svcutil,
the standard Web Services don't interoperate with WCF by default (You need
put specific configuration).

http://msdn2.microsoft.com/en-us/library/ms735103.aspx
http://msdn2.microsoft.com/en-us/library/ms751433.aspx
http://www.microsoft.com/downloads/d...displaylang=en

"smithkl42" <sm*******@discussions.microsoft.comwrote in message
news:23**********************************@microsof t.com...
I'm just now beginning to experiment with WCF, and I've run into an odd
hiccup right at the beginning. I presume it's just something I'm doing
wrong, but I can't figure it out.

I've created a simple "Hello World" service, hosted in a console app, and
if
I call that service via a ChannelFactory<generated proxy, life is good:

using (ChannelFactory<IHelloWorldhelloFactory = new
ChannelFactory<IHelloWorld>("MyClient"))
{
HelloInterface.IHelloWorld proxy = helloFactory.CreateChannel();
Console.WriteLine(proxy.SayHello());
Console.ReadLine();
}

However, if I reference the web service in VS 2005, allow it to generate
the
proxies for me, and then call the method, it hangs on the method call
until
it times out:

helloworld.HelloWorld hello = new helloworld.HelloWorld();
Console.WriteLine(hello.SayHello()) // Here is where it hangs.
Console.ReadLine();

I believe that I've got my config file setup correctly, since if the
service
isn't running, or is listening on a different endpoint, or with a
different
encoding, it throws an exception immediately, instead of timing out.
Still,
just for the record, here's my server config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="HelloService.HelloWorld"
behaviorConfiguration="metadataSupport">
<endpoint address="" binding="wsHttpBinding"
contract="HelloInterface.IHelloWorld" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/helloworld" />
</baseAddresses>
</host>
</service>
</services>

<behaviors>
<serviceBehaviors>
<behavior name="metadataSupport">
<serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
</behavior>
</serviceBehaviors>
</behaviors>

</system.serviceModel>
</configuration>

And here's my client config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings"
type="System.Configuration.ApplicationSettingsGrou p, System,
Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="HelloClient.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false" />
</sectionGroup>
</configSections>

<system.serviceModel>
<client>
<endpoint address="http://localhost:8080/helloworld"
binding="wsHttpBinding" contract="HelloInterface.IHelloWorld"
name="MyClient"
/>
</client>
</system.serviceModel>

<applicationSettings>
<HelloClient.Properties.Settings>
<setting name="HelloClient_helloworld_HelloWorld"
serializeAs="String">
<value>http://localhost:8080/helloworld</value>
</setting>
</HelloClient.Properties.Settings>
</applicationSettings>
</configuration>

Any thoughts on what I'm running into? I'm sure it's a basic mistake, but
danged if I know what it is.

Ken
Jan 31 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Martin Dew | last post by:
Hi, I am using ASP.Net for a website, I use the following code; <authentication mode="Forms"> <forms name=".ADASTRATEAROUNDS" loginUrl="login.aspx" protection="All" timeout="30" path="/"> ...
3
by: Mike | last post by:
Timeout Calling Web Service I am calling a .NET 1.1 web service from an aspx page. The web service can take several minutes to complete its tasks before returning a message to the aspx page. ...
8
by: Komandur Kannan | last post by:
We have a smart device application running on handhelds(Symbol MC9000G). The backend is Oracle and a middle tier web services development done in Vb.net. We use pessimistic Locking due to...
4
by: pb648174 | last post by:
After executing osql from the command line via the Windows scheduled task interface, the following error is returned: "Timeout expired" The code in the sql is as follows: BACKUP Database...
22
by: pb648174 | last post by:
After executing osql from the command line via the Windows scheduled task interface, the following error is returned: "Timeout expired" The code in the sql is as follows: BACKUP Database...
4
by: sorcerdon | last post by:
Hello! I am looking for someone who has solved this multi-million people's problem. EVERYONE seems to ahve this problem. Im a creating a data set and populating it with a call to a store proc. ...
3
by: Brad | last post by:
I have been trying to do a query(view) in Enterprise Manger and Query Analyzer with a timeout result everytime. In EM in happens in about 30 seconds and in QA it happens in about 45 seconds. I...
20
by: Wes Groleau | last post by:
I was doing update statements in SQL Server 2000. I have a table with over 16 million rows. It came from several hundred delimited text files, and two of the columns are file ID (int) and Line...
2
by: Robin Becker | last post by:
While messing about with some deliberate socket timeout code I got an unexpected timeout after 20 seconds when my code was doing socket.setdefaulttimeout(120). Closer inspection revealed that...
1
by: alvinstraight38 | last post by:
I have a client who has been receiving hundreds of SQL timeout error messages in their error logs. Specifically, the message looks like this: MESSAGE :...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.