我正在尝试实现IUpdatable.
错误1'WebRole1.InfoManager'没有实现接口成员'System.Data.Services.IUpdatable.ClearChanges()'我得到的所有错误都说我没有实现所有接口成员,但我实现了一些并非全部.我没有把孔代码我希望你能理解.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Services;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.ServiceRuntime;
using Microsoft.WindowsAzure.StorageClient;
namespace WebRole1
{
public class InfoManager : IUpdatable
{
private TableServiceContext context;
// To Generate DataConnectionString and svcClient
private TableServiceContext GetContext()
{
//Implemented code
}
public CommentManager()
{
context = GetContext();
}
// To get my table infos
public IQueryable<Info> Infos
{
get
{
return context.CreateQuery<Info>("Infos").AsTableServiceQuery();
}
}
// Creating the resource and cheking the compatibility of the type and do an …Run Code Online (Sandbox Code Playgroud) 当Azure平台决定关闭我的一个Web角色实例时,它是如何完成的?
例如,它是否停止发送新请求,但允许现有请求完成?我无法想象它只会终止日常维护的活动连接.这将是极具破坏性和代价高昂的.
任何洞察这个小黑盒子都会很棒,特别是如果你知道MSDN或Azure CAT链接.
我也跟着开始使用Windows Azure的缓存和我不断收到System.Runtime.InteropServices.SEHException:外部组件引发上线异常:
var myCache = new DataCache("default");
Run Code Online (Sandbox Code Playgroud)
我已将WindowsAzure1项目设置为启动项目.我想在调试运行时,从一个MVC API项目访问缓存,但它一直示数出来.有谁知道我可能做错了什么?谢谢.
我正在尝试将Windows Azure网站从云降级到网站.我收到此错误:
无法加载文件或程序集'msshrtmi,Version = 1.7.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一.该系统找不到指定的文件.
[FileNotFoundException:无法加载文件或程序集'msshrtmi,Version = 1.7.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一.系统找不到指定的文件.]
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeEnvironment()+0 Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment..cctor()+546[TypeInitializationException:'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment'的类型初始化程序引发异常.]
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetConfigurationSettingValue(String configurationSettingName)+0
AzureInit.AzureHelper_GetApplicationSettings(String key)+28[HttpException(0x80004005):'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment'的类型初始值设定项引发异常.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context,HttpApplication app)+9859725
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext ,HttpContext上下文,MethodInfo []处理程序)+118
System.Web.HttpApplication.InitSpecial(HttpApplicationState状态,MethodInfo []处理程序,IntPtr appContext,HttpContext上下文)+172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext,HttpContext context)+ 336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)+296[HttpException(0x80004005):'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment'的类型初始值设定项引发异常.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context)+9873912
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)+101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr,HttpContext context)+254
因为我不在云中,我需要这个程序集吗?我如何告诉网站不要寻找它?我已将这些引用添加到我的项目中:
Microsoft.WindowsAzure.CloudDrive Microsoft.WindowsAzure.Diagnostics Microsoft.WindowsAzure.ServiceRuntime Microsoft.WindowsAzure.StorageClient
在我的WorkerRole.cs类中,这是我的代码:
/// <summary>
/// Reads settings from service configuration file.
/// </summary>
/// <param name="key">Setting key.</param>
string AzureHelper_GetApplicationSettings(string key)
{
try
{
return RoleEnvironment.GetConfigurationSettingValue(key);
}
catch
{ …Run Code Online (Sandbox Code Playgroud) 简单的问题,但背后有很多意义/讨论!
是否可以让Windows Azure模拟器将浏览器打开到127.0.0.1和端口81以外的URL?
azure azure-storage azure-storage-blobs azure-web-roles azure-table-storage
我有一个Azure工作者角色(WR),应该使用以下命令从.cscfg文件中获取它的配置:
var setting = CloudConfigurationManager.GetSetting("My.Setting.Name");
Run Code Online (Sandbox Code Playgroud)
在模拟器中运行这很好,我得到:
Getting "My.Setting.Name" from ServiceRuntime: PASS.
Run Code Online (Sandbox Code Playgroud)
信息.但是,当我发布到我的远程环境时,我得到:
Getting "My.Setting.Name" from ServiceRuntime: FAIL.
Getting "My.Setting.Name" from ConfigurationManager: FAIL.
Run Code Online (Sandbox Code Playgroud)
消息.在Azure管理门户的"CloudServices/Configure"部分中,我可以看到配置中列出的设置,并且设置正确.
我正在使用Azure SDK 2.0
azure azure-worker-roles azure-web-roles azure-configuration
我想将我的网站移至 Windows Azure,但需要确保我在所有实例和角色上使用 PFS。(还有常规的网络角色和网站)
我如何配置它以便每个部署都以这种方式自动配置?
cryptography certificate azure azure-web-roles azure-web-app-service
我在两个区域的云服务上部署了两个 Web 应用程序。
我创建了具有性能负载平衡的 Azure 流量管理器
我的云应用程序的 CName 是什么,如何配置此 CName 指向 Azure 流量管理器?
我再也无法部署我的天蓝色webrole,它无限循环.所以我穿上了Intellitrace,我发现了这个异常:
异常:抛出:"由于以下异常,无法加载角色入口点: - System.IO.FileLoadException:无法加载文件或程序集'System.Web.Http,Version = 5.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一.找到的程序集的清单定义与程序集引用不匹配.(HRESULT的异常:0x80131040)
在我的项目中,web.config和包(Webapi,webhost等)都在5.2.0.0中,所以我不明白为什么Azure试图找到5.0.0.0?
例:
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0" />
</dependentAssembly>
Run Code Online (Sandbox Code Playgroud)
你有什么主意吗 ?谢谢
ps:System.Web.Http得到copy local:true
是否可以使用Azure Powershell更新Azure云服务中的设置值?