Unable to configure Application Insights Status Monitor on Live IIS Web App - asp.net

Application Insight is working perfectly fine on local dev but giving issue on server with the Status Monitor. Following is the error:
The application is using an older version of Application Insights for
the Visual Studio Online. Remove ApplicationInsights.config and
Application Insights Nuget package references from your project and
Application Insights to your project using Visual Studio 2013 Update 3
or later.
I followed above instruction same result. Mainly I followed this article but I have also tried the following:
Make a copy of ApplicationInsights.config if you customized ApplicationInsights.config.
In Solution Explorer, right-click your project and choose Manage NuGet packages.
Select Browse.
Search for Microsoft.ApplicationInsights.Web, select it and choose Install/Update. You need version 2.2.0 (or later).
Reinstate any customizations you made to ApplicationInsights.config. Most of the changes you'll see when you compare the files are because we removed some modules and made others parameterizable.
Rebuild your solution.
It didn't work.

Related

Converting - asp.net mvc 5 web application (Visual studio 2017) to .exe setup file

I would like to know if there is any possibility to convert an asp.net mvc 5 web application into an .exe setup file. I tried various links. But i didn't get any output. I received a .msi file and when i tried installing, the installation stops right at the beginning displaying a message = "installation stopped. Please try again". or if i try to install the setup file i get a message = "Invalid.. Please check if package exists...bla bla bla"
Some of the links that i tried are listed below.
https://www.c-sharpcorner.com/article/step-by-step-guide-to-create-a-setup-for-a-web-application/
https://weblogs.asp.net/scottgu/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005
https://www.c-sharpcorner.com/article/creating-setup-and-deployment-projects-in-vs-net/
https://www.codeproject.com/Questions/297343/How-to-create-exe-or-msi-file-setup-file-of-web-ap
And Much More...
You first need to do some preparation:
Set up IIS 6 Management Compatibility (To prevent those "Installation stopped" errors)
Install Microsoft Visual Studio Installer Projects extension. (To add setup project template to VS)
Then you can create and configure and setup project and run the setup.
Details
1 - Set up IIS 6 Management Compatibility
Open Turn Windows features on or off → Internet Information Service → Web Management Tool and check at least the following items:
IIS 6 WMI Compatibility
IIS 6 Metabase and IIS 6 configuration compatibility.
This is to fix the following error:
The installer was interrupted before application could be installed.
You need to restart the installer to try again
2 - Install Microsoft Visual Studio Installer Projects.
This is to add setup project templates to Visual Studio. Here, we are interested in Web Setup Project.
3 - Create and configure the setup project
Create setup project
Right click setup project → Add → Project output and choose what you need. You need at least primary output and Content Files from your web project.
Then you can build the project and run setup.exe.
Note
You can setup other properties like ASPNETVersion, Manufacturere, product Name, ...
If after deployment you faced with error complaining about \roslyn\csc.exe, you may want to include roslyn files or remove roslyn compilation at all. For more information take a look at this post.
You can add CustomAction to do some custom actions during install/uninstall. You can find a lot of examples around, like this post.
You can even customize UI and add some input and use them during installation. You can find a lot of examples around, like this post.
In general, if your deployment is a common site deployment having a few files and database, a better option is creating Web Deploy Packages and then install the package to IIS. You can automate that process easily.
vs-2017 ---> other project types ---> web setup project
Screen shot

Error while Publishing Web App in Visual Studio Professional 2013

I am trying to publish my Web App in Visual Studio Professional 2013 but getting the following error
I got the same question asked over here but no useful answer.
Can anyone please help
You probably will be using older version, that was having an issue. refer detail [here]
Install the newer web deployment tool, should work.
which .net version are you using.
check web deploy version. if vs has 2 web deploy version, the vs get confuse to take which version. If it has 2 version, just uninstall vs and then instal it along with web deploy. if the Vs has one 1 web deploy version, you uninstall and install the web deploy. It will rectify your problem i hope.
You can refer This link
Check if version 9.0.0.0 of the assembly is installed in GAC. (from the VS2013 developer command prompt) gacutil /l Microsoft.Web.Deployment. Issues like this have occurred in the past where things worked, then after installing an update (or trying to install one) then reports of missing dlls, like nuget, occur.
The usual course of action is to repair the Visual Studio installation.
There is a problem with your publish profile. Delete the pubxml file located bellow Properties folder in your project and then create a new publish profile.
I got the same problem when older project runs into the new .NET Framework, for that you have to do the following.
Right Click on your project name->select Property Pages -> Click Build from the menu-> then select Target Framework .Net framework 4.5 or your current using framework..
"Could not load file or assembly" means the required file (of that mentioned version) is not available in the assembly (nor in the registry). All you gotta to do is to ensure this same is installed properly that would allow you to proceed further. The other things to ensure is the latest framework installed on your system.
Think you have some errors happen when to install or update Visual 2013, so you can reinstall again and this error will be fixed.

