none
VS2017 fails launching Acrobat Reader under Admin Permissions

    Question

  • I' am testing VS2017, I have an old app developed on VS2010, everything goes fine in VS2010. The solution is composed by a server and a desktop app that receives data, generates a pdf file and calls a process to open the file.

    However, because there is a server in the solution, I need to debug it under administrator credentials. When y do so EXCLUSIVELY ON VISUAL STUDIO 2017, Adobe acrobat is launched twice, it apears twice at task manager and there is no Adobe Acrobat Window.

    I made a couple test:

    1) Completely reinstall Windows 10 + VS2017 (and nothing else): THE PROBLEM PERSIST

    2) Install the server (with a setup project) and debug the desktop app only on VS2017 and under "normal user account", not admin account: THE PROBLEM IS SOLVED, everything goes fine with my app and Adobe Acrobat is launched properly.

    HOWEVER: UNDER THIS APROACH I LOST THE ABILITY TO DEBUG THE SERVER WHILE THE APP IS GETTING AND SENDING DATA BECAUSE THERE IS NOT POSSIBLE TO RUN A SERVER IF IT HAVE NOT ADMIN PRIVILEGES.

    MY QUESTION IS: ¿Why VS2017 (NOT VS2010) is launching Adobe Acrobat twice when is debbugging under admin credentials ?



    • Edited by samharriscl Thursday, March 16, 2017 2:27 AM
    Thursday, March 16, 2017 2:23 AM

All replies

  • Here is a "Semi Solution":

    1) Enter to the system has administrator, go to "Default Programs" and set Google Chrome as the default app for ".pdf" files. 

    2) Enter to the system as "normal user", and set whatever you want as the default app for .pdf files

    When you run VS2017 as administrator (from the "Normal User" account) and you call a process to open a .pdf file, VS2017 will use the default app setted at the administrator account (not the normal user account) to open the .pdf file, in this case it will use Google Chrome instead Adobe Acrobat. And I don't know why but there is not problem with Google Chrome. However the question is the same ... 

     ¿Why VS2017 (NOT VS2010) is launching Adobe Acrobat Reader -And only Adobe Acrobat Reader- twice when is debbugging under admin credentials ?

    Thursday, March 16, 2017 4:11 PM
  • Hi samharriscl,

    Welcome to the MSDN forum.

    Refer to your description, your issue is about the development issue. What's the project type of your solution? The detail information about your solution can help us to search a appropriate forum to seek for a more professional support, and it can help you to quickly solve your issue, since our forum is to discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 17, 2017 6:41 AM
    Moderator
  • Hi Sara ...

    This is a a simple Client / Server Solution, however I think the problem is not on the project type itself.

    The problem is related with VS2017 running under Administrative Privileges -on a "normal user session"- and trying to launch a process to open a PDF Document.

    This Client / Server solution was originally developed on VS 2010 and there was never a problem with VS2010.

    Previously I reply to my self and post a "Semi Solution" that can help to solve this issue.

    Friday, March 17, 2017 11:46 AM
  • Hi samharriscl,

    Thank you for your detail description.

    >>The solution is composed by a server and a desktop app that receives data, generates a pdf file and calls a process to open the file.

    The 'server' is means 'service', right? If so, does the pdf file is created in server or client (desktop app)?

    If it is create in client, to troubleshot this issue, you can insert two breakpoints, one is in the code when you try to create the pdf file in client, another is in the server to check the return value to the client, it can help us to narrow down the possible factors,

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 20, 2017 2:40 AM
    Moderator
  • Dear Sara:

    The pdf is generated on the App, the server has nothing to do with the pdf generation process. More over all the data included on the pdf are already saved on the client side.

    I'm pretty sure that the problem comes from the fact that VS2017 is running under administrative credentials, because of it, when I run the client app on debug mode, VS goes to the admin user configuration looking for the default app to open pdfs.

    I order to reproduce this issue you should do this:

    1) Enter to windows as a "normal user", be sure that on the admin account and on the normal user account the default app for pdf files  is Acrobat Reader

    2) Using VS2017 create a wpf app that launch a process to open any pdf file, for example:

    Proces p = Process.Start("C:/mydocumment.pdf")

    3) Add a mannifest to your app and uncomment this:

    <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />

    4) Compile the solution and debug it, there will be a request for administrator's password, type the admin password, VS2017 will be restarted under administrative credentials

    5) Debug the app again, when the app try to open the pdf ... then you will see what happens

    Monday, March 20, 2017 2:17 PM
  • Dear Sara ...

    By the way please if you can send this information ton VS Team because they don't believe that this could be a VS2017 Bug, However they never ask me for the code and it seems that they never read that this problem never happened on VS2010!, working on the same machine and with the same solution !.

    Tuesday, March 21, 2017 2:50 AM
  • Hi samharriscl,

    Thank you for your update.

    Refer to the detail description of your previous reply, it looks like I can reproduce this issue that you said. If you run or debug the project with administrator right, the pdf file cannot be opened with Adobe Acrobat Reader, no Adobe Acrobat windows display and there have 2 tasks of Adobe Acrobat in the Task Manager windows as background process like the following screenshot. It is the same result as yours, right?

    For your latest reply, have you tried to report this issue to the VS Product Team through Help-Send Feedback-Report a Problem...? If not, please feel free to let me know, I will report this issue to help you.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 21, 2017 9:02 AM
    Moderator
  • Hi Sara ... Thank you very very much to pay me attention.

    This is the exact issue, I already reported this to the VS Team but they simply close the thread and say  that this is ,y app bug.

    But that is not possible because the same app sunn perfectly, under the same conditions, on VS2010.

    https://developercommunity.visualstudio.com/content/problem/31212/vs2017-fails-openning-adobe-acrobat-reader-under-a.html?childToView=33281#comment-33281

    In fact I simply change the admin user pdf default app to Google Chrome and everything is ok for me now...but I think this is not the best solution and may be you could be interested on it.

    Tuesday, March 21, 2017 12:18 PM
  • Hi samharriscl,

    Thank you shared the link and I have checked those comments, with my understanding, this feature works fine with other software like Google Chrome that you described in the semi solution and only the Adobe Acrobat Reader, have you tried to redirect the Adobe Acrobat Reader support forum to seek for a professional support.

    There have some improvement or changes from VS 2010 to VS 2017, maybe the Adobe Acrobat Reader also need to adjust or improve in some places, but this is just my personal suspect :)

    Visual Studio Team: Given that the behavior is a process spawned from your own application, this is not a VS problem. You might consider calling product support or asking on developer forums.

    To solve your current issue, you can try to redirect to Adobe Acrobat Reader forum or go to the development forum per your application, you will get a more professional support from there and since our forum is to discuss the Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. I'm so sorry for this inconvenience and thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 22, 2017 7:45 AM
    Moderator
  • Dear Sara:

    First of all Sara: I know you make an effort so thank you very much.

    What I see: Microsoft's -the creators of VS and .NET- support and development teams can not (or don't care about) find a solution and obviously you cannot go against them.

    VS Team didn't even test the code, but they said this is a code problem and not their problem (how can they ensure this if didn't asked for the code ? obviously they didn't take 5 minutes on this). I think that, except for you Sara, I just found a selfish and egocentric team of people, surely part of "all about my self generation".

    This was the first and the last time I try to collaborate with M.S., after all the only reason because I work with M.S. products it is because I have no choice.

    Today I will test another tool called C#Develop, just in case.

    Thank you Sara.

    Wednesday, March 22, 2017 1:43 PM
  • Hi samharriscl,

    I regret that i cannot help you solve this issue and when you have free time, please navigate to  the Adobe Acrobat Reader support forum and check if there have any available workarounds or not. Since the Adobe Acrobat Reader is the third party software, sometime VS cannot work stable with every third party software, especially for the new VS version that just released and meanwhile, the third party software also need to change to make it works with the latest VS version, thank you for your understanding :)

    BTW, if you have any issue about VS IDE in the future, please feel free to let me know, I am happy to help you.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, March 23, 2017 2:45 AM
    Moderator
  • This is so dumb.  I have been having this same issue.  It used to happen in Visual Studio 2010 but it went away.  Now it is happening again and of course Microsoft is dropping the ball and not owning up to it as a bug.  Developers are so arrogant, I know.. I am one of them.
    Thursday, May 18, 2017 5:55 AM
  • Hi my friend,

    Welcome to the MSDN forum.

    Thank you for your feedback and sorry for this inconvenience.

    As my understanding about the reply that comes from the VS Product Team, the behavior is a process spawned from your own application, this is not a VS problem. You might consider calling product support or asking on developer forums.

    What's the product type of your application, you can try to redirect to the developer forums like https://social.msdn.microsoft.com/forums/en-us/home?category=vslanguages to check if there have any other solution or workarounds for this issue, thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, May 19, 2017 2:04 AM
    Moderator