PDA

View Full Version : ASP .net Discount + Silverlight + WCF Issue


braulio
12-22-2008, 10:29 AM
Hello,

I have just deployed my application into ASP .net discount, and found that there are issues on ASP .net discount and how it handles domain names.

Found this workaround:




protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)


{


// Specify the exact URL of your web service


Uri webServiceAddress = new Uri("http://dbschemaedi.web140.discountasp.net/WsCommunicator/AuthenticationService.svc");


ServiceHost webServiceHost = new ServiceHost(serviceType, webServiceAddress);


return webServiceHost;


}



<%@ ServiceHost Language="C#" Service="System.Web.ApplicationServices.AuthenticationServi ce" Factory="MainApplicationWebProject.WSCommunicator.Authentic ationHostFactory"%>

But still not working, please, is there any solution or something that I'm missing. In case that ASP .net discount does not support this scenario, could you please point me on other hosting companies that work with WCF services?

Thanks
Braulio

braulio
12-22-2008, 11:43 AM
Just an update, I have managed to make it work using the unfriendly URL name:

http://dbschemaedi.web140.discountasp.net
But using, the friendly domain name, I got an error, check using fiddler and:

It ask for ClientAccessPolicy.XML (is like the WCF thinks that I'm making a cross domain call).


I have tried to access the service using the friendly name, but says not found.


I think the solution is not to add a Crossdomain and clientAccess policy (should be in the root of the IIS I guess).





What's the right solution?

Thanks
Braulio

Aristotle
12-23-2008, 07:38 AM
Simply change the webServiceAddress value to your site's real domain name.

Uri webServiceAddress = new Uri("http://www.yourdomain.com/WsCommunicator/AuthenticationService.svc");

Aristotle

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

braulio
12-23-2008, 08:19 AM
Tried but that didn't work :-(.


I have been trying combinations the whole day, changing URI to the domain didn't work, the only approach that worked for me was to use the long name, but only on a service that had no code behind (I'm using an application web project so no app_code), quite strange...


Any idea?





Thanks


Braulio

braulio
12-23-2008, 11:18 AM
Got it working !!

Just tweaking, I think was just a letter that was lowercase and should upper :_(