Skip to main content

Microsoft Silverlight

Answered Question WCF Issues...RSS Feed

(1)

muxdaddy
muxdaddy

Member

Member

30 points

20 Posts

WCF Issues...

Ok, this is a bit frustrating.  I've uninstalled everything from the beta 1, installed everything from Beta 2.  Everything's good.  Up until I try to add a WCF SErvice OR a Silverlight-enabled one.  Here's the steps...

 Create a new silverlight app..

Choose to have it create a website for me.

Add a Silverlight enabled WCF service (it creates Service.svc, then throws a Object reference not set to an instance of an object)

Add service reference to Silverlight app.

Put in web address of this new service, hit Go.

It pops up the DoWork(), so it found it.

Hit Ok, it gives the same error again.

This time, hit Advanced and... Unable to find service "DynamicTypeService".  Ensure that the application is installed correctly.

 

Any ideas?

 

mikek@
mikek@

Member

Member

4 points

7 Posts

Re: WCF Issues...

You're not alone with that error :) I'm experiencing the same problem when trying to add a service reference. "Object reference .." when pressing ok in the add service reference dialog, and also the mentioned error pressing the advanced button.

 Furthermore Visual Studio complains when closing saying it encountered an error and then restarts.

So one more person listening for good ideas.

muxdaddy
muxdaddy

Member

Member

30 points

20 Posts

Re: WCF Issues...

 I didnt want to mention that error, as i can put up with it, if someone can just let me know what hte wcf issue is.  i've got a launch to hit and now all my services don't work :(



kinda funny, but we were waitin on a go-live license for a while and now that we have it our code won't work.  :) 

jamlew
jamlew

Contributor

Contributor

2830 points

432 Posts

Microsoft

Re: WCF Issues...

 Did you build between creating the service and adding the reference to it?

---------
If this post has solved your problem, please select 'Mark as answer'

- Jimmy Lewis
Microsoft SDET
Visual Web Developer Team

Muxdaddy
Muxdaddy

Member

Member

30 points

20 Posts

Re: WCF Issues...

Yes, everything builds properly.  It still blows up. 

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: WCF Issues...

Yes, I'm having exact the same issue. Can not add Web Service reference to my silverlight project. The discover button does not bring anything to the list, If  I type the service URL and hit go, the service would be shown in the list. But when I click OK to add it, it error out with "Object reference not set to an instance of an object" message.

I'm wondering if it has something to do with the operating system because not every body has this problem. I'm on WindowsXP Service Pack 2. Anybody else want share this information? It must be something in common among us who's having this issue.


 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

mikek@
mikek@

Member

Member

4 points

7 Posts

Re: WCF Issues...

Vista Business SP1, so that is not a common ground (VS2008 Team Suite, ADO Entity Framework B3, Silverlight unit test dlls)

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: WCF Issues...

Ok, so it's not operating system. What else could it be then?

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

geekpunk
geekpunk

Member

Member

194 points

40 Posts

Re: WCF Issues...

same problem here

Michael Wolf
Tech Lead | Cynergy Systems
http://www.cynergysystems.com

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: WCF Issues...

By the way, I also found everytime when I try to close the VS, VS crashes. Then it trying to send an error report and re-opens. Has anybody seen the same problem? I'm not sure it's related or not.

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

geekpunk
geekpunk

Member

Member

194 points

40 Posts

Re: Re: WCF Issues...

yes same problems.

 

1) add reference, you get an object not set to instance of an object

2) update or advanced when adding you get an error stating "unable to find dynamictypeservice, ensure the application is installed correctly"

3) on close it crashes and restarts.

 

I have tried this w/ new projects and projects im porting to beta 2 all with the same results

Michael Wolf
Tech Lead | Cynergy Systems
http://www.cynergysystems.com

geekpunk
geekpunk

Member

Member

194 points

40 Posts

Re: Re: Re: WCF Issues...

I have also tried a repair from the installer and same behavioir

Michael Wolf
Tech Lead | Cynergy Systems
http://www.cynergysystems.com

gabouy
gabouy

Member

Member

219 points

45 Posts

Re: Re: Re: WCF Issues...

same problems here, W2k3 and VS2008 without SP, I feel like going back to beta 1

