Hi there,
When I try to run WebPI I get this error: Unable to download product list .... Check your network connection and try again.
Here is the Log file:
DownloadManager Information: 0 : Loading product xml from: https://go.microsoft.com/?linkid=9817844
DownloadManager Information: 0 : https://go.microsoft.com/?linkid=9817844 responded with 407
DownloadManager Information: 0 : Response headers:
HTTP/1.0 407 Proxy Authentication Required
Server: squid/3.1.10
Mime-Version: 1.0
Date: Thu, 21 Feb 2013 14:55:47 GMT
Content-Type: text/html
Content-Length: 4027
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
Proxy-Authenticate: Negotiate
Proxy-Authenticate: NTLM
Proxy-Authenticate: Basic realm="Internet Proxy"
X-Cache: MISS from cz00psqd01
X-Cache-Lookup: NONE from cz00psqd01:3128
Via: 1.0 cz00psqd01 (squid/3.1.10)
Connection: close
DownloadManager Error: 0 : Error downloading product file: 'System.Net.WebException: Url 'https://go.microsoft.com/?linkid=9817844' returned HTTP status code: 407
at Microsoft.Web.PlatformInstaller.ManagedWinInet.OpenUrlAndFollowRedirects(Uri& uri, IntPtr& hInetFile)
at Microsoft.Web.PlatformInstaller.ManagedWinInet.DownloadFile(Uri uri, String fileName, String& contentDispositionFileName)
at Microsoft.Web.PlatformInstaller.ProductManager.DownloadFile(Uri url, String cacheFileLocation, DateTime productFileLastModified)
at Microsoft.Web.PlatformInstaller.ProductManager.Load(Uri productFileUrl, Boolean filterByArchitectureAndOS, Boolean loadEnclosures, Boolean useCachedVersion, String cacheDirectory, Architecture architecture, Int32 majorOS, Int32 minorOS, Int32 majorSP, Int32
minorSP, Int32 osType)
DownloadManager Error: 0 : Error loading cached XML file: System.IO.FileNotFoundException: Could not find file 'C:\Users\janmarek1\AppData\Local\Microsoft\Web Platform Installer\-1250132447.xml'.
File name: 'C:\Users\janmarek1\AppData\Local\Microsoft\Web Platform Installer\-1250132447.xml'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path)
at Microsoft.Web.PlatformInstaller.ProductManager.LoadDocument(String xmlPath)
at Microsoft.Web.PlatformInstaller.ProductManager.LoadFromXml(String xmlFile, Boolean loadEnclosures)
at Microsoft.Web.PlatformInstaller.ProductManager.Load(Uri productFileUrl, Boolean filterByArchitectureAndOS, Boolean loadEnclosures, Boolean useCachedVersion, String cacheDirectory, Architecture architecture, Int32 majorOS, Int32 minorOS, Int32 majorSP, Int32
minorSP, Int32 osType)
DownloadManager Error: 0 : WebClient download error: System.Net.WebException: An exception occurred during a WebClient request. ---> System.Configuration.ConfigurationErrorsException: Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration
section. ---> System.IO.FileNotFoundException: Could not load file or assembly 'WebPI.Net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'WebPI.Net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at System.Net.Configuration.DefaultProxySectionInternal..ctor(DefaultProxySection section)
at System.Net.Configuration.DefaultProxySectionInternal.GetSection()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
--- End of inner exception stack trace ---
at System.Net.Configuration.DefaultProxySectionInternal.GetSection()
at System.Net.WebRequest.get_InternalDefaultWebProxy()
at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Net.WebClient.GetWebRequest(Uri address)
at Microsoft.Web.PlatformInstaller.AutoProxyHttpWebClient.GetWebRequest(Uri address)
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
--- End of inner exception stack trace ---
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at Microsoft.Web.PlatformInstaller.ProductManager.WebClientDownloadFile(Uri url, String cacheFileLocation)
DownloadManager Error: 0 : WebClient error: System.Net.WebException: An exception occurred during a WebClient request. ---> System.Configuration.ConfigurationErrorsException: Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration
section. ---> System.IO.FileNotFoundException: Could not load file or assembly 'WebPI.Net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'WebPI.Net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at System.Net.Configuration.DefaultProxySectionInternal..ctor(DefaultProxySection section)
at System.Net.Configuration.DefaultProxySectionInternal.GetSection()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
--- End of inner exception stack trace ---
at System.Net.Configuration.DefaultProxySectionInternal.GetSection()
at System.Net.WebRequest.get_InternalDefaultWebProxy()
at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Net.WebClient.GetWebRequest(Uri address)
at Microsoft.Web.PlatformInstaller.AutoProxyHttpWebClient.GetWebRequest(Uri address)
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
--- End of inner exception stack trace ---
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at Microsoft.Web.PlatformInstaller.ProductManager.WebClientDownloadFile(Uri url, String cacheFileLocation)
at Microsoft.Web.PlatformInstaller.ProductManager.Load(Uri productFileUrl, Boolean filterByArchitectureAndOS, Boolean loadEnclosures, Boolean useCachedVersion, String cacheDirectory, Architecture architecture, Int32 majorOS, Int32 minorOS, Int32 majorSP, Int32
minorSP, Int32 osType)
DownloadManager Information: 0 : https://go.microsoft.com/?linkid=9817844 responded with 407
DownloadManager Information: 0 : Response headers:
HTTP/1.0 407 Proxy Authentication Required
Server: squid/3.1.10
Mime-Version: 1.0
Date: Thu, 21 Feb 2013 14:55:47 GMT
Content-Type: text/html
Content-Length: 4025
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
Proxy-Authenticate: Negotiate
Proxy-Authenticate: NTLM
Proxy-Authenticate: Basic realm="Internet Proxy"
X-Cache: MISS from cz00psqd01
X-Cache-Lookup: NONE from cz00psqd01:3128
Via: 1.0 cz00psqd01 (squid/3.1.10)
Connection: close
DownloadManager Error: 0 : WinInet error: System.Net.WebException: Url 'https://go.microsoft.com/?linkid=9817844' returned HTTP status code: 407
at Microsoft.Web.PlatformInstaller.ManagedWinInet.OpenUrlAndFollowRedirects(Uri& uri, IntPtr& hInetFile)
at Microsoft.Web.PlatformInstaller.ManagedWinInet.DownloadFile(Uri uri, String fileName, String& contentDispositionFileName)
at Microsoft.Web.PlatformInstaller.ProductManager.DownloadFile(Uri url, String cacheFileLocation, DateTime productFileLastModified)
at Microsoft.Web.PlatformInstaller.ProductManager.Load(Uri productFileUrl, Boolean filterByArchitectureAndOS, Boolean loadEnclosures, Boolean useCachedVersion, String cacheDirectory, Architecture architecture, Int32 majorOS, Int32 minorOS, Int32 majorSP, Int32
minorSP, Int32 osType)
DownloadManager Error: 0 : WebException error loading product file: System.Net.WebException: Url 'https://go.microsoft.com/?linkid=9817844' returned HTTP status code: 407
at Microsoft.Web.PlatformInstaller.ManagedWinInet.OpenUrlAndFollowRedirects(Uri& uri, IntPtr& hInetFile)
at Microsoft.Web.PlatformInstaller.ManagedWinInet.DownloadFile(Uri uri, String fileName, String& contentDispositionFileName)
at Microsoft.Web.PlatformInstaller.ProductManager.DownloadFile(Uri url, String cacheFileLocation, DateTime productFileLastModified)
at Microsoft.Web.PlatformInstaller.ProductManager.Load(Uri productFileUrl, Boolean filterByArchitectureAndOS, Boolean loadEnclosures, Boolean useCachedVersion, String cacheDirectory, Architecture architecture, Int32 majorOS, Int32 minorOS, Int32 majorSP, Int32
minorSP, Int32 osType)
at Microsoft.Web.PlatformInstaller.ProductManager.Load(Uri productFileUrl, Boolean filterByArchitectureAndOS, Boolean loadEnclosures, Boolean useCachedVersion, String cacheDirectory)
at Microsoft.Web.PlatformInstaller.ProductServiceImpl.LoadProducts(String primaryFeed, String[] feeds)
How can I solve this issue?
I tried to compile a dll should be able to connect through proxy with credentials, but with no success...
Here is the configuration from webPlatformInstaller.exe.config file:
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="false">
<module type="WebPI.Net.AuthenticatedProxy, WebPI.Net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</defaultProxy>
</system.net>
Here is the code of dll: Name of project(and dll is Proxy.dll) I put this dll to the root of webPlatformInstaller.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
namespace WebPI.Net
{
public class AuthenticatedProxy : IWebProxy
{
public ICredentials Credentials
{
//Put your user name and password into credentials
get { return new NetworkCredential("Myusername", "MYpassword", "MYdomain"); }
set { }
}
public Uri GetProxy(Uri destination)
{
//Proxy URI will be taken from the current user's IE proxy settings
return WebRequest.GetSystemWebProxy().GetProxy(destination);
}
public bool IsBypassed(Uri host)
{
return false;
}
}
}
Server is behind proxy server, IE browser is able to download product list feed directly after I enter credentials.
Thanks For your help. :)
Best Regards,
Jan Marek