Web config transforms not working with Visual Studio online, VS2013 and Azure

I have an MVC5 website successfully deploying a staging and production release to Azure using continuous integration from Visual Studio Online (TFS).
I have followed this blog post
Continuous Delivery to Azure Websites with git using custom deployment script
I have even added the build that is required to build to my publish profiles. ie.
stagingbuild | any cpu.
note: this was not mentioned in the above mentioned blog post.
The sites deploy ok using by VS2013 build but the configs are not transformed. I just get the default web.config settings and not the transformed ones from web.staging.config etc.
note: I am only trying to transform one appSetting at the moment to get it working
I totally understand how to write transforms so I don't think this is an issue and when I preview my transforms in VS2013 they transform in the previewer window.
note: I am not publishing directly from VS but committing my changes to repo and continuous integration kicks in from my Visual Studio Online repo.
Try:
Open Builds in Team Explorer
Edit Build Definition of your build
Set Process > Build > Configurations > Any CPU|Release or any other configuration/CPU combo.

How to create an MSI installer package for an ASP.Net website?

How do I create an MSI installer package for an ASP.Net website ?
Can anyone help me with a good link?
Mosty of the articles just presents the solution for windows applications.
I get this Error by using Add Deployment Project: when merging assemblies aspnet_merge. in Deploy Project.
http://codeissue.com/articles/a04df930da62eb1/create-asp-net-deployment-package-using-web-deployment-and-web-setup-project
ERROR: Error 35 An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type 'SatmapSkillReport' found in assembly 'App_Web_4fgmsrtw'. Project_deploy aspnet_merge 1 1
It is actually possible but please note that my experience with this was with Visual Studio 2008. I haven't tried this on Visual Studio 2010 or 2012.
In VS2008, click on File > Add > New Project
In Add New Project dialog, select Other Project Types > Setup and Deployment > Web Setup Project
From there you can right-click on the project in the solution explorer and click View to see the user interfaces, launch conditions, registry settings, etc. or in Properties to set the virtual directory name. You can also include the output files of any project or your main project to be deployed.
If you configure this correctly and build that project, the output is an MSI installer file. When you use this MSI installer file, you can use Add/Remove Programs (win xp) or Programs and Features (win7).
I guess you can setup DNS, permissions, run a database creation script, with the various possible configurations available.
A good guide with a lot of screenshots here
UPDATE
Web deployment project is not available in VS2012
Web deployment project is available in VS2010
I found solution my self.!
you can follow link.
[1]: Can't rename MSI afterwards
and for Help:
[2]: https://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

Deploy from Visual Studio 2010 stopped working after upgrade to Web Deployment Tool 2.1

I have a web site project that has been existing for a while - it has been ASP.NET MVC2 based up until right now. .Net 4, Visual Studio 2010 Sp1, deployed to IIS 7.5 running on Win2008 R2.
I have four separate deployment profiles - "alpha", "test", "staging" and "live". Yes, I could probably have come up with better names, but they should hopefully convey what they are for.
It was recently decided to upgrade to MVC3 to take advantage of new awesomeness like Razor, global filter attributes, and start using NuGet etc. So I went on an upgrade binge with the Web Platform Installer. One of the things I updated was the Web Deployment Tool - both my developer machine (where the MVC3 upgrade happens) and the web server got this new version of the tool installed.
Since then, I have not been able to do deployments. I have gone back to earlier versions of my project (thanks to git for allowing me to painlessly go back to any previous version) and tried to deploy them, and they don't work either.
Whenever I try to do a deployment from Visual Studio I get the following error:
Web deployment task failed.((23.05.2011 11:18:24) An error occurred when the request was processed on the remote computer.)
(23.05.2011 11:18:24) An error occurred when the request was processed on the remote computer.
Unable to cast object of type 'Microsoft.Web.Deployment.DeploymentSyncOptions' to type 'Microsoft.Web.Deployment.DeploymentSyncOptions'.
I can see why that cast would be hard. ;)
But seriously - how can we get deployment from Visual Studio to work again? In the future we will do this using our CI server, and install a deployment package using MsBuild automatically on the correct web server depending on the git branch that was updated, but that is some time in the future.
I have full access to both machines so any other information need can hopefully be gathered.
You might be having beta version of web deploy on your box if you have ever installed web platform installer v2 beta. YOu can check that by
gacutil -l Microsoft.web.deployment.
If you see any 7.5.0.0 version then you have a beta version. Uninstall this version. You need to check and change this on both the client as well as the server.
Owais is right - this is very likely because you have a pre-release version installed. Rune can you please check and let me know?

Resources