I have two projects in a solution: a Web Application (UI) project and a Web Service project. I can't get the UI to consume a web service if the projects are running using the built-in web server. My OnCompleted or OnError callbacks never get called. However, it works if I use IIS.
So the client ishttp://localhost:4312/default.aspx and it references the service using:
<atlas:ServiceReferencePath="http://localhost:1234/Service1.asmx"/>
If all I do is make them both IIS apps then change the reference as follows, it works a treat:
<atlas:ServiceReferencePath="/ServiceApp/Service1.asmx"/>
Is this because Cassini's use of different port numbers makes this appear as a forbidden cross-domain call?
BTW, I obviously made sure that Cassini was listening on both ports.
If the port's not the same yes you will get a crossdomain error.
But I don't think that's the only issue. Cassini listens to a specific port and sets up the ASP.NET runtime for a specific virtual directory. 1 port, 1 Virtual directory, 1 instance of Cassini.So unless youhave two separate instenaces of Cassini running the call won't work because it's effectively only servicing a single application. You'll need two instances of VS or Cassini to make this happen and I don't think you can do that either because only one instance can listen on a given port.
So, no you probably can't do that <s>... Use IIS and separate virtuals.
+++ Rick --
Yeah, thanks Rick. That's pretty much the conclusion I've come to. But I find it strange that the port is considered part of the domain. Cool blog by the way.
Stu
No comments:
Post a Comment