If anyone comes with a fix or workaround please let us know 

(please mark as answer if this post answered your question)

Gabriel

vitya
vitya

Member

Member

111 points

75 Posts

Re: WCF Issues...

sladapter:
By the way, I also found everytime when I try to close the VS, VS crashes. Then it trying to send an error report and re-opens. Has anybody seen the same problem? I'm not sure it's related or not.

Exactly the same here...

 One more thing: I also noticed te following warning in the Erros/Warnings/Messages window:

In the Errors window I get the following WARNING: The custom tool 'WCF Proxy Generator' failed while processing the file 'Service References\[MyServiceName]\Reference.svcmap'

My environment:

  • Vista Ultimate 64bit with SP1
  • VS 2008 Professional
  • All windows updates applied
  • All beta1 bits removed with Control Panel
  • All beta 2 bits installed from the Getting started page successfully

As a test I installed VS on a test box, and there everything works perfectly. The test environment:

  • Windows XP Pro (not activated)
  • Only those Windows updates installed, that come without activation
  • Visual Studio Professional Trial version
  • SL beta1 was NEVER installed here
  • All beta 2 bits installed from the Getting started page successfully

Maybe, if more peoplpe (with AND withouth these problems) post their environmet, we can figure it out..

vitya

Deepak Verma
Deepak V...

Member

Member

54 points

13 Posts

Microsoft

Re: Re: WCF Issues...

Are you using "{Binding Path=variablename}" try "{Binding variablename}"

Please remember to mark the replies as answers if they answered your question

muxdaddy
muxdaddy

Member

Member

30 points

20 Posts

Re: Re: WCF Issues...

Exactly where would i use that? 

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: Re: WCF Issues...

Deepak Verma:

Are you using "{Binding Path=variablename}" try "{Binding variablename}"

 

What do you mean? Where do we set the binding?

Please! This is really a show stopper for us. Anybody from Microsoft knows what is going on?

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

Deepak Verma
Deepak V...

Member

Member

54 points

13 Posts

Microsoft

Re: Re: WCF Issues...

WCF does not give any errors on my installation, can you upload sample of your code somewhere and I can check for you.

Please remember to mark the replies as answers if they answered your question

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: Re: WCF Issues...

I don't think it's the code problem. SteveWong does not have this problem, and he sent his project to me (just very simple one, create a new Silverlight project with a Web project, add one WCF in the web service without any code change. try to add the Service Reference in the Silverlight project). But I had the same problem on his project. We even compared all the Silverlight and VS 2008 related installations on both machines, same version on everything.

The only difference we saw is the size on Silverlight Tools beta 2 for VS2008. He got 1.18 MB and mine is 1.14 MB. I don't know where the 0.04 MB difference come from since we downloaded from the same link. And I don't even know if that difference means anything.

Anybody wants to check the size of the Silverlight Tools beta 2 for VS2008 (under the Add Remove Programs window) and report back?

 

 

 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

muxdaddy
muxdaddy

Member

Member

30 points

20 Posts

Re: Re: WCF Issues...

Yep, mine is 1.14 as well.  I'd agree, it's not a code problem, it's an install problem.

Like when i started the thread above, new project, add wcf service, blows up when you look for it from silverlight. 

Psychlist1972
Psychlis...

Contributor

Contributor

6040 points

973 Posts

MicrosoftModerator

Re: WCF Issues...

For grins, I just tried this on my machine and it worked fine; no crashes.

  • Vista Ultimate 32 bit
  • .NET 3.5 SP1 Beta

Pete

Silverlight.net Moderator
MVP: Silverlight, Silverlight Insider
Author: Silverlight in Action, 2nd Edition
POKE 53280,0 - My Blog

Opinions are my own. Oh, and I don't work for Microsoft.

muxdaddy
muxdaddy

Member

Member

30 points

20 Posts

Re: WCF Issues...

Psychlist1972:

For grins, I just tried this on my machine and it worked fine; no crashes.

  • Vista Ultimate 32 bit
  • .NET 3.5 SP1 Beta

Pete

 

 

How large is your silverlight tools install (from add/remove programs)? 

geekpunk
geekpunk

Member

Member

194 points

