I have recently started receiving an Exception for one of my web apps.
The exception is:"The remote server returned an error: (401) Unauthorized.".
It seems to be caused by the"request.GetResponse()" returning "This operation requires IIS integrated pipeline mode."
Everything I have read on google talks about IIS 7 and Headers. I am not accessing the headers at all. I am just creating a request and getting the reponse. This code has worked for several years. I think a .Net upgrade may have caused this problem to appear, but (long story) I can't UNDO the .Net instatllation (due to space issues on the server the Uninstall files were removed...sigh...). So, I am left with fixing this problem.
I have narrowed my code to (simply!) the following. The URL does work (I have repalced my AppId obviously for public view). Whenever the GetResponse() is called that is when the Exception is thrown.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Try
Dim YahooAPI As String = http://api.local.yahoo.com/MapsService/V1/geocode?appid=MyAppID&zip=37090
Dim request As HttpWebRequest = WebRequest.Create(YahooAPI)
Dim response As HttpWebResponse
response = request.GetResponse()
Catch ex As Exception
Dim exceptions As String
End Try
End Sub