Web setup problem - c#

I need to package my ASP.NET Silverlight web site to a single MSI file.
But when creating web setup project, it can't install on iis version greater than 6. On greater versions it only installs when 'IIS 6 compatibility mode' is enabled on server. How can i make my setup project, so it installs correctly?
PS I don't have admin rights on server.

If you are installing to IIS7+, I'd suggestion using Web Deploy. It simplifies IIS deployment and is now the recommended way to deploy to IIS7 or above. Also, there is good integration with Visual Studio 2010 as well as both MMC and PowerShell integration with IIS.

Related

How to host a DotNet Core 6.0 WebAPI project on IIS using CLI?

I am trying to host my webapi project locally using IIS server. I am using VS Code to create my webapi using .NET 6.0.
Here are the steps I took:
I ran dotnet publish --configuration Release. This created files under 'bin\Release\net6.0'.
I downloaded the ASP.NET Core 6.0 Runtime (v6.0.2) - Windows Hosting Bundle.
Next, I created a website in IIS using the Physical Path as 'bin\Release\net6.0' and set the port to 8084.
Now when I try to browse to the path, localhost/8084/api/users it returns 500 Internal Server Error. What am I missing?
Settings for IIS
I was able to find the solution go this, thanks to #gunr2171.
The issue was with using user-secrets. When using user-secrets, IIS is not able to find the secrets.json file. This caused the application at IIS to fail with null reference(Found this through Event Viewer).
A solution that I found to this is - for development purpose, we can copy paste the secrets.json file to the physical path being used by IIS to host. This lets us continue hosting through IIS without issues.
You need to install this bundle, then try again :). Check your .net core version

Package/Publish task Microsoft.Web.Publishing.Tasks.CreateProviderList failed to load Web Deploy assemblies

Error 1 Package/Publish task Microsoft.Web.Publishing.Tasks.CreateProviderList failed to load Web Deploy assemblies. Microsoft Web Deploy is not correctly installed on this machine. Microsoft Web Deploy v3 or higher is recommended.
The above error is showing when i publish the file from vs 2012. I have already installed web deploy v3.
A bit of a late answer but I had this same error message and solved it by installing the Web Deploy extension:
https://www.iis.net/downloads/microsoft/web-deploy
You must install the Web Deploy through Visual Studio Installer
Launch Visual Studio Installer, Go to the Individual components Tab then search "Web Deploy"

Host ASP.NET MVC4 website in windows without VisualStudio or IIS installed in it

I have ASP.NET MVC4 published as a file system. I need to host it in a fresh windows machine which does not have either VisualStudio and IIS installed in it;
Ways I analysed:
Using WebDev.WebServer, it can be done; Link
Question:
1) Does WebDev.WebServer gets installed along with a VisualStudio installation?
2) If not , please tell how can I install WebDev.WebServer as a standalone application in a windows machine,
Note:
Based on the answer in this discussion, I tried, but couldn't succeed. Reason is I couldn't find gacutil.exe in a fresh windows 8 machine which doesn't have VS / IIS installed in it.
WebDev.WebServer is kind of superseded by IIS Express now, which is documented, much more configurable, supports IIS extensions and other stuff. You can say it's pretty portable and does not require privileged account (for the most part).
Introduction blog post, IIS Express Readme
I'd suggest trying IIS Express instead of WebDev.WebServer.

create a deployment package for Webservice in Visual Studio

