在Windows Azure门户上(截至2013年1月)当我将Windows Azure网站实例从1扩展到6时,我会得到什么?这是否意味着我的网站将在同一台服务器上有6个物理实例?在IIS术语中有6个运行的网站都自动负载均衡?
但从帮助文本来看,它将实例称为进程?如果是这样,我的网站将获得6个CPU,RAM或什么?

干杯
可以通过WebRole.cs OnStart()方法运行一个线程,以便我们能够通过aspx页面访问它来执行后台工作吗?我知道正确的方法是使用工作者角色,但我希望尽可能降低运行成本.
我的想法是创建一个始终在运行并等待作业的线程,例如,如果我想进行阻塞操作,如发送电子邮件,我会使用提供SendEmail方法的线程,是否可以这样做?如果是这样,你能否提供一些可以指引我正确方向的例子?
在Windows Azure上部署新的Web角色时,我收到此错误: 无法为部署在指定虚拟网络中包含的新子网或预定义子网中分配所需的地址空间. 我已经找到了解决方案,但没有找到解决方案.有人有想法吗?
我的cscfg文件如下所示:
<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="Application.Cloud" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="3" osVersion="*" schemaVersion="2013-03.2.0">
<Role name="WebApplication" vmName="vm001">
<Instances count="1" />
<ConfigurationSettings>
...
</ConfigurationSettings>
<Certificates>
<Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="..." thumbprintAlgorithm="sha1" />
</Certificates>
</Role>
<Role name="Application.ServiceOpdrachten" vmName="vm002">
<Instances count="1" />
<ConfigurationSettings>
...
</ConfigurationSettings>
<Certificates>
<Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint=".." thumbprintAlgorithm="sha1" />
</Certificates>
</Role>
<NetworkConfiguration>
<VirtualNetworkSite name="VirtualNetwork" />
<!-- The virtual network name must match the name of the vvirtual network configured in your subscription. -->
<AddressAssignments>
<!-- You must map each role in your cloud …Run Code Online (Sandbox Code Playgroud) 从托管在Azure的Web角色我们的开发/测试环境中大量的调试后,即突然停止使用Chrome 34的工作,我们认识到Chrome的忽略与域名".cloudapp.net"的Cookie设置Cookie响应( Azure中云服务的默认公共Microsoft域).我们选择此名称的原因是能够在不同的云服务之间生成CORS请求,这些请求需要来自同一javascript应用程序的安全请求.这意味着获得从MVC网站的验证cookie一样http://example.cloudapp.net和像调用另一个Web角色安全的WebAPI REST服务http://exampleServices.cloudapp.net(仅适用于具有相同的域名饼干)
以下是生成身份验证cookie的云服务的身份验证响应示例:
Access-Control-Allow-Credentials:true
Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Origin:http://example.cloudapp.net
Cache-Control:private
Content-Length:31
Content-Type:application/json; charset=utf-8
Date:Fri, 11 Apr 2014 20:21:20 GMT
Server:Microsoft-IIS/8.0
Set-Cookie:.COOKIENAME=XXXXXXXXXXXXXXXXXXXX; domain=.cloudapp.net; path=/; HttpOnly
Run Code Online (Sandbox Code Playgroud)
我们面临的问题是,使用此域名在Chrome34中放弃了Cookie,因此任何其他请求都未经过身份验证.我们可以购买公共域并在azure中设置我们的云服务,但我想知道是否有任何解决此问题的方法.
我正在寻找验证用户登录属于角色的功能.可能是以下几点?
pageContext.request.userPrincipal.roles
Run Code Online (Sandbox Code Playgroud)
我应该如何与JSTL一起正确使用它来测试用户是否属于ADMIN组?
我有一个部署到Azure Web角色(云服务,而不是Azure Web站点)的SignalR解决方案,为了确保我们可以最大化每个实例的连接数,我需要对各种ASP.NET设置进行一些更改,如详细在这篇文章中:http://www.asp.net/signalr/overview/performance/signalr-performance#tuning
使用APPCMD进行相关更改的启动任务可以轻松更改appConcurrentRequestLimit和requestQueueLimit设置.但是,maxConcurrentRequestsPerCPU设置驻留在aspnet.config文件中,该文件无法通过相同的机制进行更改.
我尝试直接使用启动任务更新该文件(现在只是一个基本文件替换),但是在启动任务完成后似乎被Azure运行时替换,因此更改丢失了.我可以RDP进入机器并手动进行更改,因此我已经看到它可以工作,但对于我们希望按需扩展和缩小的服务而言,这是不可持续的.
有关如何在Azure环境中更改此设置的任何想法将不胜感激!
我已经远远地看了解答案.在Visual Studio 2013中,我可以轻松地创建WebRole和WorkerRole解决方案,但在VS 2015中,我似乎只能创建一个网站和WebJob.
WebRole和WorkerRole已被删除吗?如果没有,你可以向我解释它在哪里 - 或者为什么它会丢失?
azure-worker-roles azure-web-roles azure-webjobs visual-studio-2015
我有两个Web角色,其中一个运行服务层,包括与net.tcp连接的3个WCF服务,每个服务部署为端口808,810和811上的网站.
现在我希望服务层只对我的其他Web角色开放.
因此,我尝试将其中一个服务端点设置为内部,并为我的前端Web角色提供访问权限.
像这样:
<ServiceDefinition name="MagnusAzureCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2015-04.2.6">
<WebRole name="Core.Services" vmsize="Small">
<Runtime executionContext="elevated" />
<Startup>
<Task commandLine="Startup/startup.cmd" executionContext="elevated" taskType="background" />
</Startup>
<Sites>
<Site name="Core" physicalDirectory="C:\CoreServices">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" />
</Bindings>
</Site>
<Site name="Store" physicalDirectory="C:\StoreServices">
<Bindings>
<Binding name="Endpoint3" endpointName="Endpoint3" />
</Bindings>
</Site>
<Site name="Users" physicalDirectory="C:\UserServices">
<Bindings>
<Binding name="Endpoint4" endpointName="Endpoint4" />
</Bindings>
</Site>
</Sites>
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" />
</ConfigurationSettings>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="8282" />
<InputEndpoint name="Endpoint3" protocol="http" port="81" />
<InputEndpoint name="Endpoint4" protocol="http" port="8181" />
<InputEndpoint name="Endpoint2" protocol="tcp" port="808" localPort="808" /> …
我在.Net中有一个空白的解决方案,并在解决方案中添加两个Azure云服务项目.一个是WebRole,另一个是WorkerRole.我可以在一个cloudservice实例中托管这两个项目,还是需要两个项目分开.
azure azure-worker-roles azure-web-roles azure-cloud-services
azure-web-roles ×10
azure ×7
appcmd ×1
asp.net ×1
asp.net-mvc ×1
azure-devops ×1
c# ×1
cloud ×1
cookies ×1
jsp ×1
jstl ×1
signalr ×1
wcf ×1