Word Web Add-in: Sorry, but we can't start this app because it isn't set up properly - ms-word

I try to deploy my Word web add-on that created by Visual Studio 2017 using the Slideloading method.
When I upload the manifest file the message it gives to me seems fine saying:
Get started with your sample add-in!
Your sample add-in loaded successfully. Go to the HOME tab and click 'Show Taskpane' button to get started.
but when I go to use it, it fails saying:
Add-in Error Sorry, but we can't start this app because it isn't set up properly.
Although I followed the sideloading method well and changed the source location default value to: <SourceLocation DefaultValue="https://localhost:44300/App/Home/Home.html" />
Besides this method worked well by OfficeApp manifest.

If you created your add-in using Visual Studio and just want to test it, you can run/load the add-in simply by using F5 (Start) within the Visual Studio project. When you press F5 to start the project, Visual Studio will automatically host the add-in on your local IIS server and will open Word with the Show Taskpane button visible in the Home tab. The Word add-in quickstart describes this process in more detail. (Note: if you're using Visual Studio to run the add-in like I've described here, you shouldn't modify the localhost port number within the DefaultValue attribute of the SourceLocation element in the manifest.)
If you created your add-in using Visual Studio but want to be able to run it by using the Sideloading technique (i.e., without using Visual Studio), then you'll need to deploy the web application portion of the add-in to a web server. In your post, you say that you've specified https://localhost:44300/App/Home/Home.html as the initial page of your add-in. If you navigate to that URL using a web browser, does the page load successfully (with no certificate errors)? If not, that could indicate a problem with your web app -- for example, perhaps there is no web server running at localhost:44300, or perhaps the web server is running but there is no such path as App/Home/Home.html, or perhaps the web server is running and that is a valid path but the add-in web app isn't SSL-secured.

Related

How to add new web page to VSC liveserver?

I cant find how to add another web page to VSC Live Server extension.
It shows me one old web page again and again if I am trying add another page.
I was searching how to fix this problem but I couldn't find a solution to my problem.
To add new webpage to your project in Visual Studio Code Live Server :
Just move your files to the folder that you are viewing in Visual Studio Code Live Server Extension.

How do you debug a Microsoft Word web add-in with vscode?

Visual Studio has a template for a Word web add-in. Clicking 'Start' opens Word with the add-in loaded, and allows for immediate debugging of the front-end javascript in the IDE.
Word was running the add-in in ie11.
With this project, the only options I've found are debugging with 'f12' debugger located in C:\Windows\SysWOW64\F12\IEChooser.exe (or System32).
I installed the latest version of windows to get access to the new Windows Terminal. This update also switched the Word add-in to load in edge instead of ie11, which requires the new Microsoft Edge Developer Tools.
I would like to get access to the functionality Visual Studio provides for debugging front-end code via an IDE instead of f12/edge developer tools. I cannot find out how Visual Studio allows this debugging as all of the properties are hidden away as settings in .sln and web.config etc.
Is there any way to debug this add-in with Visual Studio/vscode (preferrably vscode)?
There are many ways you can use VSCode for debugging but all debugging methods depends on external browsers like chrome, IE, edge debugger. I believe you do not want to perform this in VSCode.
This method will help you in some way. But I am sure you can manage this.
Step 1. Create a word web addin using Yeoman generator. Official link below
https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/word-quickstart?tabs=yeomangenerator
They use nodejs and you can choose Angular / React / JS to build your addin.
The advantage is it will give you the flexibility to debug in any IDE .
Caveat: As I said above you can easily build the Addin with the help of web technology.
Step 2: Debugging: either you can use VSCODE Debugging functionality or use the browser
Step 3: If you choose browser: Go to sources > Choose Webpack > Select the .ts or /js file and set the breakpoint. Screenshot below for your kind reference.
note: I have selected Angular from office generator to build the addin. Then you can see the webpack under the sources. I believe this is the same for any technology.
Hope this will help you.

Visual Studio Navision 2018 error

I am trying to create table and page Navision through visual studio code. but I am finding an error in this process. Can anyone help me?
Error: Could not open the specified startup page. Please check that the server configuration key PublicWebBaseUrl has been properly set.
I'm using Navision 2018.
I had the same error. You need to set the PublicWebBaseUrl property. You can do this in two places:
Edit the config file of the nav service you are trying to connect to
In the server administrator app the same property is under Client
Services tab called "Web Client Base Url".
Here it is in the Server Administration
You have to do the following 3 Steps:
Set the PublicWebBaseUrl property. Edit the config file of your service or use the Administration-App (there you set the "Web Client Base Url" under Client Services). You set it to HTTP://<Servername>:<Port>/<Instancename> (depending on your configuration, but Port should be 8080).
Restart the Service (obviously)
Restart Visual Studio Code. Yes, that is a not very intuitive, but a really crucial step.
After that, you should be able to publish to the Server without problems.

How consume rest service that was built using webapi in Visual Studio and published in IIS

I has built a REST service follow to tutorial
https://www.youtube.com/watch?v=JeIE3jzAxHU
I has published it in IIS using Visual Studio. But I don't understand how consume it. In the sample that works under IIS Express it is called as
localhost:port/api/person.
When I publish the service in IIS I see many compiled files but I do not understand what address I should call to get the same result as it was under IIS Express.
Try this to get url:
Open IIS
Expand out the left tree until you see Sites
Select the one you made for the demo
Click on Browse *:port under Browse Website heading on far right pane.
That will give you the base site url for your testing, and just add api/person to it from there.
Likely http://localhost/api/person, unless the demo was really weird. If you are unable to still browse the site, give us more information (errors?) or at least screenshots.

error activating .wsp file in sharepoint server 2010

I developed a sample application in visual studio 2010. I created an Empty SharePoint Project and gave the local site url for debugging. Checked "Deploy as Farm" as the trust level of the SharePoint solution. Added a visual webpart and also a class to the solution. I am able to build and successfully run the application using visual studio. In my local machine am using SharePoint foundation 2010 to debug the SharePoint application.
Now i want to deploy this application in the SharePoint server 2010 which is in a virtual machine.
1. I copied the .wsp file of the application i created to the virtual machine.
2. From the central administrator in the VM I created a web application and the site collection.
3. Then using Site Actions -> Site Settings -> Solution(Galleries), choose the .wsp file for uploading. it showed a "Warning: You should only activate this solution if you trust this solution. An activated solution can read, modify and delete your data. " and the activate button is disabled.
Then I tried to do same in my local machine on a different site collection. Here Activate button is enabled but when clicked it threw exception
Server Error in '/' Application.
This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'aee60282-765d-4c9f-b67a-5981f18a6d3b' failed validation, file manifest.xml, line 10, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'.
What could be this error?
The "TemplateFiles" element refers to items that will be copied onto the web server. This is allowed for farm solutions (which are deployed via CentralAdmin), but is not allowed for sandboxed solutions (which are deployed via the Solution Gallery).
When you deploy your wsp with visual studio, you deploy it as farm solution.
When you deploy your wsp from site settings into solution galery, you deploy it as user solution (sandbox solution) with some limitations :
first, avoid using out of the box visual webparts, it's prohibited !
Deploy your wsp by writing powershell script.
A good starting point here :
patrickboom.wordpress.com/2010/05/31/using-powershell-to-deploy-sharepoint-solutions-wsp-2/
Le_Fredo is correct here, when attempting to deploy a WSP file into the site collection directly under the site settings, you won't be able to. I found this article from microsoft to be extermely helpful
http://technet.microsoft.com/en-us/library/ff607688(v=office.14).aspx