-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Connect #56
Comments
any news on this? I'm stuck with the same issue... |
I actually got in contact with the feedback contact for this extension, but he's telling me to get a valid SSL certificate for the endpoint. However, I don't see the validity in that because we're developers and not having a certificate for a server is part of the development process. |
try this: run Fiddler4 and allow https decryption. Then update your odata-services. |
This works for me: Use the OData v4 Client Code Generator extension instead. It says it only support to 2015 version but it work on 2017. The extension need a pre-release version of the OData.Client you can get at: To get through credentials, get the metadata from a browser from https://[your url]/odata/$metadata, save it in a local file with the edmx extension and set it as a source of the Code Generator. Hope this help |
@lalaqc Saving it as as edmx file let it get to code generation, but I didn't download the solution in #51 yet. However, the web service I'm connected to is on OData v3. I get this error when performing those steps:
|
After updating to version 0.3 (#63), I still get this error message. |
Any update on this? I'm trying to access a public service (Cezanne, one of the biggest hr platforms). Worked smoothly in VS 2015 using WCF Connected Service but after upgrading to VS 2017 and installing OData Connected Service, I get an error "can not access https://serviceurl/$metadata". |
I had not come across this issue on my environment. Can you try these steps as a smoke test first? If the above passes, then we can proceed to try to debug the issues on your particular environments. You will need to sync the source code. Then follow the information to debug here and here. For starters, I would try putting a breakpoint at line 111 here. Hope that helps! edit: sorry accidentally clicked the close issue button. |
@AlanWong-MS To be sure it has something to do with my environment, could you please try the service url that doesn't work for me: https://w3.cezanneondemand.com/CezanneOnDemand/v3/Dataservice.svc/ |
@siberianguy the endpoint requires authentication and at the moment the project doesn't support it. We have this issue flagged as priority 1 and will be discussing it later this week. |
@AlanWong-MS Yeah, I expected it to be related to authentication. Thank you for the update. Is it possible to give any estimation? It's blocking us from moving to .net core at the moment. |
@siberianguy at the moment, the discussion is scheduled for Friday. I'll keep this thread posted on updates. |
@AlanWong-MS, it does (cookie authentication). However, SAP was able to include a configuration option where the endpoint is exposed. I performed this step. |
Hi. here you can get the modified source code To use it, you can open the solution at this folder and run(debug) it (Uninstall any vesion you already have installed first). |
@Gabee01 When I install this, the Connected Services dialog doesn't list OData Connected Service any more for some reason. |
I was able to run the project and get it to list in the Connected Services dialog in the Debug instance of VS by cloning @robsiera 's repo and pasting the changes @Gabee01 made in PR #67. However, when I get to code generation, I get the same error as posted in #64. If Gabe was able to generate a vsix that generates the code for him, then maybe he has some different setup than I do. I included my SAP metadata if you want to test code generation with it. |
@nla-brandonjames I used the debug instance of VS to create the class. After you do it, I don't think you need the extension anymore, you just use the generated connected service. |
@Gabee01 You can still find the vsix file from the project's /bin/Debug folder. If it's not there do you mind testing the metadata I uploaded in the last post? Ha I'm in hot anticipation for this code generation to work. It means a lot to me to get connected to SAP WS. |
@nla-brandonjames I don't have access to change our SAP metadata.. and there's nothing on my /bin/Debug folder.. |
@Gabee01 You won't have to change the SAP metadata. I can't do that, either. All you'd need to do is target the edmx file by inputting its location on your hard drive when it asks for the address. |
@nla-brandonjames your metadata file is good. It generates the class as well |
I'm using VS CE 2017 v15.3.2 |
I'm on v15.3.4 that came out like 3 days ago but that shouldn't contribute to the issue should it? |
@Gabee01 Do you happen to have WCF Data Services installed on your computer? |
All, We discussed this particular topic regarding setting up authentication in the extension during the meeting I mentioned earlier. As of this moment, we don't have resources to allocate to this item but we do have several parties asking for the feature. The discussion on how we want to approach this is spilling over into next week and I'll continue to provide updates wherever I can. In the meantime, I encourage everyone to continue to support each other in the spirit of open source development. Thank you @Gabee01 for opening PR #67; much appreciated for your help in unblocking others. Having taken a look at the current iteration of the PR, I would recommend that it be used for test purposes only as it accepts all certificates for authentication. I'll provide feedback in the PR for alternative approaches. |
@AlanWong-MS is there an update on this and related issues? |
@siberianguy, PR #67 is pending changes. We don't have resources allocated for support on this at this time, but it's in our backlog. My statement regarding using the current proposed changes in #67 only in the test environment still stands. If you choose to pull the changes in the PR, please proceed with caution. |
I tried working on this today, but couldn't test what I've done. My guess is that @nla-brandonjames was right. I updated my VS several weeks ago, and it looks like oData Connected Service does not work on VS2017 v15.3.5 (or we're missing something). |
@Gabee01, I was able to connection to http://services.odata.org/AdventureWorksV3/AdventureWorks.svc/ as an example with VS2017 v15.3.5 but we have secure point that requires us to pass header information. How can I do that? |
We have been a user of the OData Client Code Generator v4 for a v4 OData service. We have no authentication on the $metadata path but we do have HTTPS. In our dev environments we must accept any certificate errors when updating the proxy generated classes. I wanted to give the Connected Service a go but get the same error as the OP. |
@kdcllc I think you could try getting the metadata using another tool which lets you provide the headers you need (like postman) and create an metadata file as @nla-brandonjames asked me to do for testing his metadata file (All you'd need to do is target the edmx file by inputting its location on your hard drive when it asks for the address.) |
I've still been following this thread, and what I suggest is that the application detects the install of WCF services before generating the code the first time. If it isn't detected, show a message in a new view on the UI and a file browser button which lets you manually select the location. This, however, opens the possibility of a new error of the user selecting the incorrect folder. In this case, after the folder is selected, do a check for a certain file that would only be in WCF services and if it fails, don't allow the user selected folder be stored. |
Per @Gabee01's comment:
This has also been the workaround that I have been suggesting to other users on my end. |
|
Navigate to the url /$metadata get the xml save on your PC and point to that file instead of the url, all it needs is the xml to generate all classes. |
Just open the link in Internet explorer, will prompt for username and password. Then save the credentials. Try again in visual studio. It works!!! |
Any update on this issue? @nla-brandonjames @AlanWong-MS |
Authentication has not been implemented yet in the extension. For now, please use one of the workarounds mentioned in the previous comments. |
Hello, any solution found today for this problem? I would greatly appreciate your response. |
The state of the request remains the same at this time. |
We can still not use OData within VS 2017 when the endpoint is secured. Has anyone a link to a easy working step-by-step tutorial that explains, how the workarounds mentioned by @AlanWong-MS can be used. |
@klacol did you try method suggested by @onyangofred ? |
Yes, but that did not work for me. I solved it manually for me in these steps:
Then it worked for me. |
@klacol This worked out for me also. Thanks! |
You can try Unchase OData ConnectedService for solve this issue without fix registry. This service supports Network Credentials and proxy (with credentials) for connecting to the endpoint. |
thx man |
You are welcome! |
This did it for me! thanks @albernazf commented on Feb 6, 2018 |
After I get the extension installed and expose the metadata to the public, the extension returns this when I try to add the connection. A detail about my connection is that we aren't currently using a valid SSL certificate. I can, however, pull the XML data up in a web browser.
The text was updated successfully, but these errors were encountered: