As an ASP.NET Web Developer using Visual Studio, should I have IIS installed?

时间:2020-11-29 03:33:24

We do ASP.NET Development using Visual Studio.

我们使用Visual Studio进行ASP.NET开发。

A discussion point we've just had is whether or not our developers should have IIS installed.

我们刚才讨论的一个问题是我们的开发人员是否应该安装IIS。

With the ASP.NET Development Server you can run your web apps without IIS. Once you're happy with everything you can then deploy it to a test server running IIS and then onto Live.

使用ASP.NET Development Server,您可以在不使用IIS的情况下运行Web应用程序。一旦您对所有内容感到满意,您就可以将其部署到运行IIS的测试服务器上,然后再部署到Live上。

In my opinion, all developers should also have IIS installed on their own machines as that will eventually be the end platform for the application.

在我看来,所有开发人员也应该在自己的机器上安装IIS,因为这最终将成为应用程序的最终平台。

The arguments are basically if the developer should have as close to "live" an environment as possible, or if the developer should only have the tools they require and not be cluttered with other things.

基本上,如果开发人员应该尽可能地“生活”一个环境,或者开发人员应该只拥有他们需要的工具而不是其他东西混乱。

None of this is missions critical and I'm sure everyone will have a differing opinion. I'm just interested to hear some of them!

这些都不是关键任务,我相信每个人都会有不同意见。我只是想听听他们中的一些!

Robin

8 个解决方案

#1


7  

I'm going to say unequivocally yes. IIS and Cassini are not the same and not exposing your code to production conditions can cause you problems. Better to get yourself in the habit as early as possible.

我会毫不含糊地说是的。 IIS和Cassini不一样,不将代码暴露给生产条件会导致问题。最好尽早养成自己的习惯。

(obviously you can replace "IIS" with "Apache" or whatever your webserver tech is)

(很明显,您可以将“IIS”替换为“Apache”或任何您的网络服务器技术)

#2


1  

I would say that you don't need to have IIS installed, but that you should test on IIS at some point.

我会说你不需要安装IIS,但是你应该在某些时候在IIS上进行测试。

The Development Web Server has two "issues":

Development Web Server有两个“问题”:

  • it only works for local requests
  • 它只适用于本地请求

  • ALL requests are passed through ASP.net
  • 所有请求都通过ASP.net传递

Especially the second point can really open ways to shoot you in the foot. "Why can people access SuperSecretPicture.jpg? I have a Handler in my Web.config that blocks that!".

特别是第二点可以真正打开射击你的方法。 “为什么人们可以访问SuperSecretPicture.jpg?我的Web.config中有一个阻止它的Handler!”。

But if you know about those limitations, then I find that the Development Web Server is better to start with since you can first focus on your code and then about your environment, but YMMV.

但是如果您了解这些限制,那么我发现开发Web服务器最好先开始,因为您可以首先关注您的代码,然后关注您的环境,但是YMMV。

#3


1  

The bottom line is if your application is served by IIS, you should be testing on IIS. If that means IIS on your local machine or a dev server is up to you.

最重要的是,如果您的应用程序由IIS提供,您应该在IIS上进行测试。如果这意味着本地计算机上的IIS或开发服务器由您决定。

#4


1  

What harm can it do having it installed? At least if you have it installed you can choose to use it or not. The day you need to debug a webservice call from an externally hosted application you don't want to be messing around installing it.

安装它会有什么危害?至少如果安装了它,您可以选择是否使用它。您需要从外部托管的应用程序调试Web服务调用的那一天,您不希望乱七八糟地安装它。

#5


1  

Depends - are you running server versions of windows for you dev boxes?

取决于 - 您是否为您的开发盒运行服务器版本的Windows?

Because, e.g. the XP version of IIS is different from 2000/2003 server, so you'll get a different experience. Similarly, if you develop on Vista but plan to deploy on 2003, it won't be a "complete" experience.

因为,例如XP版本的IIS与2000/2003服务器不同,因此您将获得不同的体验。同样,如果您在Vista上开发但计划在2003年部署,那么它将不是一个“完整”体验。

#6


0  

We have IIS installed on our local machines at our work for development purposes. We need to test the web applications against IIS, but neither do we want to release it to our live server, or to our test server as that requires a lot of work. Instead, we just host it locally and everytime we modify a file through Visual Studio we can then instantly see the changes without having to go through a file copying process.

我们在本地机器上安装了IIS用于开发目的。我们需要针对IIS测试Web应用程序,但我们也不想将它发布到我们的实时服务器或我们的测试服务器,因为这需要大量的工作。相反,我们只是在本地托管它,每次我们通过Visual Studio修改文件时,我们都可以立即查看更改,而无需通过文件复制过程。

I don't think it's a bad thing at all, as long as everything's secure you'll be fine.

我认为这根本不是一件坏事,只要一切都安全,你就没事。

#7


0  

Ideally your test server should mirror your production server. That should go without saying. In my opinion, your dev environment should come as close as possible, while fulfilling your needs first (I prefer to keep the dev environment as self-sustaining as possible, in case I am disconnected from the network).

理想情况下,测试服务器应该镜像生产服务器。这应该是不言而喻的。在我看来,您的开发环境应尽可能接近,同时满足您的需求(我更愿意保持开发环境尽可能自我维持,以防我与网络断开连接)。

I have no problem using the dev server for development, and IIS (locally or remote, as the case may be) for testing - but it depends on the project requirements too. I prefer to host web services on the local IIS server, for example. YMMV.

使用开发服务器进行开发和使用IIS(本地或远程,视情况而定)进行测试没有问题 - 但它也取决于项目要求。例如,我更喜欢在本地IIS服务器上托管Web服务。因人而异。

#8


