如何在没有visual studio的情况下运行Asp.net项目(网站) [英] How to run Asp.net project (website) without visual studio

查看:92
本文介绍了如何在没有visual studio的情况下运行Asp.net项目(网站)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我们,我正在视觉工作室创建一个项目网站。我想在没有visual studio任何电脑的情况下运行这个项目。喜欢我的项目直接运行我的frnd pc而不做任何更改?



db也在我的项目中......

plz help me guys i am creating one project website in visual studio . i want to run this project without visual studio any pc . like my project directly run my frnd pc without any changes?

db is also there in my project...

推荐答案

您需要安装IIS才能运行ASP.Net网站。 Visual Studio附带了一个隐藏版本的IIS,这就是为什么你可以通过Visual Studio运行它而不需要实际拥有IIS。



但是,IIS是你必须拥有的。它在微软的网站上是免费的。
You need IIS installed to be able to run an ASP.Net website. Visual Studio comes with a "hidden" version of IIS which is why you can run it through Visual Studio without actually having IIS.

However, IIS is what you must have. It is free on Microsoft's site.


Hello Sandy,你可以在你的机器上托管网站而不需要使用vs.net。只需确保您在系统上安装了IIS。

以下URL将有助于

在IIS 7.0上部署ASP.NET网站 [ ^ ]
Hello Sandy, you can host the website on your machine without having vs.net on it. Just make sure you have IIS setup on the system.
Below URL will help
Deploying ASP.NET Websites on IIS 7.0 [^]


要在不打开Visual Studio的情况下运行应用程序,您需要安装IIS(如rtpHarry所建议的那样)。然后,您需要将您的应用程序放在虚拟目录中。要创建虚拟目录,请执行以下步骤:



在命令提示符下键入inetmgr - >单击确定。

从左侧面板展开.....(本地计算机)

展开网站

右键单击默认网站 - >新 - >虚拟目录....

单击下一步

选择虚拟目录的别名。

单击浏览.. - >在您想要的位置(硬盘驱动器中的任何位置)创建一个新文件夹

单击下一步。

在访问权限窗口中选中所有复选框。

将出现一个警告窗口,单击是。

单击下一步 - >完成。

现在在虚拟目录中创建应用程序。为此在Visual Studio中单击New WebSite,然后在打开的窗口中选择Location DropDownList中的HTTP,然后浏览到您的虚拟目录(在左侧面板中选择Local IIS,目录名称将以其别名出现)并命名您的应用程序(在给虚拟目录的别名后斜杠'/'之后)。



现在,您可以通过在网站中键入网站的路径来运行您的网站运行这样的事情:



http://localhost/vd/MySite/Default.aspx



其中vd是虚拟目录的别名,MySite是网站名称。



希望它能为你提供帮助。
To run the application without opening Visual Studio, You need to install IIS (as rtpHarry has suggested). Then You need to have your application in a virtual directory. To create virtual directory perform following steps:

Type inetmgr at command prompt -> Click OK.
Expand .....(local computer) from the left panel
Expand WebSites
Right Click on Default Web Site -> New -> Virtual Directory....
Click Next
Choose a alias name for the virtual directory.
Click Browse.. -> Make a New Folder at your desired location (anywhere in the Hard Drive)
Click Next.
At Access Permissions window Check all the check boxes.
A warning window will appear, click Yes.
Click Next -> Finish.
Now create your application in the virtual directory. For this in the Visual Studio Click New WebSite, then in the open window choose HTTP in the Location DropDownList, then browse to your virtual directory (choose Local IIS in the left panel, the directory name will appear by its alias name) and name your application (after giving a slash ' / ' to the alias name of virtual directory).

Now you can run your web site by typing the path of your website in the Run window somthing like this:

http://localhost/vd/MySite/Default.aspx

where vd is the alias name of virtual directory and MySite is the web site name.

Hope it'll help you.


这篇关于如何在没有visual studio的情况下运行Asp.net项目(网站)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