This project has moved and is read-only. For the latest updates, please go here.

proxy issue?

Topics: Developer Forum, User Forum
Mar 24, 2007 at 10:26 PM
Edited Mar 24, 2007 at 10:27 PM
I'm attempting to use this api with the hosting company

When pulling up the page, I receive "Unable to load DLL 'rasapi32.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)"

Tech Support responded with the following:

this error is very misleading, because it has nothing to do with permissions or access to the DLL.

With ASP.NET 2.0, when you try to initiate an HTTP request through different classes, ASP.NET 2.0 allows you to use the system default proxy setting. When you do that, it will fail because the system does not have the default proxy setup.

By default, we modified our master web.config file to tell ASP.NET 2.0 to not use default proxy.

<proxy usesystemdefault="false" />

If you are seeing this error, one of the following is the cause.

1) You overrode this setting in your own web.config file:
< proxy usesystemdefault="true" />


2) Your application is programmatically setting the usesystemdefault property to true.

I'm not doing #1. Is FlickrNet doing #2?
The same code works fine locally and on other provider's servers.

Any tips on resolving this?

Mar 25, 2007 at 6:33 PM
Update: This probably will break something else but I've done the following to get it to work:

I've commented out the following lines in the constructor for flickr.cs:

// try and get default IE settings
//Proxy = WebProxy.GetDefaultProxy(); //COMMENTED OUT THIS LINE

Helpful articles (comments):

Mar 26, 2007 at 11:30 AM

Yeah, I knew there was an issue, as GetDefaultProxy is depreciated in ASP.Net 2.0. I didn't realise the try/catch wouldn't catch the exception however (thats what I put it in there for!)

The issue is that in .Net 2.0 the proxy defaults to the IE one anyway (or whatever the web.config file tells it to default to), but in 1.1 it defaults to nothing. So the change you suggest would break any existing .Net 1.1 clients which do not manually set a proxy and assume the use of the IE proxy - not that many people really.