VS2010 web setup project needs IIS6 (metabase) compatibility on IIS7. Consequences or other issues for the application? - visual-studio-2010

When trying to install a web setup project (MSI) created in Visual Studio 2010 on Windows Vista, Windows 7 or Windows 2008 Server the setup will fail, with some generic error.
According to http://devio.wordpress.com/2011/04/26/pitfalls-installing-web-setup-msi-on-iis-7/ this is because of a compatibility problem between the setup project en IIS7.
To resolve this I've to enable/install IIS6 metabase compatibility in my windows configuration. This workaround did fix the problem, but raises 2 questions:
Does this have any (negative) impact on functionality of IIS 7?
How can I notify a user running the installation of this problem so he or she can take proper action and install the metabase compatibility component? Is it possible to pop-up the windows component configuration dialog from this install, to make life easier for the user?

I don't think this will have any impact on the application itself, as long as it's implemented the way to talk to IIS7 via its native API. Otherwise, if it doesn't support IIS7 you'd have to enable IIS6 compatibility anyway.
The standard approach to search for anything on a target machine is searching registry and file system. I don't know how it is possible in VS setup project, but e.g. WiX has special elements for this (RegistrySearch, DirectorySearch, FileSearch). Basically, this post to WiX Tips and Tricks thread shows how to check for IIS6 compatibility in WiX and block the installation if it's not enables/installed. It's rather straight-forward even if you don't know WiX, but know the concepts of Windows Installer, and it can help you translate the code into the similar thing in VS setup project.

