EPiServer Find Indexing & proxy

Vote:
 

Hi,

 

I couldn't find configuration option for using proxy in Find indexing, is there one? Or has someone created workaround to this "problem"?

#73559
Jul 29, 2013 11:48
Vote:
 

I guess you could just specify it the default way in Web.config or through Internet Options.

The DefaultWebProxy property reads proxy settings from the app.config file. If there is no config file, the current user's Internet Explorer (IE) proxy settings are used.

#73560
Jul 29, 2013 14:45
Vote:
 

You are right, my first day after vacation so was a bit lazy to check that :-)

#73564
Jul 29, 2013 16:02
Vote:
 

Is there any other way to do this, if you dont want to set defaultwebproxy?

#172650
Dec 07, 2016 11:04
Vote:
 
<system.net>
<defaultProxy enabled="true">
<proxy proxyaddress="http://127.0.0.1:8888"></proxy>
</defaultProxy>
</system.net>



#172651
Dec 07, 2016 11:18
Vote:
 

Is there any other way to do this, if you don't want to set defaultProxy in web.config, since this is a global setting for the whole webapp?

#172652
Dec 07, 2016 11:26
Vote:
 

Find by default uses the System.Net.HttpWebRequest and therefore follows any proxy rules for the application. You can write your own request handler by overloading IJsonRequest but I would not recommend that in this case. Insted I would say that you simply set the bypass-list in the defaultProxy setting to anything but the Find connection string (see: <defaultProxy> Element)

/Henrik

#172693
Dec 08, 2016 10:52
Vote:
 

We tried overloading IJsonRequest using the ServiceConfiguration attribute but it didn't work unfortunately. So I'm guessing we're left with using the bypasslist or a proxy PAC.

#172696
Dec 08, 2016 11:13
Vote:
 

The Find Core Api (EPiServer.Find.dll) does not use the service locator. You have to wrap it into IJsonRequestFactory -> pass it into new Commands(serviceUrl, new CustomJsonRequestFactory(), Serializer.CreateDefault, new RuntimeCacheAdapter()); -> and create the client using -> Client(ICommands commands, string defaultIndex) if you want to go down that road.

/Henrik

#172697
Dec 08, 2016 11:31
Vote:
 

Will give this a try, thanks!

#172698
Dec 08, 2016 11:35
Vote:
 

I would really recommend you to go with the defaultProxy config change with a bypass-list. Replacing the entire JsonRequest, creating a custom client and injecting it at startup (as other components are using the service locator to use/configure the client) is a lot of work for just having a custom proxy setting for the http requests of Find.


You can of course also set/create the default proxy in code by implementing the IWebProxy interface and set it for WebRequest.DefaultWebProxy.

/Henrik

#172702
Dec 08, 2016 11:59
Vote:
 

Yes I agree, it seems like a lot of work.

However, I don't understand what you mean with your last sentence. How would that help? Our site has a lot of internal webrequests where using defaultproxy for the whole app renders that functionality unusable. We could of course specify in code that a proxy shouldn't be used per every request we're making. That would not be our preferred solution in this case.

#172704
Dec 08, 2016 12:14
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.