惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
N
News and Events Feed by Topic
S
Schneier on Security
G
GRAHAM CLULEY
Scott Helme
Scott Helme
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
CERT Recently Published Vulnerability Notes
T
The Exploit Database - CXSecurity.com
C
Cisco Blogs
T
The Blog of Author Tim Ferriss
Cisco Talos Blog
Cisco Talos Blog
P
Privacy & Cybersecurity Law Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
Blog — PlanetScale
Blog — PlanetScale
Project Zero
Project Zero
MyScale Blog
MyScale Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
The Last Watchdog
The Last Watchdog
Vercel News
Vercel News
The Cloudflare Blog
C
Check Point Blog
Help Net Security
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
腾讯CDC
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
S
SegmentFault 最新的问题
MongoDB | Blog
MongoDB | Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
AWS News Blog
AWS News Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
S
Securelist
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Vulnerabilities – Threatpost
S
Secure Thoughts

博客园 - Francis Liang

Windows Azure存储容器私有,公共容器,公共Blob的区别 关于Windows Azure 地缘组(Affinity Groups) 创建并使用Windows Azure虚拟机模板 Windows Azure 设置虚拟机静态外网IP地址 Windows Azure 配置多个站点的虚拟网络连接 Windows Azure 虚拟网络配置(Site to Site) Windows Azure 虚拟网络配置(Point to Site) Microsoft Azure云计算第一步—试用帐户申请 拥抱云计算 《Microsoft Office SharePoint Server 2007 Best Practices》书评 修改MOSS2007内容查询部件实现自定义格式显示 [.NET Active Directory开发]根据NativeGuid获取DirectoryEntry实例 IISRESET命令功能新发现 动态改变ASP.net页面标题和动态指定页面样式表 Biztalk Server 2006安装配置 Web开发中对元素样式使用过滤器以增强其可视化效果 使用DIME协议上传文件 使用证书来做RSA非对称式加密 使用MSAgent代替传统的MessageBox提示来增用客户端用户体验
使用Windows Azure创建和发布ASP.NET应用程序
Francis Liang · 2015-01-16 · via 博客园 - Francis Liang

Windows Azure为我们提供了一个功能强大的PaaS平台,使得我们无须部署和维护基础架构就可以根据需求发布开发的应用程序,并且支持多种语言及平台,如:ASP.NET, PHP, Python, Ruby, Java等。

本文将会使用Visual Studio 2013创建一个新的Web应用程序,并具有基本的数据库增、删、改查操作,来演示如何将ASP.NET Web应用程序创建并发布至Windows Azure。

本示例项目源代码可从附件下载

过程:

1. 使用Visual Studio 2013创建一个具有数据操作的ASP.NET Web Application项目

2. 创建Windows Azure Web Site

3. 创建数据库并链接资源

4. 发布Web应用程序

步骤:

1. 使用Visual Studio新建ASP.NET MVC Web应用程序

2. 新建Customer类,作为Entity Framework模型实体类,包含CustomerId, Name, Phone, Address, Company, Title, Email等属性。

3. 创建MVC控制器、模型、视图

    为方便演示,我们采用基架项来简化代码编写,它会帮助我们自动生成控制器、模型、视图来完成数据的增、删、改、查操作

选择“包含视图的 MVC 5 控制器(使用 Entity Framework)”,见下图

模型类:Customer

数据上下文类:CustomerContext

使用异步控制器操作:True

控制器名称:CustomersController

自动生成的CustomersController控制器代码(下图):

4. 接下来,我们需要在Windows Azure中创建一个新网站。

打开Windows Azure Management Portal(https://manage.windowsazure.com),选择新建网站,输入网站的URL及选择区域。

5. 创建网站所需的SQL数据库

指定数据名称,服务层,性能级别,服务器。

6. 创建“链接的资源”

    回到“网站”, 选择“链接资源”,添加刚刚新建的SQL数据库

7. 下载网站的发布配置文件

 回到网站的仪表板中,选择”下载发布配置文件“,将文件下载至本地计算机。

8. 指定项目发布配置文件

回到Visual Studio项目中,对项目进行发布,发布目标选择”导入“,加载上一步中下载的发布配置文件。

根据配置文件中的内容指定服务器、名称、用户名、密码,点击”验证连接“,成功后进行下一步。

发布及数据库配置,这里继续保持默认选择,数据库为第6部中创建的SQL数据库,点击”完成“后进行发布。

9. 浏览发布后的网站

当Visual Studio发布成功后,在浏览器中输入网站地址http://myazurewebsiteproject.azurewebsites.net/Customer,即可打开发布的站点页面。

进行添加、修改、删除等操作.

 文中示例项目下载:AzureWebSiteProject