Skip to main content
Home Forums Silverlight Programming Programming with .NET - General WCF service reference error
7 replies. Latest Post by kbatyai on August 11, 2008.
(0)
kbatyai
Member
4 points
8 Posts
08-08-2008 6:04 AM |
Hi,
I 've started to develop a Silverlight app...
My steps:
When i press the discover button it founds the the service...(the ASP.NET development server starts...)
But...it found on a port that ALWAYS less then the real port by 2. Always 2.
So...
So What is the problem?!?What mistake do i?And why VS randomize a port?!? Thanks Kris
jeetAbhi
424 points
81 Posts
08-08-2008 6:18 AM |
Please refer to this video...it would help you......
http://silverlight.net/learn/learnvideo.aspx?video=47177
Kindly mark as answer if it helps.
08-08-2008 7:31 AM |
Thank's the link, i 've seen it. But...
I do the same, but it doesnt do the same :)
The VS randomizes the port, and if i overwrite it, it doesnt find the service, and show that error what i wrote...
My system:
-newly installed vista
-vista sp1
-vs 2008 prof edition
-vs2008 sp1 beta1
rajesh s...
Contributor
2314 points
505 Posts
08-08-2008 7:51 AM |
If it is the problem with dynamic ports then try this...NOTE: im using VSTS 2008
Go to solution explorer ==> Click (no right click) on web application which gets created by silverlight app. ==> Press F4 in the keyboard.
A Dockpanel shows up you can set there properties such as , Always use dynamic ports and set ports.
If you are using other than VSTS 2008...i just right click on the web project and Properties. and there you can set port hopefully.
08-08-2008 8:26 AM |
:)
Thanks I know what is the property page :)
The Silverlight project template creates a file-based web site, not a Web Project...so, i cant turn off auto port :)
-----
I think i will "change" the testing web site (file based) to Web Project and in that, i can set the port manually.....
08-08-2008 8:41 AM |
So... i made a test...
i created a new silverlight app in VS, then a choosed WebSiteProject (not file based...) for test.i added a silverlight enabled WCF service to the ASP.Net project and when i would like to add the service reference, i get the same error. (the port is fix and ok, because i set it manually.)
But the service reference wizard throw the same error ( the WSDL in IE works fine...)
I dont understand... VS bug? Vista bug? SP1 beta bug? or what...
08-08-2008 8:55 AM |
So... i made an another test :)
I add a WCF project to the solution and it works fine...
So if the WCF service in the ASP.Net project doesnt work, but why?!?
Maybe configuration problems?!?
i tried with and without this : <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
Any suggest?!?
08-11-2008 8:50 AM |
The solution is:
Use web project, so you can set the port manually...
and...
the Service Reference Wizard cant resolve the "localhost"...
after i commented out the "::1 localhost" IPv6 section in the hosts file it has started to work :)