Change launch path of Visual Studio 2010 Web Server - asp.net

How I can tell Visual Studio 2010 to launch built in web server from a different location. Is there a registry settings somewhere that I can modify or some how change the Debug -> Start Debugging menu item command?
From
C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer20.exe
To
C:\Program Files\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer20.exe

If you've facing the problem in connection with Oracle integration with ASP.NET in Windows 7 64 bits, then relax... XD
That's the solution (I'm using Visual Studio 2010 32 bits):
First of all, follow the steps here:
System.Data.OracleClient requires Oracle client software version 8.1.7
Then apply these steps:
Copy the directory of your webserver (typically in "C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0") to "C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0";
Open cmd, navigate to directory pasted in step 1 and start the web server (in my case "WebDev.WebServer40") pointing to the directory of your project (be careful, because this path cannot contain parenthesis, that causes the Oracle Bug 'ORA-06413: connection not open' as can be see described here);
If you want to debug your application, change the default URL to the URL of your started server in Visual Studio. In Solution Explorer go to your project > right click > properties > web > in "Servers" section select "Use Custom Web Server" and place the URL that your server are running on. After this, start debug and be happy =D

For those who are still facing this issue in 2016 like me,
you can change step1 of Caique Lemos's answer to:
mklink /J c:\ProgramsX86 "C:\Program Files (x86)"
And use c:\ProgramsX86\... for step2
Also, run as administrator can skip setting the folder permissions in the link above.

Related

VS2017 Setup project - How to open the Setup Property Pages?

Tried to resolve the setup project warnings in VS2017:
WARNING: Could not find prerequisite 'Microsoft .NET Framework 4 (x86
and x64)' in path 'C:\Program Files (x86)\Microsoft SDKs\ClickOnce
Bootstrapper\'
WARNING: Could not find prerequisite 'Windows Installer
4.5' in path 'C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\'
In VS2015 when I right click the Setup project in the solutions explorer it opens a new dialog "Setup Property Pages"
here I can configure the prerequisites...
How can I configure the Prerequisites in VS2017? Right click on the setup project just jumps to the Properties Panel below the Solution Explorer Panel.
EDIT Aug 2017
With VS2017 Version 15.3.2 and updated Microsoft Visual Studio 2017 Installer Projects extension -> "right click" - Properties - in the Solution Explorer works again like expected before.
Right click properties won't work in setup project VS2017 like it worked in VS2015.
In VS2017 choosing Setup Properties from Project menu will open the SetupProperty Pages dialog as expect.
And then you may run into the error of vs telling you it cannot find a prerequisite like .net framework 4.5, etc. They are supposed to be downloaded and placed in a certain folder. If that is the case then see the example below for adding .netfx4.6.2:
Download the 4.6.2 offline installer file from here: https://msdn.microsoft.com/en-us/library/ee942965%28v=vs.110%29.aspx
Place the file in C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX462
https://developercommunity.visualstudio.com/content/problem/10716/clickonce-can-not-find-462-prerequisite.html

"One or more error occurred" When right clicking form elements

When working with either a Custom or Standard Form in AX 7, right-clicking on the Design Node, Grid Container, Group Control etc. Visual Studio freezes for a couple of seconds then displays this error message: "One or more error occurred".
This is not isolated on my development VM, coworkers also experiencing the same issue.
Anyone ran into this problem?
I think I remember running into this and you can follow these steps to clear the cache.
Delete the contents from the following folders
C:\Users\<>\AppData\Local\Microsoft\Team Foundation
C:\Users\<>\AppData\Local\Microsoft\VisualStudio
C:\Users\<>\AppData\Local\Microsoft\VSCommon
Go to the Visual Studio IDE folder in command prompt and Run the following command “devenv /resetuserdata” from the Visual Studio IDE folder.
Typical location for 64 bit: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
Typical location for 32 bit: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
Per:
https://blogs.msdn.microsoft.com/willy-peter_schaub/2010/09/15/if-you-have-problems-with-tfs-or-visual-studio-flush-the-user-cache-or-not/

Unable to Start Debugging on the Web Server in Visual Studio 2012

Although it is an old question. But I have tried many ways still no clue. I launched Visual Studio 2012 as administrator. My OS is Windows 7 64. IIS Expression shown in HKLM\SOFTWARE\Microsoft\IISExpress is 10.0.175. But HKLM\SOFTWARE\Microsoft\InetStp is 7.5.
So check the windows IIS feature
I am sure that the Application pools are started.
Also I can manually to start the IISExpress by the command:
powershell "start-process 'C:\Program Files (x86)\IIS Express\iisexpress.exe' -workingdirectory 'C:\Program Files (x86)\IIS Express\' -windowstyle Hidden"
Finally I am sure I have run the command C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i already.
But I still can't start to debug it. So help me please.
EDIT:
Now it is working r I added IUSRS group to the project folder.

