New Posts New Posts RSS Feed: Deployment issues: No endpoint listening
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Deployment issues: No endpoint listening

 Post Reply Post Reply Page  12>
Author
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Topic: Deployment issues: No endpoint listening
    Posted: 03-Aug-2012 at 7:14am
We recently switched from an xcopy style of deployment for or Silverlight application to webdeploy. This is part of our move towards Continuous Delivery. Something is wrong however and I cant seem to figure it out.

After we deploy when we send the first request to the server we get the error: "There is no endpoint listening on http://OurServer/EntityService.svc/sI that could accept calls from this application." 

I followed the steps in the error message and I found that http://OurServer/EntityService.svc is running for a little while and then it crashes. When I first deploy the app and navigate to the service it works right away but if I navigate to it later it says the resource cannot be found. Every time I navigate to http://OurServer/EntityService.svc/sI I get the error "resource cannot be found."

In the log files I dont see any error but I do see: EntityService listening on http://OurServer.OurDomain.local/entityservice.svc when I try to navigate to that url I get the resource cannot be found error. However when I look at call to the server in fiddler it looks like this: <a:To s:mustUnderstand="1">http://OurServer/EntityService.svc/sl</a:To>

I turned off IIS compression and I have tried to remove anything from the webconfig that was not essential to running the app and still I am getting the errors. I also confirmed that all of the ideablade dlls are in the bin folder. 

I am running low on ideas so maybe point me in a direction to go.

-John Bloom
Back to Top
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Posted: 03-Aug-2012 at 8:49am
Wow ok solved this one. But I still might need an answer. My global.asx was set to 

<%@ Application Codebehind="Global.asax.cs" Inherits="MyApp.Global" Language="C#" %>

and I changed it to:

<script language="C#" runat="server">

    /// <summary>
    /// Perform application start activities.  
    /// </summary>
    protected void Application_Start(Object sender, EventArgs e) {

      // To enable remote viewing of trace messages via the TraceViewer:
      // TODO:  Uncomment following line if you want to provide this feature.  
      //IdeaBlade.Core.TracePublisher.LocalInstance.MakeRemotable();        

      // If you don't want to create a .svc file for every EntityServer service, you
      // can instead register a "virtual path provider".       
      // You do not need to supply .svc files for the EntityService and EntityServer services
      // when the provider is registered.      
      System.Web.Hosting.HostingEnvironment.RegisterVirtualPathProvider(new IdeaBlade.EntityModel.Web.ServiceVirtualPathProvider());     
  
    }
</script>

Why didnt the global.asx code behind compile and run when the service was started?
-John Bloom
Back to Top
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Posted: 03-Aug-2012 at 8:52am
Also if I want to run MVC along side my silverlight how do I register routes without the asax being compiled?

Example:
routes.MapRoute(
                "Default"// Route name
                "{controller}/{action}/{id}"// URL with parameters
                new { controller = "Account", action = "LogOn", id = UrlParameter.Optional } // Parameter defaults
            );


Edited by JohnBloom - 03-Aug-2012 at 8:52am
-John Bloom
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 03-Aug-2012 at 12:53pm
Hi John,
Regarding you question about Global.asax and code behind, these links might be of some help:
 
As for alternative ways to resulter routes, try:
 
Regards,
   Silvio.

 

Back to Top
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Posted: 07-Aug-2012 at 2:23pm
Ok so adding this code to the asax page caused the devforce service to crash in production: 

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

This is boilerplate code for MVC3 and so i didnt think about it when I added it.

-John Bloom
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 08-Aug-2012 at 1:02pm
John,
 
Is it compiling and crashing, or not even compiling?
 
Any error message?
 
Silvio.
Back to Top
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Posted: 08-Aug-2012 at 1:21pm
So here is what happened. 

1) I added MVC to our project and put this code in my Global.asax:

protected void Application_Start(Object sender, EventArgs e) 
  {
    System.Web.Hosting.HostingEnvironment.RegisterVirtualPathProvider(new IdeaBlade.EntityModel.Web.ServiceVirtualPathProvider());
 
    AreaRegistration.RegisterAllAreas();
 
    RegisterGlobalFilters(GlobalFilters.Filters);
    RegisterRoutes(RouteTable.Routes);
  }
 
  public static void RegisterGlobalFilters(GlobalFilterCollection filters)
  {
      filters.Add(new HandleErrorAttribute());
  }
  
  public static void RegisterRoutes(RouteCollection routes)
  {
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

      routes.MapRoute(           "Default"// Route name           "{controller}/{action}/{id}"// URL with parameters           new { controller = "Account", action = "LogOn", id = UrlParameter.Optional } // Parameter defaults       );   }
2) When I deployed I got this error:

   "There is no endpoint listening on http://OurServer/EntityService.svc/sI that could accept calls from this application." 

3) After posting to this forum and trying random things, I discovered that the asax was set to compile:

   <%@ Application Codebehind="Global.asax.cs" Inherits="OurApp.Global" Language="C#" %>

4) When I looked at Devforce samples they were using this code:

   <script language="C#" runat="server">
   ...
   IdeaBlade.EntityModel.Web.ServiceVirtualPathProvider());     
   ...  
   </script>

5) Changing my asax to be script based and removing the MVC specific code made it so when I deployed my EntityServer worked again. Except now my MVC didnt work because I removed the registering of routes.

6) I added the MVC back to the Global.asax page and I started getting the same error.
   
   "There is no endpoint listening on http://OurServer/EntityService.svc/sI that could accept calls from this application." 

