GithubHelp home page GithubHelp logo

Comments (16)

lobster2012-user avatar lobster2012-user commented on June 14, 2024

UseDefaultCredentials = True - solution (one of)

from odata2poco.

moh-hassan avatar moh-hassan commented on June 14, 2024

Create a configuration file named: o2pgen.exe.config in the root of o2pgen.exe

Add the following xml text (with modifying proxyaddress to your proxy and port )

	<?xml version="1.0" encoding="utf-8" ?>
	<configuration>
	  <system.net>
		<defaultProxy useDefaultCredentials="true" enabled="true">
		  <proxy usesystemdefault="false" autoDetect="false" proxyaddress="http://localhost:888" />
		</defaultProxy>
	  </system.net>
	</configuration>

Let me know if that is working
Post the error message

from odata2poco.

lobster2012-user avatar lobster2012-user commented on June 14, 2024

Connection failed with 127 888

from odata2poco.

lobster2012-user avatar lobster2012-user commented on June 14, 2024

The proxy in this case Is not used, it an intranet.

from odata2poco.

moh-hassan avatar moh-hassan commented on June 14, 2024

Do you modify the proxyaddress to your proxy server and port.
This value should match the value in IE explorer.

from odata2poco.

lobster2012-user avatar lobster2012-user commented on June 14, 2024

This site in exceptions (in proxy settings)

from odata2poco.

moh-hassan avatar moh-hassan commented on June 14, 2024

So, Proxy is not needed.

You are connected to the sharepoint service using your active directory credential user/password
for example:
user: myuser@mydomain
password:******
Is it right?

from odata2poco.

lobster2012-user avatar lobster2012-user commented on June 14, 2024

Not quite, build-in Auth method, ntlm.
I do not input my credentials.

from odata2poco.

moh-hassan avatar moh-hassan commented on June 14, 2024

I do not input my credentials.

I'm confused.

For NTLM connection, the parameter needed for http connection are:
username , password and domain
Which I suppose to implement it.

Intranet simply imply integrating Active directory security with all services for one single sign on.

When you are connecting from the mobile for example, you should pass credential and then they may be stored in your device for auto connection without re-entering the credential.

Did you try to connect to the service using curl/powershell or any Rest client tool? If so what is the http connection parameters to enter? Give me an example?

from odata2poco.

lobster2012-user avatar lobster2012-user commented on June 14, 2024
//USE DEFAULT(WINDOW AUTH)CREDENTIALS for intranet.
var handler = new HttpClientHandler()
{
    UseDefaultCredentials = True
}
var http = new HttpClient(handler);

You only need this line or option, which will give the opportunity to set this flag.

I work inside the intranet, authentication is done by AD mechanisms without additional input of the login-password, since I am already logged in to the domain.
(Now I am writing from a mobile, later I can answer in more detail from a computer.)

from odata2poco.

lobster2012-user avatar lobster2012-user commented on June 14, 2024

Good evening (or another time of day).
I edited the code a bit. Is everything clear from my last post?

from odata2poco.

moh-hassan avatar moh-hassan commented on June 14, 2024

Good evening
Thanks for code. It is clear and I will use it

from odata2poco.

moh-hassan avatar moh-hassan commented on June 14, 2024

Can you try

       -u user -p password -0 basic

User and password are your login

from odata2poco.

lobster2012-user avatar lobster2012-user commented on June 14, 2024

I will try this tomorrow. I’m sure it will work, as my proxy exactly supports basic auth. Should I close the issue, this problem is not a critical bug? I am an ardent opponent of re-entering a password in AD, but this is just a matter of taste.

from odata2poco.

moh-hassan avatar moh-hassan commented on June 14, 2024

It is nice if you can confirm it is working.
Taking into account proxy configuration using .config file.

from odata2poco.

lobster2012-user avatar lobster2012-user commented on June 14, 2024

Strange, received an authorization error. Although the heading was sent. While I’ll close the issue, I’ll make a separate version for myself so that authentication will be carried out by Windows.

from odata2poco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.