0  

We develop on laptops using virtual machines. This way, if the virtual OS crashes (or the host OS, for that matter) you just copy your vpc back over from the network (where we have backups) and you are good to go. also, it makes it WAY easier to run a "standard" development platform wich is as close to production as possible.

我们使用虚拟机在笔记本电脑上开发。这样,如果虚拟操作系统崩溃(或主机操作系统,那么)你只需要从网络(我们有备份)复制你的vpc,你就可以了。此外,它使运行“标准”开发平台更容易,尽可能接近生产。

For us, we HAVE to have IIS installed, as we are developing Sharepoint '07 webparts.

对于我们来说,我们必须安装IIS,因为我们正在开发Sharepoint '07 webparts。

#1


7  

I'm going to say unequivocally yes. IIS and Cassini are not the same and not exposing your code to production conditions can cause you problems. Better to get yourself in the habit as early as possible.

我会毫不含糊地说是的。 IIS和Cassini不一样,不将代码暴露给生产条件会导致问题。最好尽早养成自己的习惯。

(obviously you can replace "IIS" with "Apache" or whatever your webserver tech is)

(很明显,您可以将“IIS”替换为“Apache”或任何您的网络服务器技术)

#2


1  

I would say that you don't need to have IIS installed, but that you should test on IIS at some point.

我会说你不需要安装IIS,但是你应该在某些时候在IIS上进行测试。

The Development Web Server has two "issues":

Development Web Server有两个“问题”:

  • it only works for local requests
  • 它只适用于本地请求

  • ALL requests are passed through ASP.net
  • 所有请求都通过ASP.net传递

Especially the second point can really open ways to shoot you in the foot. "Why can people access SuperSecretPicture.jpg? I have a Handler in my Web.config that blocks that!".

特别是第二点可以真正打开射击你的方法。 “为什么人们可以访问SuperSecretPicture.jpg?我的Web.config中有一个阻止它的Handler!”。

But if you know about those limitations, then I find that the Development Web Server is better to start with since you can first focus on your code and then about your environment, but YMMV.

但是如果您了解这些限制,那么我发现开发Web服务器最好先开始,因为您可以首先关注您的代码,然后关注您的环境,但是YMMV。

#3


1  

The bottom line is if your application is served by IIS, you should be testing on IIS. If that means IIS on your local machine or a dev server is up to you.

最重要的是,如果您的应用程序由IIS提供,您应该在IIS上进行测试。如果这意味着本地计算机上的IIS或开发服务器由您决定。

#4


1  

What harm can it do having it installed? At least if you have it installed you can choose to use it or not. The day you need to debug a webservice call from an externally hosted application you don't want to be messing around installing it.

安装它会有什么危害?至少如果安装了它,您可以选择是否使用它。您需要从外部托管的应用程序调试Web服务调用的那一天,您不希望乱七八糟地安装它。

#5


1  

Depends - are you running server versions of windows for you dev boxes?

取决于 - 您是否为您的开发盒运行服务器版本的Windows?

Because, e.g. the XP version of IIS is different from 2000/2003 server, so you'll get a different experience. Similarly, if you develop on Vista but plan to deploy on 2003, it won't be a "complete" experience.

因为,例如XP版本的IIS与2000/2003服务器不同,因此您将获得不同的体验。同样,如果您在Vista上开发但计划在2003年部署,那么它将不是一个“完整”体验。

#6


0  

We have IIS installed on our local machines at our work for development purposes. We need to test the web applications against IIS, but neither do we want to release it to our live server, or to our test server as that requires a lot of work. Instead, we just host it locally and everytime we modify a file through Visual Studio we can then instantly see the changes without having to go through a file copying process.

我们在本地机器上安装了IIS用于开发目的。我们需要针对IIS测试Web应用程序,但我们也不想将它发布到我们的实时服务器或我们的测试服务器,因为这需要大量的工作。相反,我们只是在本地托管它,每次我们通过Visual Studio修改文件时,我们都可以立即查看更改,而无需通过文件复制过程。

I don't think it's a bad thing at all, as long as everything's secure you'll be fine.

我认为这根本不是一件坏事,只要一切都安全,你就没事。

#7


0  

Ideally your test server should mirror your production server. That should go without saying. In my opinion, your dev environment should come as close as possible, while fulfilling your needs first (I prefer to keep the dev environment as self-sustaining as possible, in case I am disconnected from the network).

理想情况下,测试服务器应该镜像生产服务器。这应该是不言而喻的。在我看来,您的开发环境应尽可能接近,同时满足您的需求(我更愿意保持开发环境尽可能自我维持,以防我与网络断开连接)。

I have no problem using the dev server for development, and IIS (locally or remote, as the case may be) for testing - but it depends on the project requirements too. I prefer to host web services on the local IIS server, for example. YMMV.

使用开发服务器进行开发和使用IIS(本地或远程,视情况而定)进行测试没有问题 - 但它也取决于项目要求。例如,我更喜欢在本地IIS服务器上托管Web服务。因人而异。

#8


0  

We develop on laptops using virtual machines. This way, if the virtual OS crashes (or the host OS, for that matter) you just copy your vpc back over from the network (where we have backups) and you are good to go. also, it makes it WAY easier to run a "standard" development platform wich is as close to production as possible.

我们使用虚拟机在笔记本电脑上开发。这样,如果虚拟操作系统崩溃(或主机操作系统,那么)你只需要从网络(我们有备份)复制你的vpc,你就可以了。此外,它使运行“标准”开发平台更容易,尽可能接近生产。

For us, we HAVE to have IIS installed, as we are developing Sharepoint '07 webparts.

对于我们来说,我们必须安装IIS,因为我们正在开发Sharepoint '07 webparts。