SharePoint Online : yo #microsoft/sharepoint issue for BaseDialog API - sharepoint

I developed sharepoint spfx extension for sharepoint online and created project through yeoman generator. From 2 years BaseDialog was showing properly and now sudden change from backend BaseDialog is showing abnormal behavior. It is working fine while opening the BaseDialog for the first time and disappearing for the second time. Due to this I am losing business with my client and trust in Microsoft cloud products. Both case screenshot
Below the environment details. 
+-- Node 16.14
+-- #microsoft/generator-sharepoint#1.16.1
+-- generator-office#1.9.2
+-- gulp-cli#2.3.0
+-- yo#4.3.1   
var dialog_1 = new CustomDialog();
dialog_1.show().then(function () {
});
import { BaseDialog } from '#microsoft/sp-dialog';
export default class CustomDialog extends BaseDialog{
public render(): void {
this.domElement.innerHTML=<h1> Hello World </h1>;
}
}

Related

Not able to load icons in a client side component

I have started a new NextJs app (with the beta app feature) and it doesn't seem to be able to load icons when in a client side component.
It is throwing errors like Could not find icon { prefix: 'far', iconName: 'home' }
I am using the #fortawesome/react-fontawesome to render the icons as recomened in the FA setup. And they successfully work when in server side components, but I think it fails in client side as it doesn't see the config.
FA is configured like this in the new layout.tsx file.
import { config, library } from '#fortawesome/fontawesome-svg-core'
import { fas } from '#fortawesome/pro-solid-svg-icons';
import { far } from '#fortawesome/pro-regular-svg-icons';
import { fal } from '#fortawesome/pro-light-svg-icons';
config.autoAddCss = false;
library.add(fas, far, fal);
The using a icon like so <FontAwesomeIcon icon={['far', 'home]} />
What sort of config do I need an be loaded at the client components?
I have tried dumping all the imports into a client side component - that fixes it, but then lots of bloats the app by bundling FA everywhere!

How to use existing scanning software dll file using Node js for create Scanning functionality in Node js and Angular 8?

I have a requirement to create scanning functionality using Node js API with existing scanning software in PC. so How can I achieve that type of functionality using Node js and Angular-8.
I have already checked Dynam Twain SDK but it is available only for 30 day trail.
Thanks to all for your help.
Your question is a little confusing. Indeed, Dynamic Web Twain can simply run a web server with node.js to load web applications. But since you already mentioned Angular-8, you may want to use Node.js API to call Dynamic Web Twain to scan pages, right?
Here is a sample shows how to integrate Dynamic Web TWAIN JavaScript library into an Angular project.
export class AppComponent implements OnInit {
title = 'angular-cli-application';
DWObject: WebTwain;
selectSources: HTMLSelectElement;
ngOnInit() {
Dynamsoft.WebTwainEnv.AutoLoad = false;
Dynamsoft.WebTwainEnv.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: '583px', Height: '513px' }];
Dynamsoft.WebTwainEnv.RegisterEvent('OnWebTwainReady', () => { this.Dynamsoft_OnReady(); });
Dynamsoft.WebTwainEnv.Trial = true;
Dynamsoft.WebTwainEnv.ProductKey = "A-Valid-Product-Key";
//Dynamsoft.WebTwainEnv.ResourcesPath = "https://tst.dynamsoft.com/libs/dwt/15.2";
Dynamsoft.WebTwainEnv.Load();
}
You can find the code here.
And if you want to scan documents with Node.js API on the server-side, you can refer to the code here.

Adding Vuetify package to Excel addin made with VueJS framework

I tried adding a excel add-in(Side load) using VueJS and created the manifest files by using Yeoman office package. I followed the instructions by going through this tutorial. Everything worked fine, now I wanted to add Vuetify framework to my add-in application.
On the main.js file from template, the Vue instance is initiated with this code
import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false
const Office = window.Office
Office.initialize = () => {
new Vue({
el: '#app',
components: {App},
template: '<App/>'
})
}
}
Now I am trying to add Vuetify and doing an npm install as per their docs by modifying the above code as:
import Vue from 'vue'
import App from './App'
import Vuetify from 'vuetify'
Vue.use(Vuetify)
Vue.config.productionTip = false
const Office = window.Office
Office.initialize = () => {
new Vue({
el: '#app',
components: {App},
template: '<App/>'
})
}
When I introduce the Vuetify library, the add-in is not working..I am not sure how incorporate Vuetify to my Office add-in. Any help would be much appreciated. Thanks
I have uploaded an example repo with a Vue Excel addin using Vuetify:
https://github.com/beauholland/Vue-Excel-Addin
NPM install
NPM start
Browse to http://localhost:3000 and confirm the web app runs in IE11
If you get this far its time to sideload the app in Excel.
Setup sideload folder share for testing i.e. vue-excel\Graph API\ and configure Excel to trust share folder and insert addin https://learn.microsoft.com/en-us/office/dev/add-ins/testing/create-a-network-shared-folder-catalog-for-task-pane-and-content-add-ins
NOTE: the sample app in my repo is called "Graph API"
Recently got Vuetify working within an Excel Addin in Windows.
Are you on a Windows box?
Can you browse to your app i.e. http://localhost:3000 successfully?
Can you browse to your app i.e. http://localhost:3000 successfully within IE11?
Do you see any errors in your browser dev tools console?
What does "the add-in is not working" mean, any more specifics about the problem?
Issue I had was related to Vuetify IE11 compatibility, specifically...
Vuetify utilizes features of ES2015/2017 that require the need to use polyfills for Internet Explorer 11
Source: https://vuetifyjs.com/en/getting-started/quick-start#ie11-safari-9-support
As far as I am aware Excel addins require IE11 i.e. Office for Windows as at both 2013 and 2016 use an embedded IE11 instance to host add-ins.
Internet Explorer 11 or later, which must be installed but doesn't have to be the default browser. To support Office Add-ins, the Office client that acts as host uses browser components that are part of Internet Explorer 11 or later.
Source: https://learn.microsoft.com/en-us/office/dev/add-ins/concepts/requirements-for-running-office-add-ins
Source: https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/31155925-office-add-ins-should-run-in-edge-not-ie11

