我目前正在将公司的所有应用程序迁移到Azure平台.我们有4个Web应用程序和一个Windows服务.
我不确定是否应该将每个网站部署为云端服务或网站.
我已经阅读了一些关于这两者之间差异的文章,但我仍然不明白为什么人们会选择Cloud Service over Website作为一家规模较小的公司.
除此之外,我还遇到了一个建议,即简单地获取单个虚拟机并将所有应用程序(包括Windows服务)部署到该虚拟机并完成它.你怎么看待这件事?
我使用azure来部署我的新Web API,我是在IIS和azure上部署的新手.
我已将我的Web API添加到azure作为Web应用程序,并且它工作正常,直到我添加了每个API函数的文档.添加说明后,我从HelpPageConfig.cs中取消注释以下行.
config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("~/App_Data/XmlDocument.xml")));
Run Code Online (Sandbox Code Playgroud)
它在本地运行finr,我能够看到所有描述,但是当我在azure上发布它时,我收到错误说,
Could not find a part of the path 'D:\home\site\wwwroot\App_Data\XmlDocument.xml'.
Run Code Online (Sandbox Code Playgroud)
网站网址:http://mejodo.azurewebsites.net/
我需要改变路径吗?
文件已在我的系统中的D:\ home\site\wwwroot\App_Data目录中创建.
我需要做些什么改变才能让它发挥作用?
asp.net asp.net-mvc-4 asp.net-web-api azure-web-sites asp.net-web-api-helppages
我只是想更新Azure存储,但这样做意味着我需要更新ImageResizer AzureReader和更新应用使用的.Net 4.5.2(Azure的网站设置为.NET 4.6).现在我已经掌握了最新版本的所有内容; 我已经清理并重建了应用程序.它在本地工作正常,但当我将其发布到Azure时,我收到以下错误.我无法加载诊断页面.
Server Error in '/' Application.
Could not load type 'ImageResizer.Util.BundleAttribute' from assembly 'ImageResizer, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null'.
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: System.TypeLoadException: Could not load type 'ImageResizer.Util.BundleAttribute' from assembly 'ImageResizer, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null'.
Source Error:
An unhandled exception was generated during the execution of the current web …Run Code Online (Sandbox Code Playgroud) 我有一个基于Laravel 4的PHP应用程序,我已经成功地在Azure Web应用程序中工作,我遇到的唯一问题是当我尝试访问文件时,example.azurewebsites.net/js/vendor/jquery.slicknav.min.js我得到"您无权查看此目录或页面. " 响应.
该文件夹site/wwwroot是我放置所有Laravel应用程序文件的地方,对于那些不熟悉Laravel的人,它包含四个文件夹:app,Bootstrap,public和vendor.
我已在Azure门户中设置虚拟应用程序和目录设置,以映射/到site\wwwroot\public公共目录并在其中放置web.config文件,其中包含以下内容:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true"/>
<staticContent>
<remove fileExtension=".svg" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" />
</staticContent>
<httpProtocol>
<customHeaders>
<add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains"/>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="X-Requested-With,Content-Type" />
<add name="Access-Control-Allow-Methods" value="POST,GET,OPTIONS,DELETE,PUT,PATCH" />
</customHeaders>
</httpProtocol>
<rewrite>
<rules>
<rule name="Laravel4" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add …Run Code Online (Sandbox Code Playgroud) 据我了解,如果有人不想使用自定义域名,而是打算使用Azure分配给网站的* .azurewebsite.net域,则HTTPS已通过Microsoft的证书启用(我知道这不是使用自定义域名是安全的)。我将如何以编程方式加载此证书。当前,我使用以下方法从本地计算机或Azure加载证书:
public static X509Certificate2 LoadFromStore(string certificateThumbprint,bool hostedOnAzure)
{
var s = certificateThumbprint;
var thumbprint = Regex.Replace(s, @"[^\da-zA-z]", string.Empty).ToUpper();
var store = hostedOnAzure ? new X509Store(StoreName.My, StoreLocation.CurrentUser) : new X509Store(StoreName.Root, StoreLocation.LocalMachine);
try
{
store.Open(OpenFlags.ReadOnly);
var certCollection = store.Certificates;
var signingCert = certCollection.Find(X509FindType.FindByThumbprint, thumbprint, false);
if (signingCert.Count == 0)
{
throw new FileNotFoundException(string.Format("Cert with thumbprint: '{0}' not found in certificate store. Also number of certificates in the sotre was {1}", thumbprint, store.Certificates.Count));
}
return signingCert[0];
}
finally
{
store.Close();
}
} …Run Code Online (Sandbox Code Playgroud) 为什么Azure Application Insights报告的IP地址与标准Google搜索(我的IP是什么)之间存在差异?
azure google-search azure-web-sites azure-application-insights azure-app-service-plans
Azure AD身份验证通过Visual Studio在本地运行良好.出版后; 我转到URL(https://mydomain.azurewebsites.net/),它被重定向到登录页面.此时地址栏的数据低于数据(注意:某些敏感数据已被删除).
https://login.microsoftonline.com/guid/oauth2/authorize?response_type=code id_token&redirect_uri = https://mydomain.azurewebsites.net/.auth/login/aad/callback&client_id = myclientid&scope = openid profile email&response_mode = form_post&nonce = noncevalue&状态=导向=%2F
现在有两个问题与上面的数据
第一个问题,这里提到的client_id = myclientid不再存在,我已将其从目录中删除.我为这个客户端ID搜索我的代码(find-in-file),以确保我没有错误地引用它.我在代码中找不到引用.
然后我复制了正确的client_id,替换为上面的url并重试.此时它让我登录并显示错误的请求消息.
第二个问题重定向网址https://mydomain.azurewebsites.net/.auth/login/aad/callback不是我配置的!!!(我把它设置为https://mydomain.azurewebsites.net)Azure有附加.auth/login/aad/callback部分
这肯定是一个配置问题.
以前有人遇到过这种问题吗?
我的Azure上的WebApp有点问题.我的自定义字体在我的localhost上正确呈现,但是当我将项目部署到Azure并访问WebSite时,WebBrowser通知我无法找到我的字体(错误404).但是,当我从Azure门户访问FTP服务器时,我可以找到这些字体.我也试过这个链接的解决方案:http: //www.codepal.co.uk/show/WOFF_files_return_404_in_Azure_Web_Sites
但遗憾的是没有任何进展.
我创建了一个vueJs应用程序.
我想将它部署在Azure Web应用程序上.
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"prod": "webpack --progress --config build/webpack.prod.conf.js",
"start": "npm run prod",
"lint": "eslint --ext .js,.vue src",
"build": "node build/build.js"
},
"dependencies": {
"moment": "^2.20.1",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"webpack": "^3.6.0"
}
Run Code Online (Sandbox Code Playgroud)
这就是package.json的样子
部署时,我从Azure获得以下错误.
webpack:找不到
错误日志
INFO - Container logs
Generating app startup command
Found scripts.start in package.json
Running npm start
> myapp@1.0.0 start /home/site/wwwroot
> npm run prod
> myapp@1.0.0 prod /home/site/wwwroot
> webpack --progress --config build/webpack.prod.conf.js
sh: 1: webpack: not …Run Code Online (Sandbox Code Playgroud) 从5到6个月以来,我一直在Azure门户上托管我的客户端(Web应用程序)和服务(Web API)应用程序。
自同一天托管我的应用程序以来,我面临的问题是,当我第一次调用我的api从客户端Web应用程序加载下拉列表时,这给了我一段时间超时错误,但有时它花费的时间比预期的多来自api的结果,因此客户端必须等待响应到来。
第一次成功尝试后,它的运行速度比预期的要快,但第一次它会由于延迟获取结果而工作了一段时间,或者有时会抛出超时错误。
我曾经使用调度程序来不时调用api,但这也没有帮助。
任何人都可以分享的其他想法,我会很高兴,并在此先感谢。
azure-web-sites ×10
azure ×7
c# ×3
asp.net-mvc ×2
.net ×1
asp.net ×1
imageresizer ×1
php ×1
ssl ×1
timeout ×1
vue.js ×1
webpack ×1