We seem to be having one negative impact on our servers.
Everytime we roll out a .NET 4.0 application with a msi made in Visual Studio, We get a recycle of ALL our application pools, even the ones not affected by the install.
Apparently the root cause of this is the IIS 6 compatibility. ( This was reported to us by a developer of microsoft in response to our support question about this.
At the moment we have no solution. It's impossible to convert all our installers to Wix.

Related

Does Windows Identity Foundation (WIF) Require IIS? (Rather than Development Server)

I need to know if developing a Windows Identity Foundation (WIF) solution requires IIS installed. I would like to be able do develop a WIF solution using the built-in Visual Studio Development Server (I heard it is called Cassini) if possible.
All of the samples I've downloaded assume that IIS is up and running on the local system.
This blog, Securing WCF Services with Custom WIF STS: A Step-By-Step guide, lists requirements for a WIF example and has IIS as one of the requirements.
I've added the images to allow you to follow easily with the steps.
Pre-requisites:
Visual studio 2010
The development machine has IIS installed (I use Windows 2008 R2)
Windows Identity Foundation (WIF): download it from http://www.microsoft.com/download/en/details.aspx?id=17331
Windows Identity Foundation SDK: download it from : http://www.microsoft.com/download/en/details.aspx?id=4451
I also have noted another StackOverflow posting indicating that IIS Express can be used. I have not yet fully investigated IIS Express, however this doesn't answer my basic question.
I can't seem to find any other references anywhere else about this topic. I'd appreciate knowing if anyone has been able to develop a WIF solution implementing a Security Token Service using the standard Visual Studio Development Server alone. Otherwise, I will look into using IIS Express. I am unable to install and use IIS (non-Express) on my system as I don't have local admin access.
Thank you.
Before .NET 4.5 WIF was a separate package and an additional installation step.
.NET 4.5 makes several important changes and moves WIF into the .NET base class libraries. The move enables WIF to be used by any application regardless of host. There's enough changes that if you are starting new, I recommend upgrading to .NET 4.5 to avoid porting in the future and because the integration does make things easier.
I'm currently running Visual Studio 2012 and testing WIF code in IIS Express and ServiceHost without issues.
I don't have local admin access
This is a big problem. Not having local admin for WIF development may not work. You will need elevated privileges to install tools and test applications.
Regardless of version, you shouldn't have any issues running apps with WIF outside IIS. The limitations are more around running SSL. Have you tried? Did you get any errors?
As #Eugenio states, one of the issues is around SSL. The other problem is that Cassini uses localhost which means that you need to have a valid localhost certificate if you are thinking of adding this application to something like ADFS. (as opposed to having a certificate for the actual machine name).
Also, to do WIF development, you have to run VS in Admin mode.

Is it a good idea to develop a SharePoint 2010 solution under Win 7?

SharePoint 2010 is supported on Win 7 x64, but is it really a good idea to develop under this kind of standalone environment, when the developed solution is expected to be deployed on a Win 2K8 R2 farm?
Officially it is not supported on Windows 7 but it's allowed / ok for development purposes (which is already a good candidate to say officially "no")
The biggest reasons why I usually say no to that kind of environment if one asks for my opinions :
can only be installed as “stand alone”, which is the worst kind of installation (completely automated but also completely unrealistic). No SharePoint expert will ever suggest a standalone installation on production. Why the hell should we develop on a “stand alone mode” single server farm that is completely unrelated to the target environment ?
cannot know if it’s environment related when something is / seems broken (eg : taxonomy service provisioning, broken due to environment or code issue ? -> no time to do Windows 7 + SharePoint 2010 cohabitation issues debugging on corporate projects
when Arpan Shah, Director of SharePoint tools & technlogie says that there are limitations, I guess he knows them better than anyone else : http://reddevnews.com/articles/2010/06/02/sharepoint-qa-arpan-shah.aspx. Since theses limitations have not been fully listed (outside of the user profile service), I better not waste my time wondering if the issue I am facing is related to a limitation / environment gotcha.
The reason why I say "might be ok"
Prototyping / Client OM development / Middle Tier developments / not so complex solution developments are the kind of configuration / development on which a Windows 7 installation might be pretty handy.
I'm developing for SharePoint 2010 on a Windows 7 box for about 10 months. I have not encountered any issues by now.
The only issue I know of is that the "User Profile Service" is not supported under Windows 7.
There is an official installation guide by Microsoft:
Setting Up the Development Environment for SharePoint 2010 on Windows Vista, Windows 7, and Windows Server 2008
What kind of issues do you expect?
Substitute ASP.NET for SharePoint 2010 and ask the question:
[ASP.NET] is supported on Win 7 x64, but is it really a good idea to develop under this kind of standalone environment, when the developed solution is expected to be deployed on a Win 2K8 R2 farm?
I can't imagine anyone answering "no" when the question is phrased that way. It is the same with SharePoint (after all, SharePoint is just a framework library built on top of ASP.NET).
A SharePoint solution package contains different types of files: XML files, ASPX pages, DLLs, images, CSS files, etc. Other than the DLLs, these files are text and binary files that are portable to any Windows environment. And just like the DLLs compiled in a ASP.NET project, the DLLs from your SharePoint project will work perfectly fine on the server even when compiled on Windows 7.

Visual Studio 2010 nasty caching Cassini? Must manually stop service

I've spent waaaay too much time trying to figure this out. I'm running Windows 7 and Visual Studio 2010 in a VMware Fusion virtual.
When I debug my website project, Cassini (aka ASP.NET Web Development Server) starts and the site shows in my default browser (IE). I stop the debugger, make some tweaks to my C# code, and start the debugger again. The website starts up in IE and the site displays, but its using the code base from when I initially debugged NOT including any tweaks in code between the initial debug/build and subsequent debugs/builds.
The only way I can get code changes to build and run in the browser properly is if I manually stop the ASP.Net Web Development Server from the tray and then run debug.
Has anyone encountered this? Not sure if its caused by VS2010 or the environment being a virtual on a Mac.
Manually stopping Cassini after every debug is really starting to suck.
Thanks.
Check if Visual Studio is set to recompile the projects when there are changes.
Check that Tools > Options > Projects and solutions > Build and run > On run, when projects are out of date is set to Always build.
Perhaps you will have a more pleasant experience with IIS 7.5 Express as a replacement for Cassini.
From that page:
IIS Express is a lightweight,
self-contained version of IIS
optimized for developers. IIS Express
makes it easy to use the most current
version of IIS to develop and test
websites. It has all the core
capabilities of IIS 7 as well as
additional features designed to ease
-- website development including:
-- It doesn't run as a service or
require administrator user rights to
perform most tasks.
-- IIS Express works well with ASP.NET and PHP applications.
-- Multiple users of IIS Express can work independently on the same
computer.
Here's an article to help you get started.
Figured this out. I had mapped my Visual Studio 2010 folders to a VMware Fusion share in order to make my .NET projects accessible from Mac world (for copying graphics files into the projects, etc.). Evidently there was some type of permission issue or something that did not result in any sort of alert that was causing the problem.
I remapped all VS folders (Project, Website, etc.) into the standard Documents folder of my user instance and everything began working as expected.
Thanks for the help.

Does anybody have experience with Visual Studio 2008 on Windows 7?

Has anyone already tried this, anything particulair that I need to be aware of?
Yep, been running it for a while and I haven't hit any problems yet. Can't say I've use it all day every day, but I've built WPF, WinForms, Web and Console apps with it for testing various things and haven't had any hitches.
I have it on my Dell X1, which is effectively my "NetBook", and it's really pretty rapid. The only glitch I have had at all is some problems with graphics acceleration, but that's down to the Intel driver I'm using being an old XP driver, and it was easily worked around.
I've been running it inside a VM in Parallels Desktop 4 on a MacBook Pro. Absolutely no problems to speak of.
(There's no sound in Windows 7 as virtualized through Parallels, which is a known issue — but not very pertinent to the operation of Visual Studio.)
Jeroen,
I've been unable to install the 2008 Team Developer edition - keep getting a permission error. I was, however, able to insall the 2008 Team Database edition. I normally install both editions, so am kind of bummed about not getting the Developer edition to install. Screenshot of the error is here if you're curious.
No Problem with team edition, but only using it for web projects.
I've been using it at work since RC1 and have not run into any issues. Have developed a WinForms app, a WebForms site and now working on a MVC project.
I have had zero problems running Visual Studio 2008 Pro on 32 bit and 64 bit editions of Windows 7 for full-time C++ development.
If the application you are developing doesn't behave correctly under UAC you may will need to run the IDE as admin otherwise it won't run correctly under debug (this is the applications problem, not Windows 7 or Visual Studios).
Others seem to have problems with access rights/permissions, this should also be fixable by running the IDE as admin (via right click) or more permanently via the compatibility tab in the shortcut properties.
I don't know why this happens, is probably related to their particular user account settings.

How to setup non-admin development in Visual Studio 2005 and 2003

We have been given the directive to make sure that when we develop we are running out of the administrator and poweruser groups to prevent security holes. What are the steps to take to make this possible, but still be able to debug, code, and install when needed?
We develop ASP.NET as well as VB.NET applications.
Thanks!
Brooke Jackson
I have been developing a web application in a team of 5+ developers using ASP.NET 2.0 using Visual C# 2005 and Visual Web Developer 2005 for 6+ months. It was an internal application for our client and was targeted at Internet Explorer 6.0. I have been always using a non-administrator account on my machine and have never run into any problems. Specifically, I have not experienced any problems with debugging. Right now I am switching to a Visual Studio 2008 and I hope everything will work just as it does now.
I am using a laptop for development. A the same time I am moving around and connecting to the internet in different places and I use my admin account only when necessary. I really believe that running an admin account for every day tasks is the single greatest security threat, just because it is so common.
Beware, there seems to be a lot of issues with running VS as non-admin.
Seems silly to me. Run VS as admin/power-user locally with whatever minimal rights you need on the network for publishing to the users and whatnot.
Just makes sure that the applications you CREATE with VS still work without those extra rights.
Use Vista, and take advantage or UAC, because that's UAC allows you to do. You can give VS full rights when needed, and the application/website limited rights.
I'm running VS2008 on Vista with UAC enabled. I've only had one issue worth mentioning.
I occasionally have weird file permission issues when I've run VS with elevated privileges then later run it without them. VS won't be able to delete the old build files, but if I delete them from Explorer its fine. Again, this only happens when switching between elevated and non-elevated permissions.

Resources