asp.net mvc area not working on iis

I crated area/modular MVC5 application according to this tutorial:
This
it worked perfectly on local. but i got 404 error, when i deployed project on iis and clicked on specified area link.
and i didn't find any solution for that.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Sale
and this is my action links which are perfectly working on local run:
#Html.ActionLink("Sale","Index","Sale",new { Area="Sale"},null)
edited:
public class SaleAreaRegistration:AreaRegistration
{
public override string AreaName
{
get
{
return "Sale";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Sale_default",
"Sale/{controller}/{action}/{id}",
new { controller = "Sale", action = "Index", id = UrlParameter.Optional },
new string[] { "MVCPluggableDemo.Controllers" }
);
}
}
attention: according to the tutorial which i said in first line. i created my module project in another virtual project in solution(the real path is in area folder of main project like"~/ProjectName/Areas/"). but i think the publisher does't understand it...because i don't see any of my module views in deployed path.
its better to completing my help request by this obvious question:
How to deploy MVC project include areas, and the modules which are in areas folder?
Its simply obvious:
Check your page directory. The server cannot locate your the file,
it maybe in different folder.
Also try to Check this.
the main Reason of my problem was this:
VisualStudio doesn't include my Area folder, in publish path..why? i don't know
Solution: no solution yet!..but i added my module dll inside bin folder manually. and created my areas folder and his modules projects solution(dlls' are not not necessary) in main published solution, manually to ..
finally it worked, but i dont thing is the standard solution

Swagger does not show all operations

I am trying to use Swagger to document rest services created with ServiceStack 3.9.70...
This is the layout of the solution:
[Product.Services.Rest.dll]
AppHost.cs
//Tell Service Stack the name of your application and where to find your web services
public AppHost() : base("Product Services", typeof(Product1Service).Assembly) { }
[Product.Services.Rest.ServiceInterface.dll]
+-Services
+-Product1Service.cs
+-Product2Service.cs
+-Product3Service.cs
[Product.Services.Rest.ServiceModel.dll]
+-Operations
| +-Product1.cs
| +-Product2.cs
| +-Product3.cs
|
+-Types
+-Type1.cs
+-Type2.cs
+-Type3.cs
Using the swagger-ui, I have set discoveryUrl: "/resources"
When starting the swagger html, only the operations in one of the Product{n}.cs shows.
When running the /metadata all operations are shown.
Has this something with how I have structured the solution ?

Resources