Hi,
I'm creating a custom project for Visual Studio 2012.
When I run the project, I build my assembly and attach to IIS. I was able to do that by implementing IVsDebuggableProjectCfg. However, when Visual Studio is NOT running as administrator, I have the following error :
"Unable to start debugging on the web server. IIS does not list a web site that matches the launched URL."
In order to attach to IIS, I know that Visual Studio need to be run as administrator.
With a classic webProject, when we hit this situation, Visual Studio display a nice dialog indicating that Visual Studio requires elevated permissions :
The code I use to attach to IIS is the following :
public int DebugLaunch(uint launchFlags)
{
VsDebugTargetInfo3 info = GetIISLaunchTarget(launchFlags, "http://localhost/admin/");
IVsDebugger3 vsDbg = Package.GetGlobalService(typeof(IVsDebugger)) as IVsDebugger3;
int result;
VsDebugTargetProcessInfo[] pLaunchResults = new VsDebugTargetProcessInfo[1];
VsDebugTargetInfo3[] pInfo = new VsDebugTargetInfo3[] { info };
ErrorHandler.ThrowOnFailure(result = vsDbg.LaunchDebugTargets3(1, pInfo, pLaunchResults));
return result;
}Do you know if it's possible to use the same dialog ? Do I have to check if Visual Studio run as administrator and display my own dialog box ?
Thanks,
Cyril DURAND
Atteint de JavaScriptite aiguë