vs2015-Azure Mobile Service
/App_Data
/App_Start/
WebApiConfig.cs
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data.Entity;
using System.Web.Http;
using WebApp2.DataObjects;
using WebApp2.Models;
using Microsoft.WindowsAzure.Mobile.Service; namespace WebApp2
{
public static class WebApiConfig
{
public static void Register()
{
// Use this class to set configuration options for your mobile service
ConfigOptions options = new ConfigOptions(); // Use this class to set WebAPI configuration options
HttpConfiguration config = ServiceConfig.Initialize(new ConfigBuilder(options)); // To display errors in the browser during development, uncomment the following
// line. Comment it out again when you deploy your service for production use.
// config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always; Database.SetInitializer(new MobileServiceInitializer());
}
} public class MobileServiceInitializer : DropCreateDatabaseIfModelChanges<MobileServiceContext>
{
protected override void Seed(MobileServiceContext context)
{
List<TodoItem> todoItems = new List<TodoItem>
{
new TodoItem { Id = Guid.NewGuid().ToString(), Text = "First item", Complete = false },
new TodoItem { Id = Guid.NewGuid().ToString(), Text = "Second item", Complete = false },
}; foreach (TodoItem todoItem in todoItems)
{
context.Set<TodoItem>().Add(todoItem);
} base.Seed(context);
}
}
}
/Controller
TodoItemController.cs
using System.Linq;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Http.OData;
using Microsoft.WindowsAzure.Mobile.Service;
using WebApp2.DataObjects;
using WebApp2.Models; namespace WebApp2.Controllers
{
public class TodoItemController : TableController<TodoItem>
{
protected override void Initialize(HttpControllerContext controllerContext)
{
base.Initialize(controllerContext);
MobileServiceContext context = new MobileServiceContext();
DomainManager = new EntityDomainManager<TodoItem>(context, Request, Services);
} // GET tables/TodoItem
public IQueryable<TodoItem> GetAllTodoItems()
{
return Query();
} // GET tables/TodoItem/48D68C86-6EA6-4C25-AA33-223FC9A27959
public SingleResult<TodoItem> GetTodoItem(string id)
{
return Lookup(id);
} // PATCH tables/TodoItem/48D68C86-6EA6-4C25-AA33-223FC9A27959
public Task<TodoItem> PatchTodoItem(string id, Delta<TodoItem> patch)
{
return UpdateAsync(id, patch);
} // POST tables/TodoItem
public async Task<IHttpActionResult> PostTodoItem(TodoItem item)
{
TodoItem current = await InsertAsync(item);
return CreatedAtRoute("Tables", new { id = current.Id }, current);
} // DELETE tables/TodoItem/48D68C86-6EA6-4C25-AA33-223FC9A27959
public Task DeleteTodoItem(string id)
{
return DeleteAsync(id);
}
}
}
/DataObjects
TodoItem.cs
using Microsoft.WindowsAzure.Mobile.Service; namespace WebApp2.DataObjects
{
public class TodoItem : EntityData
{
public string Text { get; set; } public bool Complete { get; set; }
}
}
/Models
MobileServiceContext.cs
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using Microsoft.WindowsAzure.Mobile.Service;
using Microsoft.WindowsAzure.Mobile.Service.Tables;
using WebApp2.DataObjects; namespace WebApp2.Models
{ public class MobileServiceContext : DbContext
{
// You can add custom code to this file. Changes will not be overwritten.
//
// If you want Entity Framework to alter your database
// automatically whenever you change your model schema, please use data migrations.
// For more information refer to the documentation:
// http://msdn.microsoft.com/en-us/data/jj591621.aspx
//
// To enable Entity Framework migrations in the cloud, please ensure that the
// service name, set by the 'MS_MobileServiceName' AppSettings in the local
// Web.config, is the same as the service name when hosted in Azure. private const string connectionStringName = "Name=MS_TableConnectionString"; public MobileServiceContext() : base(connectionStringName)
{
} public DbSet<TodoItem> TodoItems { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
string schema = ServiceSettingsDictionary.GetSchemaName();
if (!string.IsNullOrEmpty(schema))
{
modelBuilder.HasDefaultSchema(schema);
} modelBuilder.Conventions.Add(
new AttributeToColumnAnnotationConvention<TableColumnAttribute, string>(
"ServiceTableColumn", (property, attributes) => attributes.Single().ColumnType.ToString()));
}
} }
/Performance
Microsoft.ServiceBus.MessagingPerformanceCounters.man
<?xml version="1.0" encoding="UTF-16"?>
<instrumentationManifest xsi:schemaLocation="http://schemas.microsoft.com/win/2004/08/events eventman.xsd" xmlns="http://schemas.microsoft.com/win/2004/08/events" xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:trace="http://schemas.microsoft.com/win/2004/08/events/trace">
<instrumentation>
<counters schemaVersion="1.1" xmlns:auto-ns1="http://schemas.microsoft.com/win/2004/08/events" xmlns="http://schemas.microsoft.com/win/2005/12/counters">
<provider providerName="Microsoft.ServiceBus.Client" symbol="Microsoft_ServiceBus_Client" providerGuid="{F3B69C52-E054-40DB-B0A9-AE5D4A5A1D7B}" applicationIdentity="Microsoft.ServiceBus.dll" providerType="userMode" callback="custom">
<counterSet name="Service Bus Messaging Client" symbol="ServiceBus_Message_Client" guid="{0BA5DC8D-1637-4906-BDEA-458155C39CC6}" uri="Microsoft.ServiceBus.Messaging.Client" description="ServiceBus Messaging Client performance counters for the Namespace" instances="multiple">
<counter name="SendMessage Success Count" symbol="ServiceBus_Message_Client_SendMessageSuccessCount" uri="Microsoft.ServiceBus.Messaging.Client.SendMessageSuccessCount" description="Number of messages sent"
id="0" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="SendMessage Success/sec" symbol="ServiceBus_Message_Client_SendMessageSuccessPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.SendMessageSuccessPerSecond" description="Rate at which messages are sent"
id="1" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="SendMessage Failure Count" symbol="ServiceBus_Message_Client_SendMessageFailureCount" uri="Microsoft.ServiceBus.Messaging.Client.SendMessageFailureCount" description="Number of failed attempts to send a message"
id="2" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="SendMessage Failures/sec" symbol="ServiceBus_Message_Client_SendMessageFailuresPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.SendMessageFailuresPerSecond" description="Rate at which send operations are failing"
id="3" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="SendMessage Latency Base" symbol="ServiceBus_Message_Client_SendMessageLatencyBase" uri="Microsoft.ServiceBus.Messaging.Client.SendMessageLatencyBase" description="Microsoft.ServiceBus.Messaging.Client.SendMessageLatencyBase"
id="4" type="perf_average_base" detailLevel="standard" aggregate="undefined">
<counterAttributes>
<counterAttribute name="noDisplay">
</counterAttribute>
</counterAttributes>
</counter>
<counter name="SendMessage Latency" symbol="ServiceBus_Message_Client_SendMessageLatency" uri="Microsoft.ServiceBus.Messaging.Client.SendMessageLatency" description="Average latency of a message send operation"
id="5" baseID="4" defaultScale="0" type="perf_average_timer" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="ReceiveMessage Success Count" symbol="ServiceBus_Message_Client_ReceiveMessageSuccessCount" uri="Microsoft.ServiceBus.Messaging.Client.ReceiveMessageSuccessCount" description="Number of messages received"
id="6" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="ReceiveMessage Success/sec" symbol="ServiceBus_Message_Client_ReceiveMessageSuccessPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.ReceiveMessageSuccessPerSecond" description="Rate at which messages are received"
id="7" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="ReceiveMessage Failure Count" symbol="ServiceBus_Message_Client_ReceiveMessageFailureCount" uri="Microsoft.ServiceBus.Messaging.Client.ReceiveMessageFailureCount" description="Number of failed attempts to receive a message"
id="8" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="ReceiveMessage Failures/sec" symbol="ServiceBus_Message_Client_ReceiveMessageFailuresPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.ReceiveMessageFailuresPerSecond" description="Rate at which receive operations are failing"
id="9" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="ReceiveMessage Latency Base" symbol="ServiceBus_Message_Client_ReceiveMessageLatencyBase" uri="Microsoft.ServiceBus.Messaging.Client.ReceiveMessageLatencyBase" description="Microsoft.ServiceBus.Messaging.Client.ReceiveMessageLatencyBase"
id="10" type="perf_average_base" detailLevel="standard" aggregate="undefined">
<counterAttributes>
<counterAttribute name="noDisplay">
</counterAttribute>
</counterAttributes>
</counter>
<counter name="ReceiveMessage Latency" symbol="ServiceBus_Message_Client_ReceiveMessageLatency" uri="Microsoft.ServiceBus.Messaging.Client.ReceiveMessageLatency" description="Average latency of a message receive operation"
id="11" baseID="10" defaultScale="0" type="perf_average_timer" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="CompleteMessage Success Count" symbol="ServiceBus_Message_Client_CompleteMessageSuccessCount" uri="Microsoft.ServiceBus.Messaging.Client.CompleteMessageSuccessCount" description="Number of messages completed"
id="12" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="CompleteMessage Success/sec" symbol="ServiceBus_Message_Client_CompleteMessageSuccessPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.CompleteMessageSuccessPerSecond" description="Rate at which messages are completed"
id="13" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="CompleteMessage Failure Count" symbol="ServiceBus_Message_Client_CompleteMessageFailureCount" uri="Microsoft.ServiceBus.Messaging.Client.CompleteMessageFailureCount" description="Number of failed attempts to complete a message"
id="14" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="CompleteMessage Failures/sec" symbol="ServiceBus_Message_Client_CompleteMessageFailuresPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.CompleteMessageFailuresPerSecond" description="Rate at which complete operations are failing"
id="15" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="CompleteMessage Latency Base" symbol="ServiceBus_Message_Client_CompleteMessageLatencyBase" uri="Microsoft.ServiceBus.Messaging.Client.CompleteMessageLatencyBase" description="Microsoft.ServiceBus.Messaging.Client.CompleteMessageLatencyBase"
id="16" type="perf_average_base" detailLevel="standard" aggregate="undefined">
<counterAttributes>
<counterAttribute name="noDisplay">
</counterAttribute>
</counterAttributes>
</counter>
<counter name="CompleteMessage Latency" symbol="ServiceBus_Message_Client_CompleteMessageLatency" uri="Microsoft.ServiceBus.Messaging.Client.CompleteMessageLatency" description="Average latency of a message complete operation"
id="17" baseID="16" defaultScale="0" type="perf_average_timer" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="AcceptMessageSessionByNamespace Completed Count" symbol="ServiceBus_Message_Client_AcceptMessageSessionByNamespaceCompletedCount" uri="Microsoft.ServiceBus.Messaging.Client.AcceptMessageSessionByNamespaceCompletedCount" description="Number of successful scaled receive AcceptMessageSession operations"
id="18" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="AcceptMessageSessionByNamespace Completed/sec" symbol="ServiceBus_Message_Client_AcceptMessageSessionByNamespaceCompletedPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.AcceptMessageSessionByNamespaceCompletedPerSecond" description="Rate at which scaled receive AcceptMessageSession operations complete successfully"
id="19" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="AcceptMessageSessionByNamespace Failure Count" symbol="ServiceBus_Message_Client_AcceptMessageSessionByNamespaceFailureCount" uri="Microsoft.ServiceBus.Messaging.Client.AcceptMessageSessionByNamespaceFailureCount" description="Number of failed scaled receive AcceptMessageSession operations"
id="20" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="AcceptMessageSessionByNamespace Failures/sec" symbol="ServiceBus_Message_Client_AcceptMessageSessionByNamespaceFailuresPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.AcceptMessageSessionByNamespaceFailuresPerSecond" description="Rate at which scaled receive AcceptMessageSession operations failed"
id="21" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="AcceptMessageSessionByNamespace Latency Base" symbol="ServiceBus_Message_Client_AcceptMessageSessionByNamespaceLatencyBase" uri="Microsoft.ServiceBus.Messaging.Client.AcceptMessageSessionByNamespaceLatencyBase" description="Microsoft.ServiceBus.Messaging.Client.AcceptMessageSessionByNamespaceLatencyBase"
id="22" type="perf_average_base" detailLevel="standard" aggregate="undefined">
<counterAttributes>
<counterAttribute name="noDisplay">
</counterAttribute>
</counterAttributes>
</counter>
<counter name="AcceptMessageSessionByNamespace Latency" symbol="ServiceBus_Message_Client_AcceptMessageSessionByNamespaceLatency" uri="Microsoft.ServiceBus.Messaging.Client.AcceptMessageSessionByNamespaceLatency" description="Average latency of a scaled receive AcceptMessageSession operations"
id="23" baseID="22" defaultScale="0" type="perf_average_timer" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="Exceptions Count" symbol="ServiceBus_Message_Client_ExceptionsCount" uri="Microsoft.ServiceBus.Messaging.Client.ExceptionsCount" description="Number of exceptions received"
id="24" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="Exceptions/sec" symbol="ServiceBus_Message_Client_ExceptionsPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.ExceptionsPerSecond" description="Rate at which exceptions are received"
id="25" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="MessagingExceptions/sec" symbol="ServiceBus_Message_Client_MessagingExceptionsPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.MessagingExceptionsPerSecond" description="Rate at which MessagingExceptions are received"
id="26" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="MessagingCommunicationExceptions/sec" symbol="ServiceBus_Message_Client_MessagingCommunicationExceptionsPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.MessagingCommunicationExceptionsPerSecond" description="Rate at which MessagingCommunicationExceptions are received"
id="27" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="ServerBusyExceptions/sec" symbol="ServiceBus_Message_Client_ServerBusyExceptionsPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.ServerBusyExceptionsPerSecond" description="Rate at which ServerBusyExceptions are received"
id="28" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="MessagingFactory Count" symbol="ServiceBus_Message_Client_MessagingFactoryCount" uri="Microsoft.ServiceBus.Messaging.Client.MessagingFactoryCount" description="Number of instantiated MessagingFactories"
id="29" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="TokensAcquired/sec" symbol="ServiceBus_Message_Client_TokensAcquiredPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.TokensAcquiredPerSecond" description="Rate at which tokes are aquired"
id="30" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="TokenAcquisitionFailures/sec" symbol="ServiceBus_Message_Client_TokenAcquisitionFailuresPerSecond" uri="Microsoft.ServiceBus.Messaging.Client.TokenAcquisitionFailuresPerSecond" description="Rate at which token acquisitions fail"
id="31" type="perf_counter_counter" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="Token Acquisition Latency Base" symbol="ServiceBus_Message_Client_TokenAcquisitionLatencyBase" uri="Microsoft.ServiceBus.Messaging.Client.TokenAcquisitionLatencyBase" description="Microsoft.ServiceBus.Messaging.Client.TokenAcquisitionLatencyBase"
id="32" type="perf_average_base" detailLevel="standard" aggregate="undefined">
<counterAttributes>
<counterAttribute name="noDisplay">
</counterAttribute>
</counterAttributes>
</counter>
<counter name="Token Acquisition Latency" symbol="ServiceBus_Message_Client_TokensAcquisitionLatency" uri="Microsoft.ServiceBus.Messaging.Client.TokensAcquisitionLatency" description="Average latency of a token acquisition operation"
id="33" baseID="32" defaultScale="0" type="perf_average_timer" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="Pending ReceiveMessage Count" symbol="ServiceBus_Message_Client_PendingReceiveMessageCount" uri="Microsoft.ServiceBus.Messaging.Client.PendingReceiveMessageCountt" description="Number of pending receive operations"
id="34" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="Pending AcceptMessageSession Count" symbol="ServiceBus_Message_Client_PendingAcceptMessageSessionCount" uri="Microsoft.ServiceBus.Messaging.Client.PendingAcceptMessageSessionCount" description="Number of pending AcceptMessageSession operations"
id="35" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
<counter name="Pending AcceptMessageSessionByNamespace Count" symbol="ServiceBus_Message_Client_PendingAcceptMessageSessionByNamespaceCount" uri="Microsoft.ServiceBus.Messaging.Client.PendingAcceptMessageSessionByNamespaceCount" description="Number of pending scaled receive AcceptMessageSession operations"
id="36" type="perf_counter_large_rawcount" detailLevel="standard" aggregate="undefined">
</counter>
</counterSet>
</provider>
</counters>
</instrumentation>
</instrumentationManifest>
/ScheduledJobs
SampleJobs.cs
using System.Threading.Tasks;
using System.Web.Http;
using Microsoft.WindowsAzure.Mobile.Service; namespace WebApp2.ScheduledJobs
{
// A simple scheduled job which can be invoked manually by submitting an HTTP
// POST request to the path "/jobs/sample". public class SampleJob : ScheduledJob
{
public override Task ExecuteAsync()
{
Services.Log.Info("Hello from scheduled job!");
return Task.FromResult(true);
}
}
}using System.Threading.Tasks;
using System.Web.Http;
using Microsoft.WindowsAzure.Mobile.Service; namespace WebApp2.ScheduledJobs
{
// A simple scheduled job which can be invoked manually by submitting an HTTP
// POST request to the path "/jobs/sample". public class SampleJob : ScheduledJob
{
public override Task ExecuteAsync()
{
Services.Log.Info("Hello from scheduled job!");
return Task.FromResult(true);
}
}
}
/scripts
ai.0.22.9-build00167.js
ai.0.22.9-build00167.min.js
/ApplicationInsights.config
/Global.asax
using System.Web.Http;
using System.Web.Routing; namespace WebApp2
{
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
WebApiConfig.Register();
}
}
}
/packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="AutoMapper" version="3.2.1" targetFramework="net452" />
<package id="EntityFramework" version="6.1.1" targetFramework="net452" />
<package id="Microsoft.ApplicationInsights" version="2.0.0" targetFramework="net452" />
<package id="Microsoft.ApplicationInsights.Agent.Intercept" version="1.2.1" targetFramework="net452" />
<package id="Microsoft.ApplicationInsights.DependencyCollector" version="2.0.0" targetFramework="net452" />
<package id="Microsoft.ApplicationInsights.JavaScript" version="0.22.9-build00167" targetFramework="net452" />
<package id="Microsoft.ApplicationInsights.PerfCounterCollector" version="2.0.0" targetFramework="net452" />
<package id="Microsoft.ApplicationInsights.Web" version="2.0.0" targetFramework="net452" />
<package id="Microsoft.ApplicationInsights.WindowsServer" version="2.0.0" targetFramework="net452" />
<package id="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" version="2.0.0" targetFramework="net452" />
<package id="Microsoft.AspNet.Cors" version="5.2.2" targetFramework="net452" />
<package id="Microsoft.AspNet.Identity.Core" version="2.0.1" targetFramework="net452" />
<package id="Microsoft.AspNet.Identity.Owin" version="2.0.1" targetFramework="net452" />
<package id="Microsoft.AspNet.Razor" version="3.2.2" targetFramework="net452" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.2" targetFramework="net452" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.2" targetFramework="net452" />
<package id="Microsoft.AspNet.WebApi.Cors" version="5.2.2" targetFramework="net452" />
<package id="Microsoft.AspNet.WebApi.OData" version="5.2.2" targetFramework="net452" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.2" targetFramework="net452" />
<package id="Microsoft.AspNet.WebApi.Tracing" version="5.2.2" targetFramework="net452" />
<package id="Microsoft.Data.Edm" version="5.6.2" targetFramework="net452" />
<package id="Microsoft.Data.OData" version="5.6.2" targetFramework="net452" />
<package id="Microsoft.Owin" version="3.0.0" targetFramework="net452" />
<package id="Microsoft.Owin.Host.SystemWeb" version="2.1.0" targetFramework="net452" />
<package id="Microsoft.Owin.Security" version="2.1.0" targetFramework="net452" />
<package id="Microsoft.Owin.Security.ActiveDirectory" version="2.1.0" targetFramework="net452" />
<package id="Microsoft.Owin.Security.Cookies" version="2.1.0" targetFramework="net452" />
<package id="Microsoft.Owin.Security.Facebook" version="2.1.0" targetFramework="net452" />
<package id="Microsoft.Owin.Security.Google" version="2.1.0" targetFramework="net452" />
<package id="Microsoft.Owin.Security.Jwt" version="2.1.0" targetFramework="net452" />
<package id="Microsoft.Owin.Security.MicrosoftAccount" version="2.1.0" targetFramework="net452" />
<package id="Microsoft.Owin.Security.OAuth" version="2.1.0" targetFramework="net452" />
<package id="Microsoft.Owin.Security.Twitter" version="2.1.0" targetFramework="net452" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net452" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net452" />
<package id="Owin" version="1.0" targetFramework="net452" />
<package id="RazorEngine" version="3.4.1" targetFramework="net452" />
<package id="System.IdentityModel.Tokens.Jwt" version="3.0.2" targetFramework="net452" />
<package id="System.Spatial" version="5.6.2" targetFramework="net452" />
<package id="WindowsAzure.MobileServices.Backend" version="1.0.390" targetFramework="net452" />
<package id="WindowsAzure.MobileServices.Backend.Entity" version="1.0.390" targetFramework="net452" />
<package id="WindowsAzure.MobileServices.Backend.Tables" version="1.0.390" targetFramework="net452" />
<package id="WindowsAzure.ServiceBus" version="2.3.4.0" targetFramework="net452" />
</packages>
/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>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
<connectionStrings>
<add name="MS_TableConnectionString" connectionString="Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-WebApp2-20160709105105.mdf;Initial Catalog=aspnet-WebApp2-20160709105105;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<!-- Service Bus specific app setings for messaging connections --><add key="PreserveLoginUrl" value="true" />
<!-- Use these settings for local development. After publishing to
Mobile Services, these settings will be overridden by the values specified
in the portal. -->
<add key="MS_MobileServiceName" value="WebApp2" />
<add key="MS_MasterKey" value="Overridden by portal settings" />
<add key="MS_ApplicationKey" value="Overridden by portal settings" />
<add key="MS_MicrosoftClientID" value="Overridden by portal settings" />
<add key="MS_MicrosoftClientSecret" value="Overridden by portal settings" />
<add key="MS_FacebookAppID" value="Overridden by portal settings" />
<add key="MS_FacebookAppSecret" value="Overridden by portal settings" />
<add key="MS_GoogleClientID" value="Overridden by portal settings" />
<add key="MS_GoogleClientSecret" value="Overridden by portal settings" />
<add key="MS_TwitterConsumerKey" value="Overridden by portal settings" />
<add key="MS_TwitterConsumerSecret" value="Overridden by portal settings" />
<add key="MS_AadClientID" value="Overridden by portal settings" />
<add key="MS_AadTenants" value="Overridden by portal settings" />
<!-- When using this setting, be sure to add matching Notification Hubs connection
string in the connectionStrings section with the name "MS_NotificationHubConnectionString". -->
<add key="MS_NotificationHubName" value="Overridden by portal settings" />
<add key="Microsoft.ServiceBus.ConnectionString" value="Endpoint=sb://[your namespace].servicebus.windows.net;SharedSecretIssuer=owner;SharedSecretValue=[your secret]" /></appSettings>
<system.web>
<httpRuntime targetFramework="4.5.2" />
<compilation debug="true" targetFramework="4.5.2" />
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="ApplicationInsightsWebTracking" />
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
</modules>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:bcl="urn:schemas-microsoft-com:bcl">
<dependentAssembly>
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.6.2.0" newVersion="5.6.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.6.2.0" newVersion="5.6.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.6.2.0" newVersion="5.6.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<system.serviceModel>
<extensions>
<!-- In this extension section we are introducing all known service bus extensions. User can remove the ones they don't need. -->
<behaviorExtensions>
<add name="connectionStatusBehavior" type="Microsoft.ServiceBus.Configuration.ConnectionStatusElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="transportClientEndpointBehavior" type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="serviceRegistrySettings" type="Microsoft.ServiceBus.Configuration.ServiceRegistrySettingsElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</behaviorExtensions>
<bindingElementExtensions>
<add name="netMessagingTransport" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingTransportExtensionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="tcpRelayTransport" type="Microsoft.ServiceBus.Configuration.TcpRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="httpRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="httpsRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpsRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="onewayRelayTransport" type="Microsoft.ServiceBus.Configuration.RelayedOnewayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</bindingElementExtensions>
<bindingExtensions>
<add name="basicHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="webHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WebHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="ws2007HttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WS2007HttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="netTcpRelayBinding" type="Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="netOnewayRelayBinding" type="Microsoft.ServiceBus.Configuration.NetOnewayRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="netEventRelayBinding" type="Microsoft.ServiceBus.Configuration.NetEventRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="netMessagingBinding" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</bindingExtensions>
</extensions>
</system.serviceModel></configuration>
vs2015-Azure Mobile Service的更多相关文章
- 如何使用新浪微博账户进行应用登录验证(基于Windows Azure Mobile Service 集成登录验证)
使用三方账号登录应用应该对大家来说已经不是什么新鲜事儿了,但是今天为什么还要在这里跟大家聊这个话题呢,原因很简单 Windows Azure Mobiles Service Authenticatio ...
- windows phone开发-windows azure mobile service使用入门
在使用azure之前,我一直只能做本地app,或者使用第三方提供的api,尽管大多数情况下够用,但是仍不能随心所欲操纵数据,这种感觉不是特别好.于是在azure发布后,我就尝试使用azure来做为个人 ...
- Unable to create Azure Mobile Service: Error 500
I had to go into my existing azure sql database server and under the configuration tab select " ...
- Windows Azure之Mobile Service
我建个android app和Windows Azure的Mobile Service配合,以实现会员注册的功能,实际十分简单,微软家的东西真心好用 首先新建个Mobile Service New-& ...
- Azure Mobile App - Custom Authentication
Custom Authentication: 1. For OLD Mobile Service - https://azure.microsoft.com/en-us/documentation/a ...
- Azure Media Service (1) 使用OBS进行Azure Media Service直播
<Windows Azure Platform 系列文章目录> 今天正好有客户问如何使用OBS进行Azure Media Service直播,我这里简单介绍一下. 先决条件: 1. OBS ...
- Windows Azure Cloud Service (11) PaaS之Web Role, Worker Role(上)
<Windows Azure Platform 系列文章目录> 本文是对Windows Azure Platform (六) Windows Azure应用程序运行环境内容的补充. 我们知 ...
- Windows Azure Cloud Service (12) PaaS之Web Role, Worker Role, Azure Storage Queue(下)
<Windows Azure Platform 系列文章目录> 本章DEMO部分源代码,请在这里下载. 在上一章中,笔者介绍了我们可以使用Azure PaaS的Web Role和Worke ...
- [SDK2.2]Windows Azure Cloud Service (35) 使用VS2013发布Azure Cloud Service
<Windows Azure Platform 系列文章目录> 好久没有更新BLOG了,今天我们继续Windows Azure相关的内容. 笔者最近把Visual Studio升级到了20 ...
随机推荐
- min-height for IE6
1. className{ min-height:500px; height:auto !important; height:500px; } 2. 在做页面布局时遇到了i ...
- java多线程之:SynchronousQueue队列
SynchronousQueue是这样一种阻塞队列,其中每个 put 必须等待一个 take,反之亦然.同步队列没有任何内部容量,甚至连一个队列的容量都没有. 不能在同步队列上进行 peek ...
- solr 主从模式和solrcloud集群模式
主从模式 主节点有单点故障问题:没有主从自动切换,没有failover,主机down掉了的话,整个数据变成只读.并且需要一台机单独做索引,浪费资源,所有数据都需要在这台机器上单独存在一份,索引变化较大 ...
- windows7旗舰版激活密钥永久版免费分享
windows7之家不仅提供精品Win7教程 给大家,加上这个windows7激活密匙还帮大家解决windows7系统激活问题,包括win7旗舰版 windows7安装版这些. 用的是Windows7 ...
- Web.Config文件中使用configSource
我们都知道,在asp.net中修改了配置文件web.config后,会导致应用程序重启,所有会话(session)丢失.然而,应用程序的配置信息放在配置文件里是最佳选择,在后台修改了配置后导致所有会话 ...
- 028. asp.net数据绑定控件值DataList控件
DataList控件可以使用模板与定义样式来显示数据并进行数据的选择, 删除及编辑工作. DataList控件的最大特点是一定要通过模板来定义数据的显示格式. 如果要设计出美观的界面, 就需要花费一番 ...
- 使用Javascript实现跳转页面和打开新窗口的方法
1.在原来的窗体中直接跳转用 window.location.href="你所要跳转的页面url"; 2.在新窗体中打开页面用: window.open('你所要跳转的页面url' ...
- noip2011普及组——数字反转
数字反转 时间限制:1s 内存限制:128MB[问题描述]给定一个整数,请将该数各个位上数字反转得到一个新数.新数也应满足整数的常见形式,即除非给定的原数为零,否则反转后得到的新数的最高位数字不应为零 ...
- 【转】asp.net中利用session对象传递、共享数据[session用法]
来自:http://blog.unvs.cn/archives/session-transfer-method.html 下面介绍Asp.net中利用session对象传递.共享数据用法: 1.传递值 ...
- OpenJudge计算概论-称体重【枚举法、信息数字化】
/*====================================================================== 称体重 总时间限制: 1000ms 内存限制: 655 ...