Search code examples
wpfchromium-embeddedcefsharp

CefSharp-WPF : Application is not rendered in other PC


I am new on CefSharp so I followed the first tutorial of CefSharp-WPF that was made me creating a new application.

However when I copied this application with folder in bin/x64/release directory to other pc, It opened the application but the page won't rendered.

Need I set something configs for launch other PC?

Here is my code snippet.

MainWindow.xaml.cs

using CefSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using NetFwTypeLib;

namespace StocktalkPC
{
    /// <summary>
    /// MainWindow.xaml에 대한 상호 작용 논리
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {

            var settings = new CefSharp.CefSettings
            {
            };
            settings.CefCommandLineArgs.Add("disable-gpu", "1");
            Cef.Initialize(settings);

            InitializeComponent();
        }
    }
}

MainWindow.xaml

<Window x:Class="StocktalkPC.MainWindow"
       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:StocktalkPC"
        xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
        mc:Ignorable="d"
        Title="MainWindow" Height="700" Width="1260">
    <Grid>
        <cefSharp:ChromiumWebBrowser Grid.Row="0"
        Address="http://pc.dev.stocktalk.kr:30802/webchat" />
    </Grid>
</Window>

Solution

  • It was address problem. I have added ti host as that domain but it is not real domain.