Comments (16)
UseDefaultCredentials = True - solution (one of)
from odata2poco.
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.
Connection failed with 127 888
from odata2poco.
The proxy in this case Is not used, it an intranet.
from odata2poco.
Do you modify the proxyaddress to your proxy server and port.
This value should match the value in IE explorer.
from odata2poco.
This site in exceptions (in proxy settings)
from odata2poco.
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.
Not quite, build-in Auth method, ntlm.
I do not input my credentials.
from odata2poco.
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.
//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.
Good evening (or another time of day).
I edited the code a bit. Is everything clear from my last post?
from odata2poco.
Good evening
Thanks for code. It is clear and I will use it
from odata2poco.
Can you try
-u user -p password -0 basic
User and password are your login
from odata2poco.
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.
It is nice if you can confirm it is working.
Taking into account proxy configuration using .config file.
from odata2poco.
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)
- MaxLength for a String property HOT 13
- Support for read-only attributes from *.edmx HOT 2
- Case option not applied to type names HOT 6
- Question: generate poco only for some dynamic365 entities HOT 7
- Outdated EDM library and use of System.Text.Json? HOT 4
- Nullable Microsoft.OData.Edm.Date HOT 5
- Documentation HOT 2
- Feature Request: Add used options to output HOT 3
- Possible to add field descriptions from metadata to C# output HOT 4
- How to deal with lookups in EDMX? HOT 3
- Support .NET 5+ HOT 2
- Add External Property Name Mapping HOT 2
- readonly option and metadata as string HOT 4
- Allow Headers in API Request HOT 3
- Not nullable enum and object members. HOT 9
- Drop support for target net45 HOT 1
- OpenType was not expected in the given context HOT 5
- Gzip encoded content HOT 5
- Announcing: Signing o2pgen.exe and all odata2poco.xxx.nupkg packages. HOT 1
- Announcing the new Release: V6.3.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odata2poco.