I want to deploy my Webservice(*.asmx) on client server.
I need to develop deployment package which will install the virtual folders and deploy the service just like clickonce.
Could someone give me Visual Studio step by step guide to do it.
Thanks,
Kanaya
Most people use Web Setup Projects if the Web Service is simple - any dependencies (e.g. .NET Framework Installation, IIS, SQL Server, a Database, etc) will need to be installed separately by someone in advance of that Setup being run.
For more sophisticated deployments where you want to ensure certain components are on the target machine (e.g. IIS) and if not there get them installed as part of the setup process, then you can use Web Deploy.
Here are some different ways you can do it.
Web Setup Project
Web Deploy
MSDeploy
Here are some guides on the above tools:
http://blog.thinkoriginally.com/2010/02/16/visual-studio-2008-web-setup-project-web-deployment-project-and-msdeploy/
http://www.iis.net/download/WebDeploy
http://cromwellhaus.com/2012/05/build-once-msdeploy-all-over-the-place/
How to use Web Setup Project:
http://www.codeproject.com/Articles/13698/Visual-Studio-Setups-Web-Setup-Part-I

.NET build & deploy

To deploy my app on a clean server takes several steps: Start MSSQL service, install .NET4, deploy code, install DB schema, add SSL certificate to IIS7...
Thereafter I follow a more boring task of: Zip up my app files, transfer them to the server, load them into the web app folder etc.
The deployment is done on a semi-frequent basis as my product sells to enterprise customers. Thereafter it's the boring build and deploy task.
Is there a recommended .NET tool that can help automate the above tasks? BTW, I use VS2010 with IIS7 and .NET4.
Web Deploy
Web Deploy (Web Deployment Tool)
simplifies the migration, management
and deployment of IIS Web servers, Web
applications and Web sites.
Administrators can use command-line
scripting with Web Deploy to
synchronize IIS 6.0 and IIS 7.0
servers or to migrate an IIS 6.0
server to IIS 7.0. Web Deploy Tool
also enables administrators and
delegated users to use IIS Manager to
deploy ASP.NET and PHP applications to
an IIS 7.0 server.
Web Deploy enables you to package
configuration and content of your
installed Web applications, including
databases, and use the packages for
storage or redeployment. These
packages can be deployed using IIS
Manager without requiring
administrative privileges. The tool
integrates with Visual Studio 2010 to
help developers streamline the
deployment of Web applications to the
Web server. The tool also integrates
with the Web Platform Installer to
allow you to simply and easily install
community web applications. You can
submit your own application to the Web
Application Gallery
Features
Seamless integration with IIS 7.0
Manager and Visual Studio 2010
interface for creating packages and
deploying them onto a machine, both
locally and remotely. Seamless
integration with the Web Platform
Installer to install community web
applications simply and easily. Web
application packaging: Ability to
package a Web application or an entire
site, including the associated
databases. Ability to package ACLs,
COM, GAC and registry settings.
Supports both live servers and zipped
packages as a source or destination.
Web application deployment:
Administrative privileges are not
required in order to deploy Web
applications. Ability to add powerful
parameters to change text in files
when they are deployed (such as
prompting to replace a connection
string when deploying from QA to
staging environments). Integration
with the IIS 7.0 Web Management
Service (WMSVC) for remote deployment
by non-administrators. Server
administrators have granular control
over the operations that can be
performed and can delegate tasks to
non-administrators. Web server
migration and synchronization: Ability
to synchronize or migrate the entire
Web server, a Web site or application.
Synchronizes only the data that has
changed. Ability to detect missing
dependencies during synchronization.
Automatically gathers content, IIS
configuration, SSL certificates and
ASP.NET configuration when you sync a
Web site. In addition to the IIS
Manager and Visual Studio 10, tasks
can be performed using the
command-line or public APIs.
Yes, Powershell can do all this for you. Pretty much anything a .NET program can do, Powershell can do it since you can import .NET assemblies and use it in powershell.
I use powershell in my project to:
1) Setup the registry
2) Unzip the dropped code
3) Build the web folders and move files
4) Deploy SQL stored procedures
5) Restart IIS
For an in-depth review of using Powershell for deploying see this
article
Have you considered creating an MSI to install using Windows Installer?
You can do this using InstallShield or Wix and can get much of the functionality you describe for "free" (e.g. installing .net, starting/stopping services, deploying code, etc.).

Categories