Installing Google.Apis.AnalyticsReporting.v4 for.net - google-analytics-api

I am using the above API, within visual studio, which I installed using the NuGet package manager.
I have successfully written a web application, which retrieves Google analytics data, running on my desktop.
I am now having problems installing that web application on the server. Do I need to install any Google API or packages on the server and if so how?
Currently, I have just done what I have always done-created a folder in IIS, copied over the folder structure and converted it to an application.
However, I am receiving the following error:-
Compiler Error Message: CS0246: The type or namespace name 'Google' could not be found (are you missing a using directive or an assembly reference?) And it highlights the following:-
using Google.Apis.AnalyticsReporting.v4;
Any ideas?
Thanks

Related

WPF Application Crashes when making HTTP request via Facebook's Graph API

I wrote an application that gets my personal info from Facebook using the Graph API. When debugging the application in Visual Studio, everything runs fine. I created an installer using Advanced Installer and installed the program on my system. When I click a button that requires an Graph API request, the program stalls and crashes.
I was just able to debug using Visual Studio and got a FileNotFound exception saying, "Could not load file or assembly 'Facebook, Version=6.0.10.0, Culture=neutral, PublicKeyToken...' or one of its dependencies. The system cannot find the file specified."
Not sure where to go from here, but any helpful tips would be appreciated.
This sounds like your setup package failed to deploy your app file or one of its dependencies. You should check into your installation folder for the deployed files and make sure all of them were successfully deployed/copied on local machine after installation.

Add->REST API Client... command fails in VS2015

I want to add a RESTful API to my UWP project. But I get the following error in VS2015 when clicking OK in the Add->REST API Client dialog:
Generating client code and adding to project started
Generate client code for REST API with following parameters:
REST API Name: XXXXXX, Base namespace: XXXXXX, Metadata file path: C:\Users\XXXX\AppData\Local\Temp\WebToolsAutoRest\XXXXXX\201612291330467450\swagger.json
Exception: Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
Generating client code and adding to project failed
Adding REST API client for failed
I found someone facing the same problem here. But it seems he didn't find a solution to this problem. Ant pointers?
Thanks in advance.
I was seeing the same thing too on vs2015 (I only have 2015 installed though). Apparently the work around is to copy and paste the Newtonsoft.Json.dll into the folder path C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
I made sure to download the 7.0.1 version using NuGet.
https://github.com/Azure/azure-sdk-for-net/issues/2587
I ran into this same problem and I'm wondering if it's because I have the Visual Studio 2017 RC installed on the same machine as VS2015.
Here's my workaround. I opened the solution in VS2017 and added the REST API client. Then I closed the solution in VS2017 and re-opened it in VS2015. It's an ugly solution but it seems to work.

failed to load Component.js: 404 - Not Found

My colleague has developed an extension project to Approve Purchase Contract application using local trial Web IDE. I imported his project using the licensed Web IDE from SAP gateway server. The folder structure looks like this:
.
My index.html looks like this:
.
Whenever I run using index.html or Component.js, I'm getting below error. Kindly help.
Uncaught Error: failed to load
'ui/s2p/mm/purcontract/approve/MM_PC_APVExtension/Component.js' from
./Component.js: Error: failed to load
'ui/s2p/mm/purcontract/approve/Component.js' from
/sap/bc/ui5_ui5/sap/MM_PC_APV/Component.js: 404 - Not Found
The error message says:
ui/s2p/mm/purcontract/approve/MM_PC_APVExtension/Component.js is found but it can not be loaded because a dependency is not found. That missing dependency is ui/s2p/mm/purcontract/approve/Component.js which should be available at /sap/bc/ui5_ui5/sap/MM_PC_APV/Component.js.
Please follow the SAP Documentation DOC-58342 step 4.2 to be sure the "Approve Purchase Contract App" is installed and activated and the necessary roles are assigned.
Thanks schnoedel. I resolved the issue by recreating the extension project and copying the code changes from old project.

'Could not load type' error when viewing a web app package on IIS

I am new to Visual Studio 2012 and the Web Deploy 3.0 used to upload a package to IIS. While my application compiles and renders fine on my local development laptop, when I package the web app and then import the packaged zip file to my site on IIS I get error when I try to view the page. When I open IE on my local machine and browse to my site address by IP (_http://1.2.3.4/acme/tools/default.aspx) I get this error "Server Error in '/' Application." and then further below "Parser Error Message: Could not load type 'ACME.Default'". The source error is pointing to my page declaration. It appears that it is having trouble with the 'Inherits="ACME.Default"' , but why? And how to fix?
Many thanks.
Alex
Have you checked your AppPool version versus your app -- typical IIS configurations will still default to 2.0 not 4.0 and this is exactly the sort of error one sees when one has that kind of version mismatch.

How to deploy an Orchard CMS web project to a Windows Azure Cloud Service?

Basically, I want to be able to deploy a Orchard CMS web application to a windows azure cloud service. I v'e tried following the same steps as I would normally do for any other web application but it just never works.
UPDATE
I downloaded the Orchard.Source.1.5.1 from orchardproject.net website. Added my custom modules and themes. Published the web application to a local folder. That would result in a Orchard web application. I open this web application, add the Windows Azure Cloud Service project and my web application is the web role in this project. I set up DataConnectionString to my azure cloud storage with my name and key. Published to Azure.
Once the deployment is over when I go to the site url to see the result I get this the YSOD with the following exception:
Server Error in '/' Application.
None of the constructors found with 'Public binding flags' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Autofac.Core.DependencyResolutionException: None of the constructors found with 'Public binding flags' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.
UPDATE:
I followed the guide in the orchard project website "Deploying Orchard to Windows Azure" and didn't touch anything, just got all the source code from the repository, ran ClickToBuildAzure from the Visual Studio 2010 command line, didn't get any error messages, set up my storage in the ServiceConfiguration file and uploaded my package and ServiceConfiguration files. Deployment went ok. I got to the Orchard Get Started screen but after input all the information, including a connection string to my SQL Azure DB (got the connection string from Azure Portal and inserted my password), I got the following error:
Setup failed: An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Data.ISessionLocator, System.Collections.Generic.IEnumerable`1[Orchard.Data.Migration.Interpreters.ICommandInterpreter], Orchard.Data.ISessionFactoryHolder, Orchard.Reports.Services.IReportsCoordinator)' on type 'DefaultDataMigrationInterpreter'.
I didn't even get to the AddingaModuletotheDistribution point.
The guide provided by the Orchard Team is not the ideal solution for me.
I have developed custom modules and themes and I work in a development environment with Visual Studio and TFS and would not like to use it with WebMatrix and and deploy to Azure Web site.
I downloaded the source code from the orchard website and added an azure web role project.
By the way, I've checked this question and this blog post and still could not resolve my problem.
Everything I find regarding this is fairly outdated!
I am almost giving up. Could anybody tell me if this is possible? Or the only way to work with Orchard is WebMatrix?
You need to read the documentation more carefully, as adding modules and themes is covered here: http://docs.orchardproject.net/Documentation/Deploying-Orchard-to-Windows-Azure#AddingaModuletotheDistribution
You need to add your modules and themes to the Azure solution, not the Orchard solution the is in src. Once you've done that, the ClickToBuildAzure script will generate a package that contains your modules and themes, and that will deploy well to Azure.
You could try http://docs.orchardproject.net/Documentation/Building-and-deploying-Orchard-from-a-source-code-drop This solved the exact same exception for me just now, but I built with the intent to run on IIS rather than Azure.
Didn't investigate to figure out what the steps in the link did to satisfy the IoC container that was not satisfied by doing a regular file system publish.