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

推荐订阅源

G
Google Developers Blog
Spread Privacy
Spread Privacy
V
Visual Studio Blog
爱范儿
爱范儿
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
B
Blog RSS Feed
博客园 - 【当耐特】
有赞技术团队
有赞技术团队
The Register - Security
The Register - Security
Latest news
Latest news
The Cloudflare Blog
Project Zero
Project Zero
月光博客
月光博客
U
Unit 42
Vercel News
Vercel News
Attack and Defense Labs
Attack and Defense Labs
Know Your Adversary
Know Your Adversary
V
Vulnerabilities – Threatpost
F
Full Disclosure
Schneier on Security
Schneier on Security
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
L
Lohrmann on Cybersecurity
C
CERT Recently Published Vulnerability Notes
博客园 - 叶小钗
腾讯CDC
博客园 - 三生石上(FineUI控件)
T
The Blog of Author Tim Ferriss
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - Franky
S
Security Affairs
Hacker News: Ask HN
Hacker News: Ask HN
Security Latest
Security Latest
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
MongoDB | Blog
MongoDB | Blog
D
DataBreaches.Net
SecWiki News
SecWiki News
Recorded Future
Recorded Future
NISL@THU
NISL@THU
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cloudbric
Cloudbric

博客园 - 深瞳

懒惰化、标准化、自动化——工具化--利用合适的工具构建流水线软件过程 脚本语言的游戏开发 准妈妈必听的十首乐曲完全版 [原创]Flex和PHP脚本的整合(2)--AMFPHP篇 [原创]Flex和PHP脚本的整合(1)--XML篇 夜如深瞳,瞳深如夜 新一波VB.NET升级需求涌现 使用VS2005的WEB部署工程 VS2005web应用程序项目教程(7)Upgrading VS 2003 Web Projects to be VS 2005 Web Application Projects VS2005web应用程序项目教程(6)Creating and Using User Control Libraries VS2005web应用程序项目教程(5)Using Master Pages and Site Navigation VS2005web应用程序项目教程(4)Data Binding against Objects VS2005web应用程序项目教程(3)Building Pages with VS 2005 Web Application Projects VS2005web应用程序项目教程(2)Code-Behind with VS 2005 Web Application Projects 在.net开发中几个重要的认识误区 CSVS 和CSSDK 的区别 ASP.net(1.1)原理学习笔记--第十一章 安全性Security ASP.net(1.1)原理学习笔记--第十章 状态管理State Management ASP.net(1.1)原理学习笔记--第九章 缓存Caching
VS2005web应用程序项目教程(1)Building Your First Web Application Project
深瞳 · 2006-01-31 · via 博客园 - 深瞳

Visual Studio 2005 Web Application Projects provide a companion web project model option for Visual Studio 2005 that works like the Visual Studio 2003 project model and can be used as an alternative to the built-in web-site based solution.   This tool is perfect for working with existing Visual Studio 2003 projects!
Download URL:
http://download.microsoft.com/download/6/3/7/637980F5-34DF-4A85-B9E1-98B1E1323B2F/Setup.msi
Tutorial URL:
http://webproject.scottgu.com/CSharp/HelloWorld/HelloWorld.aspx

Tutorial 1: Building Your First Web Application Project

The below tutorial walks-through how to create, build and run your first web app using C# and the ASP.NET Web Application Project support in VS 2005.

Creating a New Project

Select File->New Project within the Visual Studio 2005 IDE. This will bring up the New Project dialog. Click on the “Visual C#” node in the tree-view on the left hand side of the dialog box and choose the "ASP.NET Web Application" icon:

Choose where you want the project to be created on disk (note that there is no longer a requirement for web projects to be created underneath the inetpub\wwwroot directory -- so you can store the project anywhere on your filesystem). Then name it and hit ok.

Visual Studio will then create and open a new web project within the solution explorer. By default it will have a single page (Default.aspx), an AssemblyInfo.cs file, as well as a web.config file. All project file-meta-data is stored within a MSBuild based project file.

Opening and Editing the Page

Double click on the Default.aspx page in the solution explorer to open and edit the page. You can do this using either the HTML source editor or the design-view. Add a "Hello world" header to the page, along with a calendar server control and a label control (we'll use these in a later tutorial):

Build and Run the Project

Hit F5 to build and run the project in debug mode. By default, ASP.NET Web Application projects are configured to use the built-in VS web-server (aka Cassini) when run. The default project templates will run on port 8080 as a root site (http://localhost:8080/):

You can end the debug session by closing the browser window, or by choosing the Debug->Stop Debugging (Shift-F5) menu item.

Looking under the covers

When you compile/build ASP.NET Web Application projects, all code-behind code, embedded resources, and standalone class files are compiled into a single assembly that is built in the \bin sub-directory underneath the project root (note: you can optionally change the location if you want to - for example, to build it into a parent application directory).

If you choose the "Show All Files" button in the solution explorer, you can see what the result of our compilation output looks like:

This works exactly the same as with Visual Studio 2003 ASP.NET Web Application Projects

Customizing Project Properties

ASP.NET Web Application Projects share the same configuration settings and behaviors as standard VS 2005 class library projects. You access these configuration settings by right-clicking on the project node within the Solution Explorer in VS 2005 and selecting the "Properties" context-menu item. This will then bring up the project properties configuration editor. You can use this to change the name of the generated assembly, the build compilation settings of the project, its references, its resource string values, code-signing settings, etc:

ASP.NET Web Application Projects also add a new tab called "Web" to the project properties list. Developers use this tab to configure how a web project is run and debugged. By default, ASP.NET Web Application Projects are configured to launch and run using the built-in VS Web Server (aka Cassini) on port 8080 of the machine.

This port number can be changed if this port is already in use, or if you want to specifically test and run using a different number:

Alternatively, Visual Studio can connect and debug IIS when running the web application. To use IIS instead, select the "Use IIS Web Server" option and enter the url of the application to launch, connect-to, and use when F5 or Control-F5 is selected:

Note that ASP.NET Web Application Projects do not automatically create the IIS vroot or application for you. Instead, you should use the IIS Admin Tool to create an IIS application that points to the root of the ASP.NET Web Application Project on disk. Important: Make sure any web applications you create in the IIS Admin tool are configured to use ASP.NET 2.0.

Then configure the url to this application in the above property page for the web project. When you hit F5 in the project, Visual Studio will then launch a browser to that web application and automatically attach a debugger to the web-server process to enable you to debug it.