一个 ASP.NET Web 应用程序,可作为团队开发多个项目,轻松更新!

发布于 2024-10-31 19:51:34 字数 768 浏览 3 评论 0原文

我想设计一个可在多个项目中工作的 ASP.NET 应用程序,

我在 Visual Studio 中使用了 Web 应用程序项目 并将一个项目中应用程序的每一部分编译在一个dll中。

问题是如何在 IIS 中实现它,让我和我的朋友(开发人员)在自己的项目中工作,而不会在 make build 时停止或让其他人工作缓慢 因为构建将在同一个 bin 中,以便在一个应用程序中全部工作,

我认为在网站之外的运行 bin 文件夹或多 bin 文件夹中 但没能做到这一点,

也想过让IIS虚拟目录中的每个部分或应用程序都使用自己的bin,但也永远不要使用自己的bin文件夹,尤其是在将虚拟目录转换为应用程序时。

我尝试将 dll 添加到 GAC,但我在更新 dll 中发现了问题,将导致重新启动所有 iis,这将重新启动所有工作,因为我不希望...

如此友善,如果这里有人给我建议

更新

我正在使用 url 重写,因此我从虚拟目录或应用程序加载用户控件,而不是直接加载 aspx 文件,并且在执行此操作时,不会在虚拟目录或应用程序中加载 bin

更新 2

感谢您的评论,并据此; 分割项目可以在IIS7内的虚拟应用程序中工作,每个虚拟应用程序将使用自己的bin,但每个虚拟应用程序(项目)只有用户控件,并且我们使用urlrewrite,因此在加载用户控件和url时不包括虚拟应用程序路径,其所需的 bin 来自根目录,而不是来自虚拟应用程序

我的问候

i want to design an asp.net application to be worked from multiple projects,

i have used web application projects in visual studio
and make every part of application in one project compiled in one dll.

the problem is how can make it in IIS with a way allow me and my friends (developers) to work in his own project without stopping or make others work slow when make build
because the build will be in same bin to be worked all in one application

i thought in run bin folder outside website or multi bin folders
but failed to make this

also thought to make it in IIS virtual directory for every part or application to use its own bin, but also never use its own bin folder especially in convert virtual directory to application.

i tried to add dll to GAC but i found problems in update dll, will cause restart all iis, and this will restart all work as i do not want ...

so kindly, if any one here have an advice to me

UPDATE

i am using url rewrite so i am loading usercontrols from virtual directory or application not loading direct aspx files, and when doing that not loading bin inside virtual directory or application

UPDATE 2

Thanks for comments, and According to that;
to split projects may work in virtual application inside IIS7, and each virtual application will work with its own bin, but each virtual application (project) only have usercontrols and we are using urlrewrite, so when load usercontrol and url not include the virsual application path, its required bin from root not from virtual application

My Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

五里雾 2024-11-07 19:51:34

在我看来,你们都在针对一个中央服务器进行开发,这将是我的第一条建议:

Each developer develops against a local dev server, not production

使用某种分布式源代码控制(MercurialGit) 允许开发团队轻松提交和分支。

我明确建议您在开发时不要让您和您的朋友在正在运行的服务器上乱搞。使用本地开发服务器进行开发,然后在准备好推送时部署到生产环境。

更新

听起来像虚拟应用程序主机名,编辑主机文件可能有帮助。尝试以下操作:

  • 在 IIS 中设置应用程序时,为其指定主机名以及物理路径和名称。类似于 www.myapp.localdev,这样就可以明显看出您处于开发环境中。
  • 如果在 Windows 上工作,请打开 \System32\drivers\etc\hosts 并添加以下行:

    <预><代码>127.0.0.1 www.myapp.localdev

现在,对 www.myapp.localdev 的任何请求都将被重定向到您的本地主机,这将使用您的本地主机进行解析IIS 的本地实例。由于您已使用此主机名配置虚拟应用,因此您的应用应该正在侦听这些请求。除此之外,您还必须将应用程序配置为在本地运行,但这至少应该让您走上这条路。

It sounds to me like you are ALL developing against one central server, which would be my first piece of advice:

Each developer develops against a local dev server, not production

Use some kind of distributed source control (Mercurial or Git) which allows teams of developers to commit and branch easily.

I would explicitly advise you to NOT have you and your friends all mucking around in your running server while you are developing. Use local dev servers for development, then deploy to production when you are ready for a push.

UPDATE:

It sounds like a virtual application host name and edit to hosts file might help. Try this:

  • When you set up your app in IIS, give it a hostname as well as a physical path and name. Something similar to www.myapp.localdev, this way it is blatently obvious that you're in your dev environment.
  • If working on windows, open \System32\drivers\etc\hosts and add the following line:

    127.0.0.1       www.myapp.localdev
    

Now, any requests to www.myapp.localdev will be redirected to your localhost, which will resolve with your local instance of IIS. Since you've configured your virtual app with this hostname, your app should be listening for these requests. Beyond that, you will have to configure your app to run locally, but this should at least get you going on that path.

々眼睛长脚气 2024-11-07 19:51:34

听起来您需要源代码控制和本地开发人员实例的组合。

您尝试做的事情与其他人所做的并没有什么不同。大多数人都是这样做的:

1)使用源代码控制。您可以在 https://github.com/ 尝试 git。您需要将源代码添加到 git 项目中,然后所有其他开发人员将能够保持同步。它将为您提供每次更改的完整历史记录,并且您可以返回到旧版本。

这是一篇引用 git 的文章:Git 简介和实际使用模式

2) 您所有的开发人员都需要本地实例。 Visual Studio 本身可以托管 ASP.NET 项目。您还可以安装 IIS(如果需要,还可以安装 SQL Server)。设置和使用非常简单。

您可以在此处找到有关如何将 Visual Studio 与 IIS 结合使用的说明:http://learn.iis.net/page.aspx/387/using-visual-studio-2008-with-iis-7/

通过执行这两件事,每个开发人员都可以独立工作。准备就绪后,即可将更改推送到生产服务器。

It sounds like you need a combination of source control and local developer instances.

What you're trying to do isn't unlike what everyone else does. This is how most people do it:

1) Use source control. You can try git at https://github.com/. You need to add your source code to a git project, then all your other developers will be able to stay in sync. It will give you a complete history of every change that takes place and you'll be able to go back to old versions.

Here is a post with references to git: Introduction to Git and practical usage patterns

2) All your developers need local instances. Visual Studio can host ASP.NET projects itself. You can also install IIS (And SQL Server if you need). It's very easy to setup and use.

You can find directions on how to use Visual Studio with IIS here: http://learn.iis.net/page.aspx/387/using-visual-studio-2008-with-iis-7/

By doing these two things, each developer can work independently. Once you're ready, then you push your changes to your production server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文