msdeploy v2 doesn't work with vs2010's packages

I had v1 of msdeploy installed and I uninstalled it to install the v2.
Now my vs2010 packages fail when I run the deploy.cmd because it can't find the registry entry - even though I've created an MSDeployPath environment variable pointing to the v2 path?
I have MSDeployPath set to "C:\Program Files\IIS\Microsoft Web Deploy V2" in the Advanced System Settings/Environment Variables under My Computer/Properties.
The error I get when I run the VS2010 deploy.cmd file is:
Files\IIS\Microsoft was unexpected at this time.
Anyone know how to fix this? The vs2010 package's deploy.cmd looks for /1 in the registry.
So how do I change this to look for /2 if the path variable doesn't work
Edit the .cmd file to look for the correct registry path. /2 instead of /1.
My understanding is that TFS 2010 sp1 fixes this.
The line from the cmd file for pre SP1 builds looks like this:
for /F "usebackq tokens=2*" %%i in (`reg query "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1" /v InstallPath`) do (
post SP1 it looks like this
for /F "usebackq tokens=1,2,*" %%h in (`reg query "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy" /s ^| findstr -i "InstallPath"`) do (
I also get the same issue when I am trying to deploy the web site using bath file under the package created by MSbuild. Only difference is I am doing it remotely.that is I assign that task to my build server and once a build is successful then it execute the command
MVC-Client.deploy.cmd /y /M:es-websrv01
Although the set parameter xml is available it complains the it is unexpected.Normally it says for a remote web deployment we dont need admin privileges.(In my case build server is running with out admin privileges).Then I remotely logged to the build server machine and then using a command line try to to the deployment manually.But end up with the same issue.Then what I try was just copy the package in to a desktop and then did the remote deployment.It was successfully transferred the files into target IIS location.
Location where build server tries to to the deployment : C:\Program Files (x86)\Jenkins\jobs\Exile-LibrarySystem\workspace\Exile-LibrarySystem\Exile-LibrarySystem\obj\Staging\Package
I think since this folder has limits access it cant do the operation.Otherwise I should have end up with the same issue when I was trying to do the deployment in the desktop in build server machine. Is there any work around where I can get this deployment job done with in the build server location ?
Thanks

Web Deploy script error - msdeploy.exe is not found on this machine

I'm trying to execute a web deploy script on a clean build Windows Server 2008 R2 machine and getting the following error:
ERROR: The system was unable to find the specified registry key or
value. msdeploy.exe is not found on
this machine. Please install Web
Deploy before execute the script.
The package was created in VS2010 and executes fine on my development box (as always!). If I import the package on the server through IIS everything works fine.
Web Deploy has been installed on the server through the Web Deployment Tool 2.1 via the Web P.I and I've verified the inclusion of msdeploy.exe. I'm running the script through the "IIS Extensions/Web Deploy Command Line" start menu item so I'm guessing that the correct paths should be set. I've also tried it as Administrator with the same error.
Any help greatly appreciated.
Copied from here:
There is an error with the way Microsoft’s Web Deploy 2.1 application creates command line packages from Visual Studio 2010.
If you create a package to publish and then try to run the msdeploy.exe command line publishing tool it on a production server running IIS then you may receive the following error:
ERROR: The system was unable to find the specified registry key or
value. msdeploy.exe is not found on this machine. Please install Web
Deploy before execute the script.
Assuming that you actually have installed Web Deploy from http://www.iis.net/download/WebDeploy then the error may be caused by an incorrect registry path variable in the .cmd file that Visual Studio creates.
Open up the .deploy.cmd file that is part of your deployment package in a text editor and look for the following code block:
if "%MSDeployPath%" == "" (
for /F "usebackq tokens=2*" %%i in
(`reg query "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1" /v InstallPath`)
do (if "%%~dpj" == "%%j" (
set MSDeployPath=%%j
If you have installed Web Deploy 2.0 or higher, then the error is caused by the registry query to HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1. If you open up regedit on your production server you’ll find that the appropriate key is actually HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\2.
Change the reference in the.deploy.cmd file and you’ll be able to successfully run the deployment package.
I have the same problem. Installed WebDeploy_2_10_amd64_en-US. Running the Deploy Command Line I get the same erorr. However, in IIS (version 7) I could use an option import application. With this option (right side of the window in the actions toolbar) I was able to import the application deployment package zip file. All settings were imported correctly except for the application pool. I only had to adjust that and everything was running fine.

Resources