40 Posts

Re: Re: WCF Issues...

this is a configuration issue.  I have the problem as well and my size is 1.14

Michael Wolf
Tech Lead | Cynergy Systems
http://www.cynergysystems.com

phuguet
phuguet

Member

Member

21 points

13 Posts

Re: WCF Issues...

I am having the same problem with a web service that worked prefectly with the Beta1 of silverlight 2.

I rebuilt my application Added a service Reference, As I clicked OK it said "Object reference not set to an instance of an object"

and if I click on the advanced properties of the service reference dialog it says : "Unable to find 'DynamicTypeService'. Ensure that the application is installed corectly"

 Is the there a workaround using ServiceUtil ?

phuguet
phuguet

Member

Member

21 points

13 Posts

Re: WCF Issues...

My version of Silverlight tools uses 1.14MB (Vista Ultimate 32 bit)

And Visual Studio Crashes as well when closing it.

Psychlist1972
Psychlis...

Contributor

Contributor

6040 points

973 Posts

MicrosoftModerator

Re: WCF Issues...

Muxdaddy:

Psychlist1972:

For grins, I just tried this on my machine and it worked fine; no crashes.

  • Vista Ultimate 32 bit
  • .NET 3.5 SP1 Beta

Pete

 

 

How large is your silverlight tools install (from add/remove programs)? 

1.17 MB

Pete

Silverlight.net Moderator
MVP: Silverlight, Silverlight Insider
Author: Silverlight in Action, 2nd Edition
POKE 53280,0 - My Blog

Opinions are my own. Oh, and I don't work for Microsoft.

Muxdaddy
Muxdaddy

Member

Member

30 points

20 Posts

Re: WCF Issues...

So, everyone who's install so far is 1.17 works perfect.  Everyone who has a 1.14 install doesn't work.

Question is, what causes the difference in sizes? 

geekpunk
geekpunk

Member

Member

194 points

40 Posts

Answered Question

Re: Re: WCF Issues...

I have found a resolution.  Here is what I had to do

 1)I ensured that every silverlight related application was uninstalled, this included a previous december copy of blend as well as deepzom composer.

 2) I removed the following dll C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Microsoft.VisualStudio.ServicesProxy.dll

now am up and updating properly.  My guess is that most of this points to the dll.  Hope this helps others.

Michael Wolf
Tech Lead | Cynergy Systems
http://www.cynergysystems.com

SteveWong
SteveWong

Contributor

Contributor

6343 points

1,281 Posts

Re: Re: Re: WCF Issues...

But I have this Microsoft.VisualStudio.ServicesProxy.dll

also can make the WCF Service works for me..

So I think it doesnt matter to have this dll

Regards,
SteveWong (HongKong)
Please mark post as answer if they help you

Client App Dev

geekpunk
geekpunk

Member

Member

194 points

40 Posts

Re: Re: Re: Re: WCF Issues...

I think what is happening , is that if the installer see's this file , it leaves it in place, but it is incompatable w/ the rest of the changes.

Again this worked for me

Michael Wolf
Tech Lead | Cynergy Systems
http://www.cynergysystems.com

sunraybrett
sunraybrett

Member

Member

2 points

1 Posts

Re: WCF Issues...

I am running Vista Sp1 32bit and have just installed chainer for silverlight Beta 2. I can get the webservice to create the proxy and reference its methods but when I run my previously working projects they produce the error below. These were working fine in Beta 1 but now produce this error. I decided to test a new project. So I created a new silverlight with web application project, added a wcf service and hooked up a button to fire the wcf service. I changed the binding to basic and used the template created. The same error occured. Help, it is no good having a go-live licence when we can not access our data stores.

System.ServiceModel.ProtocolException was unhandled by user code
  Message="The remote server returned an unexpected response: (404) Not Found."
  StackTrace:
       at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
       at SilverlightTest.ServiceReference1.Service1Client.Service1ClientChannel.EndGetData(IAsyncResult result)
       at SilverlightTest.ServiceReference1.Service1Client.SilverlightTest.ServiceReference1.IService1.EndGetData(IAsyncResult result)
       at SilverlightTest.ServiceReference1.Service1Client.OnEndGetData(IAsyncResult result)
       at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
  InnerException:

martintr
martintr

Member

Member

42 points

33 Posts

Re: WCF Issues...

hi everyone

I have got the WebService references working just fine but now I am getting a IsReference=True problem when

using Entity Framework entities in the WebService.

Any one found this issue or am I in the wrong spot?

Thanks

Martintr

phuguet
phuguet

Member

Member

21 points

13 Posts

Re: Re: WCF Issues...

geekpunk:

I have found a resolution.  Here is what I had to do

 1)I ensured that every silverlight related application was uninstalled, this included a previous december copy of blend as well as deepzom composer.

 2) I removed the following dll C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Microsoft.VisualStudio.ServicesProxy.dll

now am up and updating properly.  My guess is that most of this points to the dll.  Hope this helps others.

Excellent!! that worked! Thank YOU!

timanderson
timanderson

Member

Member

67 points

34 Posts

Re: WCF Issues...

Mine is fixed too, thanks mostly to this thread.

See here for what worked for me. That was after all the struggles with KB949325. Overall - not too smooth.

Tim

snelldl
snelldl

Member

Member

148 points

141 Posts

Re: WCF Issues...

fixed mine too! Thanks!

muxdaddy
muxdaddy

Member

Member

30 points

20 Posts

Re: WCF Issues...

weird thing.  I blew my machine out, reinstalled everything and it worked perfectly.  

Thanks for everyone's help in getting my problem solved.  :) 

KevD
KevD

Member

Member

181 points

38 Posts

Re: WCF Issues...

sunraybrett:

I am running Vista Sp1 32bit and have just installed chainer for silverlight Beta 2. I can get the webservice to create the proxy and reference its methods but when I run my previously working projects they produce the error below. These were working fine in Beta 1 but now produce this error. I decided to test a new project. So I created a new silverlight with web application project, added a wcf service and hooked up a button to fire the wcf service. I changed the binding to basic and used the template created. The same error occured. Help, it is no good having a go-live licence when we can not access our data stores.

System.ServiceModel.ProtocolException was unhandled by user code
  Message="The remote server returned an unexpected response: (404) Not Found."
  StackTrace:
       at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
       at SilverlightTest.ServiceReference1.Service1Client.Service1ClientChannel.EndGetData(IAsyncResult result)
       at SilverlightTest.ServiceReference1.Service1Client.SilverlightTest.ServiceReference1.IService1.EndGetData(IAsyncResult result)
       at SilverlightTest.ServiceReference1.Service1Client.OnEndGetData(IAsyncResult result)
       at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
  InnerException:

 

I have the exact same problem.  Tried this on a beta 1 install: works flawlessly.  Tried it on a beta 2 install (on a fresh VPC, so no clutter from previous installations): doesn't work at all. 

First I thought I just forgot the crossdomain.xml (services hosted on another address than the client accessing them), but that's not the case.  I've looked into the bindings, everything seems ok.

What are we missing here?  And mainly: why doesn't this work out of the box - looks quite straightforward to me?  At the moment I'm stuck in a situation where I can't access any of my services - so any help would be appreciated :-)

timanderson
timanderson

Member

Member

67 points

34 Posts

Re: WCF Issues...

Check the port number. When you debug ASP.NET in Visual Studio, the built-in web server starts up on a port number that is assigned to the project somehow. I noticed that when I added several web services to an ASP.NET project, the port assignment got messed up, so that some web services were on one port, and others on another. Only one instance of the web server starts up, so attempting to access the web services that were assigned the "wrong" port resulted in a 404.

I've not checked further, but presumably there is some way to fix this up, if it is the problem. It wouldn't occur in deployment because you would use a real web server with the port of your choice (default 80).

Tim

muxdaddy
muxdaddy

Member

Member

30 points

20 Posts

Re: WCF Issues...

I ran into this problem a few times today too, as well as another weird error where it couldn't load "asp_web_<random characters'.

what i had to do was to right click on the .svc and view in browser.  if it didn't come up correctly, i had to rebuild my solution.  click on the .svc, view in browser.  if it didn't come up, rebuild.  sometimes it would work, sometimes it wouldn't.  Seemed pretty random to me, but it worked more than not.  sometimes i had to rebuild it 5 or 6 times, but it always eventually started to work again.  once i got the .svc to come up in the browser, the silverlight call would work again. 

