Error 400 (failed request) with a WCF tutorial?

I started using WCF last night to set up a simple client server that would allow me to send game information to the client at the start of the session.

I followed the microsoft WCF tutorial and used the VS2008 "WcfSerivce" template to start and add my methods. Then I copied and pasted the address that he gave me in the service link dialog box in my client project, and added the code to receive data from the server. However, the problem is that it always returns a 400 error when requesting data.

I looked for this error and found that many people had a problem with limiting a certain message size, but I get this error even when the method returns only one character.

The only thing I can think of is that the URI or address of the namespace is wrong, what value should they be instead? Thanks

EDIT: Here is the code that I use in the service and client, I'm not sure which rule has a huge amount of text on the columns, so I put it on Pastebin, but if it's allowed here, I will edit it again

http://pastebin.ca/1401443

+2
source share
2 answers

In case anyone else has / has this problem, this is a compatibility issue with Windows 7. I tried RTM and it works.

0
source

"" , .. URL-, .

, ? url ? , - ( IIS), .

WCF :

{ YourService}

.

, . svcutil.exe :

...

, .

0

All Articles