7) I removed the lines one by one to see what was breaking and I settled on one line that was causing the no endpoint error. That line was:

   routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
8) I am just getting to know MVC but when I comment out that line both my MVC and my entity server work.
I am not sure what the line does but I have isolated it as the problem.



Edited by JohnBloom - 08-Aug-2012 at 1:22pm
-John Bloom
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 13-Aug-2012 at 3:14pm
Hi John,
 
I was able to deploy a simple MVC/SL app here.
The problem I came across was the following:
 
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information
 
which was solved by setting Copy Local to True for all IdeaBlade assemblies.
I also same across some reflection problems where the assemblies' versions on my deployment server were not the same as in my development station. For that I had to be sure all assembly versions matched. (the error messages shown in the browser were very helpful there)
 
As for configuration, I took the steps you described. The only difference would be that in global.asax I used:
 
<%@ Application Codebehind="Global.asax.cs" Inherits="IdeaBladeMVC.MvcApplication" Language="C#" runat="server" %>
 
I think you used <script language="C#" runat="server"> instead.
 
I am attaching the solution so you could check any other discrepancy with your configurations. uploads/892/IdeaBladeMVC.zip
 
You can also check the deployment at:
 
Regards,
   Silvio.
 
Back to Top
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Posted: 17-Aug-2012 at 10:55am
Your app gives me this error during runtime on my dev machine:

Unable to locate type: IdeaBlade.EntityModel.EntityServerException, IdeaBlade.EntityModel, Version=6.1.8.1, Culture=neutral, PublicKeyToken=287b5094865421c0. Check that the assembly holding this type is available in the XAP. Also check that both your assemblies and DevForce assemblies have the expected version number on both client and server.

Also when I deploy your app to IIS I am getting the same error as my project: "No endpoint listening."  

What version of IIS are you using? 
Is it 64bit? 

Sometimes when funky errors are happening it is a bit issue. 

Perhaps it is a problem in my IIS settings?

I tried stripping down my web.config file but nothing helped. 

John
-John Bloom
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 17-Aug-2012 at 12:46pm
Hi John,
 
I am using DevForce 6.1.8.1.
We will update our portal shortly with this latest version.
 
I am using IIS 7.5 running on Win7 64bit.
 
As for IIs settings, I don't see anything outstanding. Just be sure the appPool being used targets .NET 4.
 
Silvio.


Edited by sbelini - 17-Aug-2012 at 12:50pm
Back to Top
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Posted: 17-Aug-2012 at 1:47pm
Thanks, 
I feel like I am beating my head against a wall. I did get it to work on IIS that was installed on windows 7 but it doesnt work on two separate Windows Server 2008 R2 machines running IIS. Both on my windows 7 machine and on the Windows Server machines the IIS version is 7.5.7600.16385. It does appear to be an IIS problem. See if you guys can get the sample app to work on a Windows Server machine.

John
-John Bloom
Back to Top
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Posted: 17-Aug-2012 at 1:55pm
I have MVC 3 installed on both servers. Am I missing something else that needs to be installed?
-John Bloom
Back to Top
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Posted: 17-Aug-2012 at 2:38pm
Ok I got it. On Windows Server 2008 you have to add the Web Server (IIS) Support role. IIS was working and running my Silverlight app without it but when I tried to combine it with the MVC it stopped working. 

I also enabled Named Pipe Activation role. Not sure if that helped but if I get this problem again I am coming back to this thread and I want to make sure I didnt leave anything out.

Note to all. IIS on Windows Server 2008 R2 and the one on your Window 7 box are not necessarily the same. It is nice to end the week having solved this. 
-John Bloom
Back to Top
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Posted: 21-Aug-2012 at 1:36pm
I thought that I had it solved but I am still one step away. 

I had turned on allowAnonymousLogin and so the user that was logging in was guest. Once I turned off allowAnonymousLogin the silverlight would not pick up the user that was logged in through an HTML login page. I was passing null credentials and getting a null user back. So I set  aspNetCompatibilityEnabled to true and it worked fine in DEV but I started getting the endpoint not listening error in deployment. 

So I am at a wall. If I turn aspNetCompatibilityEnabled to true I cant login. 

If I set aspNetCompatibilityEnabled to false I cant pick up the user that is logged in by passing null credentials from silverlight.

I am sending you the sample program back with a login screen written in HTML and some other tweaks. Deploy the app and change aspNetCompatibilityEnabled to see the problem. 

I might be chasing the wrong thing so if you can get it to login and work, thats all I want.
-John Bloom
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 23-Aug-2012 at 12:12pm
John,
 
I've checked with our IT person and he mentioned that, since it apparently worked previously while deploying using xcopy (vs. webdeploy), you should do a compare of the files from both deployments and especially check the contents of web.config, global.asax, and any other config files since you can have web deploy use different config files for development (debug) than for publishing (release).
 
He also noted that if the domain URL doesn’t resolve to a valid IP address for the client, then the client will not reach the endpoint. (i.e your URL is ending in .local)
 
I'll check the updated sample you sent me and will see if I encounter any other problem.
 
Silvio.
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 23-Aug-2012 at 3:16pm
Hi John,
 
I was able to deploy the updated solution without any problems. All I had to do was to update the .xap path and connectionStrings.
 
 
user: manager
pass: manager! 
 
Note that I'm deploying using xcopy. As suggested in the previous post, try comparing the files from both deployments if the issue is only on webdeploy.
 
Regards,
   Silvio.
 
 


Edited by sbelini - 23-Aug-2012 at 3:17pm
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down