KevD
KevD

Member

Member

181 points

38 Posts

Re: WCF Issues...

@ Tim: I've looked into that, I use fixed port numbers for the development web servers VS automatically starts, so that shouldn't be the problem - just to make sure, I re-checked the port numbers, but they seem fine.

@ MuxDaddy: the service builds and shows without any problems - I can surf to it, I can ask for the wsdl, ...  I just can 't seem to call it from my SL-app...

So I'm afraid this didn't solve the problem.. :s

timanderson
timanderson

Member

Member

67 points

34 Posts

Re: Re: WCF Issues...

@KevD

Any clues in ServiceReferences.ClientConfig?

Tim

KevD
KevD

Member

Member

181 points

38 Posts

Re: Re: WCF Issues...

timanderson:

@KevD

Any clues in ServiceReferences.ClientConfig?

Tim

 

Hello Tim.  Nothing out of the ordinary; it looks pretty standard, containing the address (which is correct), the bindingconfig, bindingtype, contract and name.  All look correct to me:

 

<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_Service1" maxBufferSize="65536"
                    maxReceivedMessageSize="65536">
                    <security mode="None" />
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:1085/Service1.svc" binding="basicHttpBinding"
                bindingConfiguration="BasicHttpBinding_Service1" contract="SilverlightApplication1.ServiceReference1.Service1"
                name="BasicHttpBinding_Service1" />
        </client>
    </system.serviceModel>
</configuration>

 

I'm out of clues here.  I re-created the complete same simple sample project with beta1, and it works in beta1.  But with beta2, I keep on getting the "404"-error.

timanderson
timanderson

Member

Member

67 points

34 Posts

Re: Re: Re: WCF Issues...

I guess you could use Fiddler to inspect the traffic:

 http://www.fiddlertool.com/fiddler/version.asp

 Tim

Rui-Marinho
Rui-Marinho

Member

Member

146 points

89 Posts

Re: Re: Re: WCF Issues...

does anyone found the solution for the add service reference error?

i see lots of posts, but no one from microsoft can help us with this??? come on.. it's really frustrating..

 please help me

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: Re: Re: WCF Issues...

Rui-Marinho,

The post that marked as answer on this thread should be the solution if you are having the same install issue as most us had.

First check your Silverlight Tools for VS 2008 install size on Add/Remove Programs window.  If it is 1.14 MB, then you need to do the following:

 1) Uninstall your Silverlight Tools for VS 2008,

 2) Remove (delete) the following dll C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Microsoft.VisualStudio.ServicesProxy.dll

 3) Re-Install Silverlight Tools for VS 2008.

If your tool's install size is already 1.18 MB, then your problem is not install problem. Should be something different.

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

timanderson
timanderson

Member

Member

67 points

34 Posts

Re: Re: WCF Issues...

@KevD

I've just read that a message size limitation can raise a 404 error:

http://silverlight.net/forums/t/17932.aspx

Relevant?

Tim 

 

Rui-Marinho
Rui-Marinho

Member

Member

146 points

89 Posts

Re: Re: WCF Issues...

thanks slap adapter it works fine...

 but is very strange to have to do this in a go live license..

 

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: Re: WCF Issues...

 So what was your problem?

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

Rui-Marinho
Rui-Marinho

Member

Member

146 points

89 Posts

Re: Re: WCF Issues...

i had the 1.14, i follow this instructions and moved that dll out of the way and it works..

 

still i m having a error... does this work in beta 2.0?

 i have a service this service working on beta 1.0 like this, but it gives me this erros in beta 2.0

"ConfigUnrecognizedElement" 

DataServiceProxy.DataServiceSoapClient dataSoapClient = new iffiretv_beta2.DataServiceProxy.DataServiceSoapClient();

dataSoapClient.GridCompleted += new EventHandler<iffiretv_beta2.DataServiceProxy.GridCompletedEventArgs>(dataSoapClient_GridCompleted);

dataSoapClient.GridAsync(op);

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: Re: WCF Issues...

