Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

ASP.Net core project hosting on service fabric dos not start

asp.net core service hosting

  • Please log in to reply

#1
Mellicia

Mellicia

    New Member

  • Member
  • Pip
  • 1 posts

I've ASP.NET site hosted on asphostportal, and Now I try to host an ASP.Net core MVC RC1 DNX project on Service Fabric. The deployment works but the project is not starting. According to log it seems service fabric cannot find the startup class and create an instance. I downloaded a demo project that works fine, but I cannot bring my project up and running. I cannot see any peace of helpful log information. Not in event log, service fabric log stream or with visual studio debug prompt. Is there anything we can do to enable more debug information. What could be wrong on our configuration, or project setup? This are the Key parts of my project:

ServiceManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="WebPkg"
                 Version="1.0.0"
                 xmlns="http://schemas.microsoft.com/2011/01/fabric"
                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ServiceTypes>
    <StatelessServiceType ServiceTypeName="WebType" >
      <Extensions>
        <Extension Name="__GeneratedServiceType__">
          <GeneratedNames xmlns="http://schemas.microsoft.com/2015/03/fabact-no-schema">
            <DefaultService Name="WebTypeService" />
            <ServiceEndpoint Name="WebTypeEndpoint" />
          </GeneratedNames>
        </Extension>
      </Extensions>
    </StatelessServiceType>
  </ServiceTypes>

  <CodePackage Name="C" Version="1.0.0">
    <EntryPoint>
      <ExeHost>
        <Program>approot\runtimes\dnx-clr-win-x64.1.0.0-rc1-update2\bin\dnx.exe</Program>
        <Arguments>--appbase approot\src\Sportflash.Web Microsoft.Dnx.ApplicationHost Microsoft.ServiceFabric.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel</Arguments>
        <WorkingFolder>CodePackage</WorkingFolder>
        <ConsoleRedirection FileRetentionCount="5" FileMaxSizeInKb="2048" />
      </ExeHost>
    </EntryPoint>
  </CodePackage>

  <Resources>
    <Endpoints>
      <Endpoint Protocol="http" Name="WebTypeEndpoint" Type="Input" Port="5000" />
    </Endpoints>
  </Resources>
</ServiceManifest>


project.json:

{
  "version": "1.0.0-*",
  "compilationOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "EntityFramework": "6.1.3",
    "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
    "Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
    "Microsoft.AspNet.Authentication.Facebook": "1.0.0-rc1-final",
    "Microsoft.AspNet.Authentication.Google": "1.0.0-rc1-final",
    "Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-rc1-final",
    "Microsoft.AspNet.Authentication.Twitter": "1.0.0-rc1-final",
    "Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final",
    "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final",
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
    "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
    "Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
    "Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
    "Microsoft.ServiceFabric.AspNet.Hosting": "1.0.0-rc1",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final",
    "Sportflash.Web.Core": "1.0.0-*",
    "Microsoft.ApplicationInsights.AspNet": "1.0.0-rc1",
    "angular-signalr-hub.TypeScript.DefinitelyTyped": "0.6.7",
    "Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final",
    "Microsoft.Extensions.Globalization.CultureInfoCache": "1.0.0-rc1-final",
    "Microsoft.Extensions.Localization.Abstractions": "1.0.0-rc1-final",
    "Microsoft.AspNet.Localization": "1.0.0-rc1-final",
    "Microsoft.Extensions.Localization": "1.0.0-rc1-final",    
    "jquery.TypeScript.DefinitelyTyped": "2.8.8",
    "signalr.TypeScript.DefinitelyTyped": "0.2.0",
    "Newtonsoft.Json": "8.0.3",
    "Microsoft.CodeAnalysis": "1.1.0-rc1-20151109-01"
  },

  "userSecretsId": "aspnet5-Sportflash.Web-f067f2f7-086e-4a52-88ea-a7317d1b11e8",

  "commands": {
    "web": "Microsoft.AspNet.Server.Kestrel",
    "gen": "Microsoft.Extensions.CodeGeneration"
  },

  "frameworks": {
    "dnx451": {
      "dependencies": {
      }
    }
  },
  "exclude": [
    "wwwroot",
    "node_modules",
    "bower_components",
    "PackageRoot"
  ],
  "publishExclude": [
    "node_modules",
    "bower_components",
    "PackageRoot",    
    "**.user",
    "**.vspscc"
  ],
  "scripts": {
    "postrestore": [ "npm install", "bower install" ],
    "prepublish": [ "npm install", "bower install" ]
  }
}

Startup.cs:
 

public class Startup
{
    public static void Main(string[] args) => WebApplication.Run<Startup>(args);
}



 


  • 0

Advertisements







Similar Topics


Also tagged with one or more of these keywords: asp.net, core, service, hosting

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP