I have created an excel custom function with a shared runtime environment. It's working fine in the desktop app, but when I run the same project on the server it's not working. My excel function is not working online. I don't know why its behavior change in an online environment.
Can anyone tell me why I am getting making mistakes?
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
<Id>a1753eec-7c8b-4dbd-ab74-3b30d63d9b15</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Contoso" />
<Description DefaultValue="Write your own Excel functions in JavaScript." />
<IconUrl DefaultValue="https://localhost:3000/assets/lock.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/lock.png" />
<SupportUrl DefaultValue="https://www.contoso.com/help" />
<AppDomains>
<AppDomain>https://localhost:3000</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Workbook" />
</Hosts>
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="SharedRuntime" MinVersion="1.1" />
</Sets>
</Requirements>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html" />
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Workbook">
<Runtimes>
<Runtime resid="Taskpane.Url" lifetime="long" />
</Runtimes>
<AllFormFactors>
<ExtensionPoint xsi:type="CustomFunctions">
<Script>
<SourceLocation resid="Functions.Script.Url" />
</Script>
<Page>
<SourceLocation resid="Taskpane.Url" />
</Page>
<Metadata>
<SourceLocation resid="Functions.Metadata.Url" />
</Metadata>
<Namespace resid="Functions.Namespace" />
</ExtensionPoint>
</AllFormFactors>
<DesktopFormFactor>
<GetStarted>
<Title resid="GetStarted.Title" />
<Description resid="GetStarted.Description" />
<LearnMoreUrl resid="GetStarted.LearnMoreUrl" />
</GetStarted>
<FunctionFile resid="Taskpane.Url" />
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<CustomTab id="TabAddIns">
<Group id="CommandsGroup">
<Label resid="CommandsGroup.Label" />
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Control xsi:type="Button" id="TaskpaneButton">
<Label resid="TaskpaneButton.Label" />
<Supertip>
<Title resid="TaskpaneButton.Label" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url" />
</Action>
</Control>
</Group>
<Label resid="TaskpaneButton.Label" />
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/lock.png" />
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/lock.png" />
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/lock.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Functions.Script.Url" DefaultValue="https://localhost:3000/dist/functions.js" />
<bt:Url id="Functions.Metadata.Url" DefaultValue="https://localhost:3000/dist/functions.json" />
<bt:Url id="Functions.Page.Url" DefaultValue="https://localhost:3000/dist/functions.html" />
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html" />
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="Functions.Namespace" DefaultValue="contoso" />
<bt:String id="GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
<bt:String id="CommandsGroup.Label" DefaultValue="Get help" />
<bt:String id="TaskpaneButton.Label" DefaultValue="Login" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." />
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
I've created an android project & implement GeckoView instead of WebView.
In manifest I've added
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
But when I try to open a site with camera permission nothing happens.
I've been trying to setup a sample Prism project, but i'm stuck at the following error.
It looks like it searching for a version of the assembly of a later version.
I've tried cleaning the project, and removing the npm packages, but noting seems to help.
System.Windows.Markup.XamlParseException: 'Could not load file or assembly 'Prism.Wpf, Version=7.1.0.172, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'
These are the packages added to the project.
<packages>
<package id="CommonServiceLocator" version="1.4.0" targetFramework="net461" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net461" />
<package id="MaterialDesignThemes" version="2.4.0.1044" targetFramework="net461" />
<package id="Prism.Core" version="6.3.0" targetFramework="net461" />
<package id="Prism.Unity" version="6.3.0" targetFramework="net461" />
<package id="Prism.Wpf" version="6.3.0" targetFramework="net461" />
<package id="Unity" version="4.0.1" targetFramework="net461" />
<package id="Unity.Abstractions" version="3.3.0" targetFramework="net461" />
<package id="Unity.Container" version="5.8.6" targetFramework="net461" />
</packages>
Any suggestions how to resolve this issue?
I've found the reference and it was part of the App.Config
I've
App.Config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Prism" publicKeyToken="40ee6c3a2184dc59" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.1.0.172" newVersion="7.1.0.172" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Unity.Abstractions" publicKeyToken="6d32ff45e0ccc69f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Unity.Container" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Prism.Wpf" publicKeyToken="40ee6c3a2184dc59" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.1.0.172" newVersion="7.1.0.172" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
The Project Explorer has duplicated/triplicated lists for scripts and css which are specified in the Package.config. The .csproj also has duplicated/triplicated <content Include="..."> under <ItemGroup>for these files, even the physical files are not duplicated. I have to manually remove the duplicated/triplicated files. Is there a way to prevent this?
The project is under GIT source control. All additional packages that can be restored by Nuget are not tracked(checked) in the GIT repository. When I do a PULL from the GIT repository, all the Angular related scripts and css have yellow triangle icons. The files are downloaded by Nuget during build time. Though I can add those packages to be source controlled so Nuget won't download these scripts/css every time during a build, this is against the source control practice.
Nuget Package Manager settings
Here is the package.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Angular.UI.Bootstrap" version="0.12.0" targetFramework="net45" />
<package id="Angular.UI.UI-Router" version="0.2.15" targetFramework="net45" />
<package id="angularjs" version="1.4.3" targetFramework="net45" />
<package id="angular-ui-grid" version="3.0.0" targetFramework="net45" />
<package id="Antlr" version="3.5.0.2" targetFramework="net45" />
<package id="JasmineTest" version="2.2.0" targetFramework="net45" />
<package id="jQuery" version="2.1.4" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.Core" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.Owin" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.Owin" version="3.0.0" targetFramework="net45" />
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.0" targetFramework="net45" />
<package id="Microsoft.Owin.Security" version="3.0.0" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Cookies" version="3.0.0" targetFramework="net45" />
<package id="Microsoft.Owin.Security.OAuth" version="3.0.0" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.8.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
<package id="NugetPackageRestore" version="1.0.5" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="Twitter.Bootstrap.Less" version="3.3.2" targetFramework="net45" />
<package id="WebGrease" version="1.6.0" targetFramework="net45" />
</packages>`
I have implemented the ReportViewer in MVC. The only problem I'm having is that it renders a blank page. The toolbar is there, and the loading icon flashes for a second, but only a blank page is returned.
I've logged into the SSRS report manager and ran it through there and everything works fine. I'm at a loss of what to try next.
ReportsView(ASPX)
<%# Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%# Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="Head1" runat="server">
<title>ASPXView</title>
</head>
<body>
<div>
<form id="Form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
Font-Size="8pt" Height="600px" InteractiveDeviceInfos="(Collection)"
ProcessingMode="Remote" WaitMessageFont-Names="Verdana"
WaitMessageFont-Size="14pt" Width="100%">
<ServerReport ReportServerUrl="http://localhost/ReportServer" ReportPath="/Reports/Requisition Summary Report" />
</rsweb:ReportViewer>
</form>
</div>
</body>
</html>
Controller
using System.Web.Mvc;
namespace SP_MVC.Controllers
{
public class ReportsController : Controller
{
//
// GET: /Reports/
public ActionResult Index()
{
return View();
}
public ActionResult ReportsView()
{
return View();
}
public ActionResult ReportsControl()
{
return View();
}
}
}
Web Config
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="SP_MVC.Properties.Settings.DBConnectionString"
connectionString="Data Source=localhost;Initial Catalog=DB;User ID=DBClient;Password=DBPassword;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="2.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<httpHandlers>
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
<compilation debug="true" targetFramework="4.0" />
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
<add namespace="Kendo.Mvc.UI" />
</namespaces>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true" />
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
I had a similar issue and fixed it by adding ZoomMode="PageWidth" and SizeToReportContent="true" to the ReportViewer tag.