What kind of error do you get? Compiling or Run-time? If it worked in beta 1, could be cross-domain issue again. The clientaccesspolicy.xml need to be updated for beta 2. Check other post about this.

 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

Rui-Marinho
Rui-Marinho

Member

Member

146 points

89 Posts

Re: Re: WCF Issues...

the error is on run-time, i updated the crossdomain.xml with

 

<?xml version="1.0" encoding="utf-8"?>

<access-policy>

<cross-domain-access>

<policy>

<allow-from http-request-headers="*">

<domain uri="*"/>

</allow-from>

<grant-to>

<resource path="/" include-subpaths="true"/>

</grant-to>

</policy>

</cross-domain-access>

</access-policy>

 

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: Re: WCF Issues...

Take a look at this thread, you might find something. There are a lot of WCF related problems in beta 2. Not a single solution can fix them all. You have to find one for yourself. By the way, you said your service call had no problem in SL 1. Have you tried it in SL2 beta 1? Or you meant it worked fine in beta 1?

 http://silverlight.net/forums/t/17733.aspx

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: Re: WCF Issues...

 Rui-Marinho,

I looked at your error message again. You might want to check your ServiceRefrence.ClientConfig file to see anything strange there, can you see any invalid Tag in that file? That file is used by ServiceClient in beta 2. In beta1, this file is not used.

You can try to delete your ServiceReference first, make sure the ClientConfig file is empty. Then re-add the ServiceReference back and try it.

 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

kobyb
kobyb

Member

Member

2 points

4 Posts

Re: Re: WCF Issues...

Hi,

 I get the same problem as @sunraybrett and @KevD - The remote server returned an unexpected response: (404) Not Found

Here is a print screen of the HTTP log:
 

Any ideas?

Thanks,
Koby

Rui-Marinho
Rui-Marinho

Member

Member

146 points

89 Posts

Re: Re: WCF Issues...

i clear the config and re-add the service, but i still have the same error:

here goes my clientconfig

<configuration>

<system.serviceModel>

<bindings>

<basicHttpBinding>

<binding name="DataServiceSoap" maxBufferSize="655366666" maxReceivedMessageSize="6553666666">

<security mode="None" />

</binding>

</basicHttpBinding>

<customBinding>

<binding name="DataServiceSoap12">

<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"

messageVersion="Soap12" writeEncoding="utf-8">

<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"

maxBytesPerRead="4096" maxNameTableCharCount="16384" />

</textMessageEncoding>

<httpTransport manualAddressing="false" maxBufferPoolSize="524288"

maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"

bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"

keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"

realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"

useDefaultWebProxy="true" />

</binding>

</customBinding>

</bindings>

<client>

<endpoint address="http://iffiretv.ifthensoftware.com/DataService.asmx"

binding="basicHttpBinding" bindingConfiguration="DataServiceSoap"

contract="iffiretv_beta2.DataServiceProxy.DataServiceSoap"

name="DataServiceSoap" />

</client>

</system.serviceModel>

</configuration>

Rui-Marinho
Rui-Marinho

Member

Member

146 points

89 Posts

Re: Re: WCF Issues...

slapadapter it works weel on silverlight 2 beta 1, but not in beta 2, could it be the instalation file?  

i clear the config and re-add the service, but i still have the same error:

 

here goes my clientconfig

<configuration>

<system.serviceModel>

<bindings>

<basicHttpBinding>

<binding name="DataServiceSoap" maxBufferSize="655366666" maxReceivedMessageSize="6553666666">

<security mode="None" />

</binding>

</basicHttpBinding>

<customBinding>

<binding name="DataServiceSoap12">

<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"

messageVersion="Soap12" writeEncoding="utf-8">

<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"

maxBytesPerRead="4096" maxNameTableCharCount="16384" /> </textMessageEncoding>

<httpTransport manualAddressing="false" maxBufferPoolSize="524288"

maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"

bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"

keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"

realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"

useDefaultWebProxy="true" />

</binding>

</customBinding>

</bindings>

<client>

<endpoint address="http://iffiretv.ifthensoftware.com/DataService.asmx"

binding="basicHttpBinding" bindingConfiguration="DataServiceSoap"

