none
Micrsoft Azure Relay Hybrid Connection With Asp.net Core 3.1 RRS feed

  • Question

  • I have executed this code to make my service hus hybrid connection with my app. 

    public class Program

        {
            static string address = "Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=KeyName;SharedAccessKey=KeyCode";
            public static void Main(string[] args)
            {
                try
                {
                    CreateHostBuilder(args).Build().Run();
                }
                catch (Exception ex)
                {

                }
            }
            public static IHostBuilder CreateHostBuilder(string[] args) =>
           Host.CreateDefaultBuilder(args)
               .ConfigureWebHostDefaults(webBuilder =>
               {
                  // webBuilder.UseContentRoot(Directory.GetCurrentDirectory());
                   webBuilder.UseIISIntegration();
                   webBuilder.UseStartup<Startup>()
               .UseAzureRelay(options =>
                {
                    options.UrlPrefixes.Add(address);

                });
               });
        }

     When  .UseAzureRelay(options =>
                {
                    options.UrlPrefixes.Add(address);

                });

    Code Executes It Throws Me Exception :

    Application is running inside IIS process but is not configured to use IIS server.

    Can somebody help me on this problem plz ??

       

    Wednesday, August 5, 2020 6:08 AM