Complete the following steps to configure FlexReport Web API using standard Visual Studio Template for Web API:
Complete the following steps to configure Web API project:
Alternatively, you can manually add the source path from NuGet Package Manager | Package Sources option available in Options dialog box, which appears on selecting Tools | NuGet Package Manager | Package Manager Settings.
In the NuGet package manager the Report Service is listed as shown in the following image:
FlexReport Web API adds all the corresponding references to the project.
licenses.licx |
Copy Code
|
---|---|
C1.Web.Api.LicenseDetector, C1.Web.Api |
Startup.cs |
Copy Code
|
---|---|
public void Configuration(IAppBuilder app) { app.UseCors(CorsOptions.AllowAll); var folder = GetFullRoot("Files"); app.AddDiskStorage("root", folder); ConfigureAuth(app); } |
Startup.cs |
Copy Code
|
---|---|
private static string GetFullRoot(string root) { var applicationBase = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; var fullRoot = Path.GetFullPath(Path.Combine(applicationBase, root)); if (!fullRoot.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) { fullRoot += Path.DirectorySeparatorChar; } return fullRoot; } |
Web.config |
Copy Code
|
---|---|
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="api/*" verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> |