contract="iffiretv_beta2.DataServiceProxy.DataServiceSoap"

name="DataServiceSoap" />

</client>

</system.serviceModel>

</configuration>

martintr
martintr

Member

Member

42 points

33 Posts

Re: Re: WCF Issues...

 

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: Re: WCF Issues...

 Rui-Marinho,

How did you create the customBinding ?  I put that section in my .ClientConfig file I can see <customBinding> Tag is invalid. I think that is your problem. I did not even see where you use that binding. You are using DataServiceSoap which is the basicHttpBinding. I think current Silverlight still just support basicHttpBinding. Try to remove that customBinding and try it.

 

 

 

 

 

 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

Rui-Marinho
Rui-Marinho

Member

Member

146 points

89 Posts

Re: Re: WCF Issues...

its working, i deleted the custombinding and it works, but evry time i do update service the clientconfig adds that custombinding, so its from my webservice right? because it is asmx????

 thanks once again slapadapter :)

sladapter
sladapter

All-Star

All-Star

17429 points

3,172 Posts

Re: Re: WCF Issues...

I don't know why VS added some invalid tag in the clientconfig. You might want to report that as a bug in bug forum and see if they have some explanation.

The work around would be not relying on the clientconfig file. Just set the address and binding in the code, just like we did in beta 1. Otherwise you have to keep modifying your clientconfig all the time until they fix that bug.

System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding();
        //If you want to specify non default message size, you can do it  
        binding.MaxReceivedMessageSize = 2147483647; // int's max size , (those two lines are optional, depending your need.)
        binding.MaxBufferSize = 2147483647; // int's max size

        System.ServiceModel.EndpointAddress address = new System.ServiceModel.EndpointAddress(new Uri(Application.Current.Host.Source, "../YourService.svc"));

var  webService = new YourService.YourSeviceClient();  // this is the default constructor,  it will read binding and address from the config file, do not use this one

var webService = new YourService.YourSeviceClient(binding, address); 

So it will bypass the clientconfig reading.

 

 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

KevD
KevD

Member

Member

181 points

38 Posts

Re: Re: WCF Issues...

Just thought I'd give a quick update: my problem is solved!

I was using a (correct) crossdomain.xml-file.  I changed this to clientaccesspolicy.xml and pasted the correct xml into it:

 

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">
        <domain uri="*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

 

... and all of a sudden, my WCF-calls work again!  Don't know why the crossdomain.xml-file isn't supported anymore, but: problem solved! 

Tnx for the help guys!

RodKestler
RodKestler

Member

Member

30 points

10 Posts

Re: Re: Re: WCF Issues...

Also, to supplant sladapter's information, here are the size and version stamps for each version of Microsoft.VisualStudio.ServicesProxy.dll:

The incorrect version is:

Version: 9.0.21116.54

Size: 56.0 KB

The correct version (after removing and reinstalling Silverlight 2 Beta 2 Toolkit for Visual Studio 2008) is:

Version: 9.0.21022.108

Size: 36.0 KB

-Rod Kestler
CTO, Hatch Innovations, LLC

german00
german00

Member

Member

2 points

1 Posts

Re: Re: Re: WCF Issues...

Excelent Work 

Excelente, Funciona !!!!!

tom.winans
tom.winans

Member

Member

2 points

4 Posts

Re: Re: WCF Issues...

I see this on Win 2K8 ...

Psychlist1972
Psychlis...

Contributor

Contributor

6040 points

973 Posts

MicrosoftModerator

Re: Re: WCF Issues...

Tom, can you provide a little more information about the problem you're encountering?

Pete

Silverlight.net Moderator
MVP: Silverlight, Silverlight Insider
Author: Silverlight in Action, 2nd Edition
POKE 53280,0 - My Blog

Opinions are my own. Oh, and I don't work for Microsoft.

umarkashmiri
umarkash...

Member

Member

44 points

14 Posts

Re: Re: WCF Issues...

I think, you should use the WCF service instead of WCF-silverlight enable one.It is more easy to understand.Like RPC work in Java platform.
It will make one interface for function prototyping and one class for implementation of those functions.
Thanks



Please mark it as answer if this reply helps you


SE,CTO 24/7,Lahore,Pakistan
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities