Microsoft Secure Tech Accelerator
Apr 03 2024, 07:00 AM - 11:00 AM (PDT)
Microsoft Tech Community
SOLVED

Azure Hybrid Cloud Print

Brass Contributor

I have followed the setup found here: http://www.scconfigmgr.com/2018/01/22/deploy-hybrid-cloud-print/. When I am attempting to publish a printer from an Azure AD joined Windows 10 device I receive this error:

Invoke-RestMethod : {"Message":"An error has occurred."}

At C:\Program Files\WindowsPowerShell\Modules\PublishCloudPrinter\1.0.0.0\PublishCloudPrinter.psm1:177 char:5

+ Invoke-RestMethod -Uri $url -Method Get -ContentType "application ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException

+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

 

2 Replies

I have figured out my problem. It was the versioning setup on the web.config file on the print server. If you are experiencing this issue double check your the version numbers on your web.config file.

best response confirmed by Colton Lacy (Brass Contributor)
Solution

The below screenshot from my on-premise print server causes errors if you have different versions and put them as different versions behind the oldVersion and the newVersion in the web.config file.

Wrong web.configWrong web.config

 

 

The below screenshot is correct if you put the same versions behind the oldVersion and the newVersion in the web.config file.

Correct web.configCorrect web.config

1 best response

Accepted Solutions
best response confirmed by Colton Lacy (Brass Contributor)
Solution

The below screenshot from my on-premise print server causes errors if you have different versions and put them as different versions behind the oldVersion and the newVersion in the web.config file.

Wrong web.configWrong web.config

 

 

The below screenshot is correct if you put the same versions behind the oldVersion and the newVersion in the web.config file.

Correct web.configCorrect web.config

View solution in original post