I'm running Sitecore.NET 7.0 (rev. 140120) with Social Connected 2.0 (for CMS 7.0).
However - unfortunately our corporate environment requires us to connect via a proxy server, so currently my dev environment does not work.
I reflected the code in Sitecore.Social.Facebook.dll and can see the code in Sitecore.Social.Facebook.Connector.Managers.WebRequestManager.GetResponse() that makes the HTTP requests to facebook.com, and which does not appear to reference a proxy.
I have confirmed on another network without proxy requirements that my setup works well.
Is there a way to specify a proxy for such requests? Can I write my own replacement which will allow a proxy to be configured - if so how do I plug this in?
The solution ended up being pretty simple. I added the following into my web.config:
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
</defaultProxy>
</system.net>
You can also specify other proxy configuration using this method which will affect your whole web application.
MSDN Reference
Related
Configuration Details
We have a SonarQube 6.7.2 (build 37468) on-premise installation running.
The instance is accessible from our office IP without HTTP Basic Auth, as well as from everywhere else with HTTP Basic Auth.
The "Force user authentication" option is off.
All projects are set to private - in case someone gets past the HTTP Basic Auth.
My user belongs to the sonar-administrators groups and has "Browse" and "See Source Code" permissions on all projects.
Using the web interface in the browser, I am able to see all projects including analysis results etc., as expected.
Problem
However, using the Web API, I receive "Insufficient Privileges" errors on several API calls.
My user has a valid token that I pass to cURL as described in the documentation. I even created a new token, to be sure I'm not using an invalid one.
Example
$ curl -X GET -u my_user_token: https://sonar.example.org/api/measures/search_history?component=the_project&metrics=lines_to_cover%2Cuncovered_lines%2Ccoverage&ps=1000
{"errors":[{"msg":"Insufficient privileges"}]}
Question
Is it not possible to retrieve measures information or project information via the API for projects that are set to private?
The above call works fine if the project is to public. (But then again, if the project is set to public, that call works fine even without authentication.)
We do have the same issue when using the SonarLint plugin for PHPStorm. The plugin works fine as long as the projects are public, but server sync stops working as soon as projects are set to private.
I'm thinking maybe it would be best to deny all requests to SonarQube except from our whitelisted office IP and have everyone connect via VPN if they want to access the instance from their home office. That would allow us to make all projects public and not have any of these issues. Is that the recommended way to run an on-premise installation of SonarQube?
Turns out the SonarQube instance was running behind an nginx reverse proxy that dropped the Authorization HTTP header from the request before passing it on to SonarQube.
After fixing the nginx configuration, all Web API calls work as expected.
So in order to use NuGet and other dev tools working inside my organisation we've had to set a system wide environment variable 'http_proxy' for each user in our user specific Environment variables.
Now, this works for everything we've tried so far, all package managers like NuGet, NPM, chocolatey, all work fine with external repositories.
Recently we've tried to set up an internal NuGet server on our build server to internally host common packages. Everyone can browse to the URL where the server is located: -ip-/nuget and we can see the XML feed. The issue comes when we try to use nuget.exe, or Visual Studio 2017 for connecting to this source, the requests to find packages all time-out after 100000ms which i guess is the default timeout.
We can also browse exactly to the URL that times out out in any browser with no issue. I'm assuming that this is something to do with our internal proxy trying to route traffic out of the network when it is actually internal, but i have no way of verifying that.
Is there anything we can try to see if we can get this resolved?
Is there anything we can try to see if we can get this resolved?
Since you can also browse exactly to the URL that times out out in any browser with no issue from your office system, there should be some internet limitations in your office environment. So I suggest you contact your office IT to confirm whether they add any limitations and whether used any proxy. If they are using some proxy, you need to set the proxy settings in NuGet.Config file which store in C:\Users\user name\AppData\Roaming\NuGet:
<configuration>
<config>
<add key="http_proxy" value="http://my.proxy.address:port" />
<add key="http_proxy.user" value="mydomain\myUserName" />
<add key="http_proxy.password" value="base64encodedHopefullyEncryptedPassword" />
</config>
</configuration>
Refer to this link for details: NuGet Behind Proxy
I’ve built a .NET Windows Service that keeps monitoring the DB latency from a Web Server. Every time the test runs it sends a Metric to App Insights via the SDK. On my development machine all works fine, but when it’s deployed to the webserver the metrics doesn’t reach the App Insights service because a proxy authentication failure occurs. This is the error that I’ve found by analyzing the network activity:
Proxy Authentication Required. Authentication Failure.Please check your username and password.
How can I set the proxy settings for App Insights for my Windows Service? Is there something similar to the “ApplicationInsights.config” file of web sites?
Many thanks in advance!
Finally I figure it out. What I was missing is setting the proxy on the app.config file adding:
<system.net>
<defaultProxy useDefaultCredentials="true" />
</system.net>
We are trying to setup a chain of proxy server in our development system. We wanted to connect to a service through these proxies. The reason why we thought about proxy chaining is that there is no connectivity to the service from all the systems. So we thought we will run a proxy on one system, which will connect to a proxy on another system and so on.
Client ---> A (Proxy)--->B(proxy)---->Final destination
Could you please suggest some tools to achieve this? The service that we have is a SOAP based secured web service.
There is an open source application called ProxyChain for this, here is readme file for this project:
http://proxychains.sourceforge.net/howto.html
You can install as more as proxy chains you want using this open source software, you can configure it per your requirements. Also you can somehow use some port-forwarding. What is the client for SOAP requests? Is it a web or desktop application?
I'm using the AJAX Test Server in Rational Application Developer. I'm posting a form to another host for authentication. That host takes a URL to redirect to after authentication. However, it insists on using HTTPS whenever it sends the 302 response. The low hanging fruit would be to just use HTTPS locally.
Looking at the launch configuration, the AJAX Test Server appears to be a custom Apache HttpCore server. I haven't spotted anything in the configuration guide.
Is there a way to access this test server via HTTPS?
This is for demo and local development purposes; not production.
Speaking from working with WAS (WebSphere Application Server) in RAD, I'm pretty sure the answer would be yes. The server (at least with WAS) has both secure and "unsecure" ports.
What I have noticed is that when the server is built with the install (at least with the newer versions of the products 7.5+), the ports used are different per install. This is to help with not conflicting with other applications that may use those ports.
So https is probably fine. You just may have to use it over port 302 or some other port.
If there is no admin console for viewing your ports, you could always try the Window | Preferences option under your menu items. Sometimes IBM hides server config stuff in there.